Long-context mode
Long-context mode lets Magic Coder use a larger context window when the underlying model supports one. It’s the right setting when the task genuinely needs more of the repo in view at once.
When to use it
Section titled “When to use it”Turn on long context when:
- The task touches many files at once — a wide refactor, a cross-cutting renaming, an architectural change.
- You’re investigating something with a lot of relevant code — large monorepos, dense generated code, hairy test fixtures.
- You want the agent to consult more of your conversation history without losing earlier turns to compaction.
Leave it off otherwise. A larger context window is slower and more expensive per turn — using it for a 5-line bug fix is wasteful.
Turning it on
Section titled “Turning it on”Three ways:
- At launch —
coder --allow-long-context. - In the TUI —
/long-contexttoggles it for the active thread. - As a default — set
[generation] allow_long_context = truein~/.magic/config.toml.
The status line shows a long-context badge when the mode is active.
Turning it off
Section titled “Turning it off”Run /long-context again — it’s a toggle. Or remove --allow-long-context from your launch command and start a new thread. Or unset allow_long_context from your user config.
What it actually does
Section titled “What it actually does”Long-context mode tells the BridgeApp engine “this thread is allowed to use the model’s extended context window.” Different models expose different ceilings — some have a normal 200K window and an extended 1M window, others have a single window and the toggle is a no-op.
Magic Coder shows token usage as a percentage in the status line. With long context off, you’re tracking against the model’s standard window. With long context on, you’re tracking against the extended one. The number doesn’t lie — if you watch it climb past 80% you’ll know the conversation is filling up regardless of which mode you’re in.
Long context and reasoning effort
Section titled “Long context and reasoning effort”These dials are independent:
- High reasoning + standard context — deep thought on a focused task
- Low reasoning + long context — fast skim across a large codebase
- High reasoning + long context — the heaviest setting; useful for large architectural decisions
Pick deliberately. Maxing both for every task burns tokens you didn’t need.
What it doesn’t do
Section titled “What it doesn’t do”Long-context mode doesn’t change the agent’s local-tool boundary. Magic Coder still only reads files inside your configured workspace roots, regardless of how much it can pack into one prompt.
It also doesn’t change pricing on its own — the BridgeApp account decides what you pay for. Use the mode when the task warrants it, not as a default.