CODING AGENTS IN YOUR TERMINAL

A coding harness
you can inspect.

Follow tool activity, inspect agent instructions, and review current worktree changes. Configure how agents work, all from your terminal.

Written in RustBring your own modelLocal-first sessions
Mission Control · illustrative catppuccin-mocha
Session: 5a06...d731[Alt-A] Show/Hide Panel

Follow the white rabbit, but take your time.

Useful hotkeys

[Alt-A] Show/hide right panel

[Tab/Shift-Tab] Next / previous pane

[Alt-P] Cycle primary agent

[Alt-1/2] Activity / Summary tab

Useful Commands

/skills Manage global / project skills

/settings Edit settings / model availability

/side Open side-chat agent

/summarize-start | /summarize-stop Start / stop Summary agent

/fast Toggle Fast mode where supported

/compact Compact current session

/update Update Magi-Code

Type a prompt below to begin.

Activity Tree

No activity yet. Type a prompt below.

Session files · R read W written E edited

No recorded file activity.

Activity
Summary
Diff
Mission Control readyCodex 82/100%(w) • [Alt-M] openai-codex/gpt-6-astra [Alt-T] (XHigh) • [Alt-P] Agent: None
Session: 0m00s • 0(in) 0(out) —(cache) • Current Ctx: 0% [.........] 272k • Compact at 80%MAGI-CODE v0.81.0
Follow the white rabbit, but take your time. Welcome screen · HTML / CSS

A little closer to the code

Powerful agents you can follow.

magi-code keeps the conversation, tools, and code changes together in one terminal workspace, so you can follow the work you delegate.

It has a compact core prompt, tools built for coding, and agents you can customize. You can inspect what they do as they work.

Inspect the work as it happensDirect prompts and the workflowOwn your session history and settings

01 / Visibility

See how the work gets done.

Follow the steps, context, and code changes behind an agent's answers.

These HTML excerpts use sample content and the TUI's structure in Catppuccin Mocha.

ACTIVITY TREE

Inspect each tool call.

Activity Tree shows the steps as they happen. Open Selected Activity Detail to inspect a call's status, submitted parameters, and captured output.

1. Select an activity Static · synthetic example
Activity Tree
12:03:10 •  read src/session.ts
12:03:12 •  read src/routes.ts
12:03:14 •  hash_edit src/session.ts
12:03:18 •  bash npm test

In Mission Control, click a row to open a separate detail modal. You can also select a row with / and press Enter.

Expand Metadata / Params to inspect inputs and result metadata. It starts collapsed; this example shows it expanded.

Esc closes the detail and returns you to the tree.

Inside Mission Control
2. Inspect its details Expanded metadata · synthetic excerpt
Selected Activity Detail
Esc close
Status: SUCCESS
Tool • bash • bash npm test
─
▾ Metadata / Params
{
  "metadata": {
    "exit_code": 0,
    "timed_out": false
  },
  "params": {
    "command": "npm test",
    "intent": "Verify session restore"
  }
}
─
Sanitized Output:
stdout:
✓ restores saved sessions
✓ rejects expired sessions
2 tests passed

stderr:
Up/Down · PageUp/PageDown scroll

These views appear in sequence, not as simultaneous TUI panes. The detail excerpt is shortened for space. Captured output has per-tool limits, with credentials redacted and terminal-control sequences sanitized.

TOOL TRANSCRIPT

Follow tool calls in context.

Each tool call has its own card to keep the conversation readable. See what was read and what changed, then use Activity Tree for a closer look.

Transcript cards Static · synthetic example
Read12:03:10
src/session.ts
3 lines
Hash Edit • +1 −112:03:14
Updated src/session.ts
-  return load(id);
+  return loadSaved(id);

Tool cards stay compact in the transcript; Activity Tree has the details.

SESSION FILES

See which files agents use.

See the files your agent reads, writes, and edits through the dedicated file tools, including subagent activity. This can help you understand how it works.

Session files pane Static · synthetic example
Session files · R read W written E edited
├── src/
│   ├── auth.ts R
│   ├── routes.ts R
│   └── session.ts R E
└── tests/
    └── session.test.ts W

A view of captured file-tool activity, not a full filesystem audit. Shell activity and capture limits can leave gaps.

DIFF REVIEW

Review current worktree changes.

Inspect side-by-side diffs with synchronized scrolling. Leave comments on the code, then send unresolved feedback to the agent with #diff-changes.

