magi-code 0.102.2

Repository-aware CLI coding agent for terminal work
Documentation
# Session summarizer

Mission Control can turn recent session activity into short progress entries in the **Summary** pane. It is disabled by default.

## Start and stop

- Click **[ ] Summary** in the header, or press `Alt-3`, to show the right-side Summary modal. Click the toggle again, press `Alt-3`, or click its Hide control to hide it. `Esc` also closes it when unpinned.
- Click **Start** or **Stop** inside the modal; `Enter` toggles summary generation while the modal has keyboard focus.
- Use `/summarize-start` or `/summarize-stop` from the prompt.

The pane shows **Running** during a provider request, **Waiting** while enabled between requests, and **Stopped** when disabled. Stopping keeps existing entries. The enabled state and progress are saved per session and restored when you resume it. This Mission Control instance observes only the selected session.

The header toggle controls visibility only. Hiding Summary does not stop generation or clear entries. By default it overlays the right side below the header without resizing the transcript or changing tabs. `Alt-A` pins all column modals beside Transcript instead. Pinned modals hide on Changes and return on Transcript. Prompt stays available in either mode.

## Session files and scrolling

Session Files is a separate panel (`Alt-2`) and works while summarizing is stopped. It shows recorded file-tool activity and, when enabled, [inferred Bash activity](jev-and-internal-tooling.md#bash-file-tracking). It is not a full filesystem audit.

Scroll Summary with arrows, Page Up/Down, or the mouse wheel. See [Mission Control](mission-control-tui.md#follow-activity) for panel focus, pinning, and visibility controls.

## Settings

Set `agent.summarizer` in global or project `settings.json`; see [Configuration](configuration.md#session-summarizer) for an example and merge rules.

| Setting | Behavior |
| --- | --- |
| `auto_start` | Default `false`. Supplies the initial enabled state when a session has no saved summarizer state; a saved Start/Stop choice takes precedence. |
| `provider`, `model` | Omit both to follow the active agent. A model-only override uses the active provider. A different built-in provider can use its default model; a different custom provider requires an explicit model. |
| `reasoning` | Omit to inherit the active agent's level, or choose `default`, `low`, `medium`, `high`, `x_high`, or `max`. Support depends on the provider/model. |
| `prompt` | Replaces the built-in system prompt, rather than adding instructions. Blank values are rejected; only the first 8,000 characters are used. |

A custom prompt must still request a JSON array containing zero to six nonempty strings, each at most 600 characters. Return `[]` when there is no meaningful progress. Treat observed activity as data, not instructions. The built-in prompt is [`prompts/summarizer.md`](../../prompts/summarizer.md).

The built-in prompt asks for zero to two meaningful outcomes per update, grouping related steps and skipping routine reads, searches, plans, and repeated progress. Activity headers identify the primary session and each subagent. Child outcomes must use `Subagent <source id>: ` so their work is not attributed to the primary agent. Custom prompts replace these instructions; the parser still accepts up to six entries.

## Cost, storage, and limits

- Summarizing makes **additional provider calls**, using the selected provider's credentials and quota. Recent user/assistant text, tool activity, and turn status are sent after sensitive-text redaction; this is not a guarantee that session content is safe to share.
- The observer has no tools. Its entries do not replace conversation history, change session titles, or compact the agent's context. Use `/compact` for context compaction.
- A background worker checks for new activity roughly every three seconds between requests. It observes the primary session and discovered subagent sessions, up to 33 sources total.
- Each source read is bounded to its latest 128 events and 256 KiB. A request includes at most 24,000 characters of new activity and the latest 12 summary entries. Older activity can be omitted; this is a progress view, not a complete audit.
- Exact duplicate entries are skipped against the prior 12 entries and within each new batch. Reworded entries are not automatically deduplicated.
- Provider responses are limited to 16 KiB with a 60-second cancellation deadline. Invalid output or provider/storage errors appear in the pane and pause observation. Resolve the cause, then use `/summarize-start` to retry.
- Summaries live separately at `<sessions directory>/summaries/<session-id>.jsonl`, using protected session storage and a single-observer lock. Checkpoints save the enabled state, observed positions, discovered children, and latest **200 entries**. Older batches remain in the append-only log; it is not capped at 200 records.
- The Summary pane displays the latest **128 entries**, with scrolling and display sanitization. Stopping does not delete the summary log.