CodeForge is an AI-native code editor built on Code-OSS with a fully embedded AI platform. The architecture follows the principle of one product, one installation — all AI capabilities live in the built-in extension extensions/codeforge/.
Source of truth: the shipped IDE runs only
extensions/codeforge/. The legacysrc/tree is frozen and scheduled for removal; do not add features there.
- Single Application: Everything runs within the IDE process or managed child processes
- No External Dependencies: No Docker required by default, no separate ContextMemory service
- Model Independence: Works with any LLM provider
- Local-First: Full functionality without cloud services
- Extension-native: Packaging syncs one built-in extension into Code-OSS
┌─────────────────────────────────────────────────────────────┐
│ CodeForge │
│ Code-OSS Base │
├─────────────────────────────────────────────────────────────┤
│ Editor │ Explorer │ Git │ Terminal │ Debug │ Extensions │
├─────────────────────────────────────────────────────────────┤
│ Embedded AI Platform (codeforge) │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Agent │ │ Context │ │ Memory │ │ Tools │ │
│ │ Runtime │ │ Engine │ │ Engine │ │ Runtime │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ MCP │ │ Skills │ │ Rules │ │ Policy │ │
│ │ Runtime │ │ Engine │ │ Engine │ │ Engine │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Sandbox │ │Artifacts │ │Subagents │ │ Models │ │
│ │ Runtime │ │ Store │ │Orchestr. │ │ Router │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
├─────────────────────────────────────────────────────────────┤
│ Code Intelligence │ Git Intelligence │
│ Browser Agent │
├─────────────────────────────────────────────────────────────┤
│ Model Providers │
│ Cloud (OpenAI/Anthropic) │ Local (Ollama) │ Custom │
└─────────────────────────────────────────────────────────────┘
Iterative tool-calling loop with checkpoints and recovery:
- Lifecycle states (created → planning → executing → completed / failed)
- Native + MCP tools
- Rolling compaction + session wiki facts that survive compaction
- Progress review / budget extension
Builds enriched context for LLM requests:
- Budget allocation across wiki, IDE, retrieve, git, MCP, history
- Source ranking (active wiki / open file first)
- Compression via rolling summary + wiki
Persistent memory across sessions:
- Session Wiki: Per-session Markdown pages + working memory
- Project Wiki: Cross-session project knowledge under
{workspace}/.CodeForge/memory/ - Temporal Facts:
validFrom/validTowith supersede
Native tools for workspace operations:
- File operations (read, write, delete, rename)
- Search (ripgrep-based) + hybrid retrieve
- Shell execution (sandboxed levels)
- Editor / LSP / Git / Browser / Wiki
Routes requests to LLM providers:
- Strong (native tool calls) vs Weak (prose parsing)
- OpenAI, Anthropic, Google, xAI, OpenRouter, Ollama, vLLM, LM Studio, custom
Security and permissions:
- Guardrails, HITL approvals, auto-approve modes
- Risk-aware sandbox level selection
- Secret scrubbing from child process env
- Inbound: IDE consumes external MCP tools
- Outbound: IDE exposes wiki + retrieve to external clients
- Transport: HTTP and stdio
- Levels:
safe-local,restricted,isolated,container(Docker optional) - Platform helpers: Windows Job Objects, Linux bwrap/seccomp, macOS sandbox-exec
- Default: native isolation, no Docker required
Large tool/LLM outputs and execution traces under ~/.CodeForge/ai/.
- User Request → Agent Runtime
- Context Assembly → Context Engine + Memory Engine
- LLM Request → Model Router → Provider
- Tool Calls → Tool Runtime / MCP Runtime / Sandbox
- Validation → Policy Engine
- Memory Update → Memory Engine
- Response → User
~/.CodeForge/
├── skills/ # User skills
├── rules/ # User rules
├── ai/
│ ├── sessions/{id}/ # Chat + session wiki
│ ├── memory/{wsHash}/ # Fallback project memory
│ ├── artifacts/ # Large outputs
│ ├── traces/ # Execution logs
│ └── policies/ # Custom policies
├── code-index/{wsHash}/ # Repository index
└── model-cache/ # Cached embeddings / models
{workspace}/.CodeForge/
└── memory/ # Project wiki + temporal facts
- Policy Evaluation: Before each tool call
- Approval Flow: For dangerous operations
- Sandbox Execution: For shell commands
- Secret Protection: API keys not forwarded to shell env
- Network Control: Configurable egress hints at restricted+ levels