Read the diff review guide
Diff body + open comment editor Static · synthetic example
Files · /repo
src/
E   session.ts
    [•] D:2 Missing ID?
[Refresh · F5]
Original
1 function restore(id) {2   return load(id);3 }
Diff (old → new)
   1 1 function restore(id) {   2  -  return load(id);[•]  2+  return loadSaved(id);   3 3 }
Comment src/session.ts:2 [•]
[Esc] close
Missing ID?
Handle a missing session before we continue.

A body excerpt: Mission Control keeps its prompt and tab rail outside this view. Scroll horizontally on smaller screens; the three-pane layout stays intact.

02 / Agents

Work with more than one agent.

Your primary agent handles the main task and can delegate independent work to specialists. Open a side conversation when you want to explore another idea.

Conceptual workflow · not a TUI screen YOU
Primary agentYour task and chosen persona
ExploreImplementReview
Subagent transcript card Static · synthetic example
Subagents • 1/2 settled • RUN112:04:02
[g1 explorer ✓] [g2 reviewer ●]
● g2 · reviewer
Review the missing-session case
Tks —(in)| —(out) • Cache —(total)
read • src/session.ts • ✓
reasoning • checking the missing-ID case
[View Subagent ↗]
PRIMARY + PARALLEL SUBAGENTS

Delegate independent tasks to specialists.

Your primary agent is the assistant in the main conversation: it follows your request, uses tools, and coordinates the task. Choose a persona to shape how it approaches the work.

Give subagents their own instructions, models, reasoning settings, and tool restrictions. Live cards show each subagent's intent, recent activity, and progress.

Configure subagents
THE SUMMARY OBSERVER

Read summaries as you work.

Enable the optional observer and choose its model. It writes summaries of changes and decisions in a dedicated panel.

Summary pane Static · synthetic example
Summary
[ Stop ] Waiting · Enter

── Entry 1 · Latest ──
Separated session loading from route
handling. Next: handle missing sessions
and verify the recovery path.

The observer is off by default. It has no tools, makes additional provider calls, and does not replace session history.

How summaries work
SIDE CONVERSATIONS

Ask a question on the side.

Open /side for a separate conversation without the primary session's context. Ask a question or explore an idea while the main task continues.

Side conversations share the working directory, so a side agent can still change the same files.

Use side conversations

03 / Sessions + context

Pick up where you left off.

Return to an earlier conversation or try a different direction. Compaction makes room in context for the next part of the task.

Rewind a session.

Rewind the conversation, captured file changes, or both. Conversation rewind forks history, so trying a different direction doesn't overwrite the original conversation.

File restore covers captured write/hash_edit changes, not shell commands or external edits. Conflicts can be skipped.

Find a saved conversation.

The session switcher previews the first and recent messages, so you can recognize a conversation without relying on its session ID.

Browse saved sessions

Continue as context fills.

Automatic compaction helps primary and subagent sessions continue as context fills. Each subagent manages its own context, with configurable limits on continuation.

Sessions, rewind & compaction

04 / Customization

Configure it for how you work.

Start with a capable coding harness, then adjust its models, instructions, skills, and appearance to suit your workflow.

GLOBAL AND PROJECT SETTINGS

Set defaults. Override them per project.

Manage global and project settings. Enable or disable skills, tools, and subagents for the environment you're working in.

Use repository instructions for local conventions, primary personas for the main assistant, and subagent profiles for specialist work. Choose a theme you like.

Command map · not a Settings screenshot
/settingsGlobal / project settings editor
/skillsGlobal / project skills
/subagentsAvailable specialists
/themeYour terminal palette
Configure magi-code
LOCAL-FIRST, PLAIN FILES

Keep your history locally.

Sessions, settings, checkpoints, and agent profiles live on your machine. You don't need a separate workspace service to store your history.

Default directory structure · not a TUI screen

~/.magi-code/

├── settings.json

├── sessions/ JSONL history

├── agents/ Primary personas

└── subagents/ Specialist profiles

Move the runtime home with MC_HOME. Keep project settings in .magi-code/settings.json inside the working directory.

Local storage is not offline inference: prompts, selected context, and tool results are sent to your configured provider.

Built-in tools

Keep context focused on the task.

The compact core and coding tools help agents find and understand code, make changes, and check their work. Useful defaults let you start without a stack of required integrations.

