Agents
Agents and models
Magnum runs four agents: Claude Code, Codex, Pi and OpenCode. Each keeps its own sign-in, shared with the same agent in your terminal. A session runs one agent, and one picker in the message box chooses both the agent and its model.
Picking the agent and model
The model picker is the first picker in the message box; until the agent has listed its models, it shows the agent's name. Its menu has, in order:
- Magnum: Auto, which lets Magnum Router pick the model and effort for each message. The picker then shows Magnum Auto.
- The agent's newest model of each family.
- Agents: Claude Code, Claude Code through each other provider you've set up (Claude Code · OpenRouter, for one), Codex, Pi and OpenCode, the one in use ticked. API keys… opens Settings → Accounts, where a provider's key is added.
- The agent's older models. (Pi's and OpenCode's models come by provider instead.)
- Advisor, for Claude Code on your Anthropic sign-in: one of the strongest models for its turns to consult, or No advisor. A graduation cap on the model's button says one is on.
Picking another agent switches an empty session at once. A session with a conversation stays on its agent, and Magnum offers a new session instead, with or without context (the latest prompts and replies, about 4,000 characters). Either way, new sessions in the project use the agent you picked.
New sessions start on Settings' defaults, a page per agent: Settings → Claude Code (Model, Permission mode, Effort), Settings → Codex (Model, Mode, Effort), Settings → Pi (Model, Thinking, Mode) and Settings → OpenCode (Model, Mode). Left alone, Codex starts on its own configured model in Auto mode (or, when Codex doesn't list that model for your account, on the first one it lists), and OpenCode on its own configured model, asking first. Codex's and OpenCode's pages list the models once a session of theirs has started in the window. A session you reopen, after a restart too, goes on with the model, effort and permission mode it was on (the mode that asks nothing is confirmed again, and a Ship session goes on in Auto).
Signing in
When an agent isn't signed in, its session shows a card above the message box:
- Claude Code: Claude account (a Pro, Max, Team or Enterprise subscription) or Anthropic Console (billed for API usage). The page opens in your browser; if it shows a code, paste it into the card.
- Codex: ChatGPT account, in your browser, or an OpenAI API key in Settings → Accounts.
- Pi: Sign in… (an API key or an account, through Pi's own sign-in), or In the terminal, where you type
/loginand then quit Pi. - OpenCode: in a terminal,
opencode auth login. OpenCode Zen's free models need no sign-in.
Signed in, Claude Code and Codex sessions start again and say as whom. On another machine, the agent signs in there, from your browser here.
A Claude account through Pi is billed per token as extra usage, not from your plan: Magnum asks once before Pi uses it.
Accounts
Settings → Accounts lists everything your agents sign in to, and the keys you hold, by agent: Claude Code's own sign-in and any Claude accounts you add, the ChatGPT account Codex is signed in to, Pi's and OpenCode's sign-ins, the API keys you've saved, and this Mac's sign-in for your other machines once you've given one. A Claude account shows its organization and plan, and how much of its 5-hour and weekly limits is used once a session has reported them.
Add account → Claude account signs another Claude account in: the page opens in your browser, and the account is listed once you've approved it there. If the page shows a code instead, copy it and click Paste code. An added account's menu signs it in again or removes it; removing signs it out on this computer and leaves your sessions as they are.
With more than one account, a picker under the message box, beside where the session runs, shows the account the project is on. Pick another there and the project's sessions go on with it: one that isn't working starts again on that account and keeps its conversation, one that is working changes when its turn ends. A project remembers its account; one that never picked uses the account you picked last. A worktree, and Balanced's workers on every machine, run on their project's account: one account for the whole run.
Every account shares one setup: your settings, skills, plugins, commands and the MCP servers you added for all projects, and one history, so a session started on one account opens and continues on another. Each keeps its own sign-in, and its own word on which of a project's .mcp.json servers are approved.
When an account's limit is reached, its session says when the limit resets, as before. Nothing moves to another account by itself: pick one under the message box and the session takes up where the limit stopped it.
Accounts are for Claude Code on your Anthropic sign-in; sessions on another provider sign in as before.
On another machine an account signs in there once. The first session on it there shows the sign-in card, with the page opening in your browser here. Balanced, readying a machine where the run's account isn't signed in, asks on its row: Sign in opens a session there with that card, and once you've signed in the session closes and the machine is ready. Claude Code's own sign-in works there as before: the machine's own, or this Mac's sign-in for your other machines.
Other providers and API keys
Claude Code can run other models through an Anthropic-compatible endpoint. In Settings → Accounts, Add account → API key, pick OpenRouter, Ollama (this Mac, or this computer on Linux), DeepSeek, Z.ai GLM, Moonshot Kimi, MiniMax, Alibaba Qwen (Model Studio) or Custom, then fill in its Base URL, API key, the models Claude Code's opus, sonnet and haiku run as there, and any more variables (NAME=value, one per line).
Setup guide opens the provider's own instructions. Save and test saves it and asks the provider for a one-line reply. Once it's saved with its key (or needs none), it's listed under API keys on the Accounts page, where Edit opens it again, and it's in the model picker. On another provider the picker leaves out Anthropic-only models, and no cost or five-hour limit shows.
OpenAI, for Codex, in the same menu, takes an OpenAI API key, which Magnum's Codex sessions then use instead of the ChatGPT sign-in.
Keys stay in this computer's credential store (the Keychain on a Mac), never in Magnum's settings.
Installing an agent
⌘P → Set up this Mac… (Set up this computer… on Linux) lists Claude Code, Codex and Pi with their versions, and installs a missing one with its own installer, into your home folder, without sudo.
On a machine you added, a session whose agent is missing there offers to install it there: Claude Code, Codex, Pi (which needs Node.js 22.19 or newer there), or OpenCode. Set up this Mac doesn't list OpenCode yet: install it with curl -fsSL https://opencode.ai/v2/install | bash. Magnum finds it in ~/.opencode/bin. When Pi is missing or needs an update, Settings → Pi offers to do it in the project's terminal.
Pi's settings and library
Settings → Pi (or ⌘P → Pi settings) has:
- The
piMagnum runs, its version and its Node. - New Pi sessions' Model, Thinking and Mode.
- The providers Pi's
models.jsonadds, as they are, with Open models.json.
Pi's sign-ins, which Pi keeps in ~/.pi/agent/auth.json for pi in the terminal too, are on Settings → Accounts: each provider it's signed in to, how it's billed, and Sign out; Add account → Pi sign-in… signs in to another.
With a project open, Settings → Skills lists Pi's skills after Claude Code's, and Settings → Agents & commands lists Pi's prompt templates beside Claude Code's agents and commands, and Pi's packages, which install, update and remove in the project's terminal.
OpenCode
OpenCode works with OpenCode 1 and 2. Its modes:
- Ask first: Magnum asks before each command, file change and web fetch, with the change's diff. Always allow is offered.
- Plan: OpenCode's plan agent, which also asks first.
- Don't ask: Magnum allows what OpenCode asks.
A mode switch takes effect at once. A message sent while OpenCode works waits above the message box as Queued and goes out when the turn ends; Stop ends the turn. When Magnum quits, OpenCode keeps working in Magnum's node, and the session is picked up again when Magnum starts. Past sessions are listed under OpenCode's own titles.
Settings → OpenCode has where it is and what its new sessions start with; Settings → Accounts lists its sign-ins.
Not yet for OpenCode: rewinding, and signing in from Magnum.