Context Builder
Context Builder shows everything IZ Code gives an agent automatically, source by source, and lets you switch sources off. Its Debug view shows the whole message an agent would receive for what you are typing.
What it is#
Before an agent starts working, IZ Code assembles context for it: your project instructions, the Git state, guides for IZ Code's tools, memory, and more. Every agent gets this context the same way, so switching agents does not mean losing it.
flowchart TD
subgraph start["When a session starts"]
I[Project instructions]
G[Git state]
M["Memory, tool guides"]
end
start --> B{"Budget: 32,000 characters"}
X[Context Builder switches] -. remove sources .-> start
B --> S[Session context]
R[Memory recall] --> P
U["@mentions, attachments"] --> P
S --> P[Message to the agent]
P --> A([Any agent])Context Builder is the place to see and control that context. Use it when:
- An agent ignores your
AGENTS.mdand you want to check whether it was sent. - You want to save tokens by dropping sources you do not need.
- You want to see exactly what was handed to the agent, for example while writing project instructions.
A switch in Context Builder can only take context away. It never adds something an agent already reads by itself, so you cannot cause the same file to be sent twice.
Open it#
-
Open Settings Go to Settings → Context Builder.
-
Pick the agent Each agent declares what it reads itself, so the list is per agent. If the agent is not running, the list shows IZ Code's side only.
-
Pick the folder Context is built per workspace folder.
-
Read the rows Each source shows its status, how many characters it adds, and Show text to read it.
Sources#
Sources are grouped by when they are sent.
When a session starts#
Built once and frozen into the session, either as the system prompt or in front of the first message. A change applies from the next session.
| Source | What it adds |
|---|---|
| Project instructions | AGENTS.md, CLAUDE.md or .izcode/instructions.md of the folder. |
| Team memory | Your project's team pages and skills. |
| Git state | The current branch and the changed files. |
| Workspace folders | A note listing every folder, only when more than one is open. |
| General tools guide | How to use IZ Code's file, shell and diagnostics tools. |
| Code Intelligence guide | Tells the agent the code index is ready and when to use the code* tools. |
| Browser guide | How to drive web pages with the browser* tools. |
| Git tools guide | When to use the git* tools (only inside a Git repository). |
| Run and Debug guide | How to start the program under the debugger and run tasks. |
| Specs guide | How specs work in this workspace and how to use the spec* tools. |
| Memory: persona | The long-term profile Agent Memory learned about you in this project. |
| Memory: scene index | One line per memory scene, so the agent knows what it can read. |
| Memory: wiki | A note about the project's wiki pages, only when the wiki has pages. |
| Memory: tools guide | When to call the memory tools. |
With each message#
Added to the message you send. A change applies from the next message.
| Source | Control |
|---|---|
| Memory recall | Relevant memories found for each message, put in front of it. Has a switch. |
| @Mentions, #Tool references, Attachments, Fork history | You choose these yourself, so there is no switch. |
Through the tools#
Not text in the prompt, but what the agent's tools tell it.
| Source | Control |
|---|---|
| MCP servers | The workspace mcp.json plus IZ Code's own servers. Shown only: switching them off would break the agent's tools. |
| Code Intelligence tool instructions | Follows the Code Intelligence master switch. |
| Session tool instructions | Always sent. |
| Tool list | Choose tools in Configure Tools in the chat. |
| Usage notice | A short note when the context window or plan limit runs low. Same switch as Settings → Agents → Usage advice. |
Status and reasons#
Each row shows one status: Active, Nothing to add, Off or On demand. When a source is off, the row says why. Common reasons:
| Reason | What to do |
|---|---|
| Switched off here | Turn the row's switch back on. |
| Code Intelligence is off / Agent Memory is off | Turn on the feature's master switch in its Settings page. |
| Agents are not allowed to use the browser (or Git, Run and Debug, Specs) | Turn on the "Let agents use…" switch in that feature's Settings page. |
| The agent reads this itself | Nothing: the agent loads it natively, so IZ Code does not send it again. |
| Memory injection is not turned on for this agent | Use Turn on memory injection for this agent, or Settings → Agents. |
| Not available in this runtime | The feature is not present where the agent runs. |
| Only one folder is open | Expected: the folders note is only for multi-folder workspaces. |
| Dropped by the size limit | The session context went over its budget. |
Session context has a budget of 32,000 characters. The page shows how much is used, for example "Session context: 12,400 of 32,000 characters". When it is over, sources are dropped from the end of the list first, then the list of changed Git files is cut, then the end of the project instructions.
Debug: see the real message#
-
Turn on Debug In the Debug section of the page, turn on the Debug switch. It is off by default because prompts can contain file contents.
-
Type in the chat input Keep the Settings tab open and the chat visible (not maximized). The Preview tab updates as you type and shows each part: system prompt, memory recall, session context, #tools, @mentions and your message. Nothing is sent to the agent and nothing is remembered.
-
Include memory recall (optional) Tick Include memory recall to search memory for your draft as a real send would.
-
Check what was really sent Send a message to an agent, then open Last sent. It shows exactly what the agent received, with secrets masked. Use Copy, Refresh or Clear.
The preview is an estimate: files you attach with + and #tool references are only read when the message is sent. Last sent is kept in memory only, holds a limited number of recent prompts, and is emptied when you turn Debug off.
Settings#
Each source with a switch has its own key: izcode.context.<source>.enabled, where <source> is the source id. A switch can be set in your user settings or per folder in .izcode/settings.json; the folder wins.
| Setting | Values | Default |
|---|---|---|
izcode.context.instructions.enabled | true, false | true |
izcode.context.gitState.enabled | true, false | true |
izcode.context.workspaceFolders.enabled | true, false | true |
izcode.context.generalToolsGuide.enabled | true, false | true |
izcode.context.codeIndexGuide.enabled | true, false | true |
izcode.context.browserGuide.enabled | true, false | true |
izcode.context.gitToolsGuide.enabled | true, false | true |
izcode.context.runDebugGuide.enabled | true, false | true |
izcode.context.specsGuide.enabled | true, false | true |
izcode.context.teamMemory.enabled | true, false | true |
izcode.context.memoryPersona.enabled | true, false | true |
izcode.context.memorySceneIndex.enabled | true, false | true |
izcode.context.memoryWiki.enabled | true, false | true |
izcode.context.memoryToolsGuide.enabled | true, false | true |
izcode.context.memoryRecall.enabled | true, false | true |
izcode.context.debug.capture | true, false | false |
{
"izcode.context.gitState.enabled": false,
"izcode.context.memoryRecall.enabled": false
}Tips and limits#
- There are no per-agent switches here. Per-agent memory settings stay in Settings → Agents.
- Memory sources show Nothing to add until Agent Memory has stored something for the project.