COMPACT BY DESIGN

Leave room for your code.

The core prompt avoids duplicating provider-native tool schemas. Focused reads, structural search, and bounded output help agents inspect the relevant parts of a repository.

Inspect the assembled prompt and its local token estimate with /system-prompt.

Prompt size grows with your instructions, skills, and profiles. Provider tool schemas are sent separately.

See how prompts are built

Find the relevant code

Use file discovery, bounded text search, and AST-aware code search to find and read relevant lines instead of the whole repository.

Make targeted changes

Anchored edits and file writes return explicit results. Run shell commands to build, check, and investigate.

Research beyond the repository

Search the web, open public pages, and inspect images. Add reusable guidance through skills and external tools through MCP when you need them.

Browse the built-in tools

05 / Jev-native functionality

Give agents bounded judgment.

magi-code integrates TypeSafe Jev for fast, typed semantic decisions. Your main model keeps control of the task; Jev answers focused questions with structured probabilities.

01
AGENT JUDGMENTS

Choice, Score, and Noul as a native tool.

Agents can ask one bounded question to select an option, rate ordered levels, or estimate the probability of yes. Useful for routing, ranking, and verification, not text generation or factual lookup.

questionDoes this change satisfy the request?noul0.91
02
BASH PROTECTION

Assess commands before execution.

Jev scores operational risk. Commands above your selected threshold, or with insufficient confidence, stop for approval.

03
PROSE PROTECTION

Check comments and documentation.

Before file changes run, Jev can identify prose and reject writing that needs a clearer, more natural revision.

04
PROMPT INJECTION PROTECTION

Inspect untrusted tool output.

Selected tool results can be checked for agent-directed instructions, injection likelihood, and impact before they enter model context.

05
COMPLETION VERIFICATION

Check the answer before it ships.

Jev compares a proposed response with current-turn evidence. It can flag incomplete work, unsupported claims, unresolved blockers, or scope drift.

06
COMPACTION VERIFICATION

Keep important context through compaction.

Before a compacted summary becomes active, Jev can check that it preserves goals, decisions, changes, failures, and next actions without adding unsupported claims.

Goals Decisions Changes Next actions

Bring your model

Choose a model for each agent.

Use your existing provider access and choose models for the primary agent, specialists, and optional summaries.

Codex

Connect your Codex-enabled ChatGPT account through browser OAuth. See quota windows and reset times in Mission Control.

/login openai-codex

Anthropic

Bring your Anthropic API key and choose an available Claude model. Use the same workspace, tools, and session controls.

Your Anthropic API key

OpenAI-compatible

Configure an API-root base URL and an optional key from an environment variable. Connect compatible hosted services or local endpoints.

Your endpoint and models

Research in the same workspace.

With Codex active, web search uses the Codex backend. Other providers use Exa with EXA_API_KEY. Public URL opening needs no search key; explicit shell curl handles custom HTTP work. These are distinct paths, not automatic fallbacks.

Provider setup

Before your first prompt

Common questions.

What do I need to get started?

You need Rust 1.88 or newer, Cargo, a terminal, and a supported provider account or API key. Install magi-code, launch it in a repository, and connect your provider. Built-in file, search, edit, and shell tools are ready without MCP setup.

Is my code kept entirely on my machine?

Your session history and configuration are stored locally. Inference still sends prompts, selected repository context, and tool results to the provider you configure. Optional summaries and compaction also make provider calls.

Can I undo everything an agent does?

Rewind can fork the conversation and restore captured file-tool changes. It is not a complete worktree backup: shell commands, external edits, unsupported paths, and conflicts limit what it can restore. Keep using version control and backups.

Do I have to use subagents or the extra panels?

No. Work with a primary agent and a clean transcript, or enable the panels and specialists you need. The Summary observer and Herdr reporting are opt-in.

Where are the detailed guides?

Start with the user guide on GitHub for setup and everyday workflows. The technical reference covers exact settings, integrations, and limits.

Start a session

Follow the
white rabbit.

Open your repository and connect your model. Tell magi-code what you're working on.

Read the getting-started guide
Terminal · Rust 1.88+ & Cargo
# Install the latest release
cargo install magi-code --locked

# Open a repository and start
cd /path/to/your/repository
magi-code

Connect your provider with /login in Mission Control. Setup guide

magi-code can edit files and run commands. Shell guardrails are not an OS-level sandbox.