Skip to content

Agents and approvals

  • ⇧ ⌘ T opens an agent in the current project, using the one you last used there (Claude Code by default).
  • In ⌘ K, type a request and press ⇧ ↩ to start an agent with it as the first prompt.
  • Typing claude or codex in a midna shell works too: midna picks it up as an agent terminal in place.
  • Agents can start other agents: midna open --agent claude --prompt "…".
  • Triggers can start agents from GitHub and Bitbucket events.

When midna starts an agent, it passes everything on the command line. Your global Claude Code and Codex config isn’t touched.

  • Claude Code gets --settings with midna’s hooks (turn start and end, tool calls, permission dialogs, and a rules check before each tool call), midna’s status line for cost tracking, the MCP server, and a two-line system prompt hint that it’s running in midna.
  • Codex gets -c notify=… so midna hears when a turn ends, plus the MCP server and the same hint.
  • Every terminal gets MIDNA_SESSION, MIDNA_PROJECT and MIDNA_SOCKET in its environment and the midna CLI on its PATH.

If you’d rather have the hooks in your global config, the Hooks item in the status bar can install them in one click. They do nothing outside a midna terminal.

Anything only you can answer goes to Needs you. The terminal’s row turns orange with a line saying why, the N need you button shows at the top of the sidebar, and midna can post a notification.

  • The terminal you’re looking at shows its approval along the bottom. ⌘ ↩ approves, ⌘ ⌫ denies.
  • ⌘ J goes through everything waiting, one card at a time, oldest first.

The Needs you screen: everything waiting listed on the left, with an agent’s question open on the right

Item What it is ⌘ ↩ ⌘ ⌫
Approval A rule said ask, or an agent asked for a human-only action Approve Deny
Permission prompt Claude Code is showing its own permission dialog. Codex’s approval prompts aren’t queued yet: answer them in its terminal. Approve Deny
Blocked An agent can’t continue without you (midna attention) I’ve done it Dismiss
Failed A monitor or agent exited with an error Restart Dismiss
Rule removal An agent asked you to remove a rule Remove Keep
Trigger A trigger needs its secret, or is waiting to start Open / Start Dismiss / Deny

Answering a permission prompt from midna presses the key in the agent’s dialog for you, after midna has seen the dialog on screen.

The arrow next to Approve has longer options. Each adds an allow rule for exactly what was asked:

The approve menu: once, 15 minutes, 1 hour, this session, always

Option Rule it adds
Once None
15 minutes, 1 hour An expiring rule for this terminal
This session A rule for this terminal
Always A rule for the whole project

When an agent calls something only you may do, like removing a rule or enabling a trigger, the card shows the exact call that approving will run. If what it points at has changed before you answer, approving fails rather than running the new version.

Agents can’t approve requests unless you turn on approve.from_cli, and even then only their own terminal’s, never a human-only action. An agent blocked on an approval waits up to 5 minutes (policy.request_timeout_secs).

  • Prompt history. Claude Code and Codex draw their own screen, so their conversation isn’t in the scrollback. ⌥ ⌘ ↑ / ↓ scrolls the agent’s view to your previous or next prompt, and ⌘ P lists them to jump to.
  • Queued messages. Queue a follow-up and midna types it once the agent is ready: idle, not waiting on you, nothing in its input box. A message can also wait for a time or for another terminal to finish (midna queue add --after <id> "…").
  • Images. ⌘ I, or pasting a screenshot, attaches images to the next message. Click to drop numbered pins or drag to mark an area, with a note for each.
  • Session links. ⌘ L lists the URLs, pull requests and files that came up in the conversation.
  • Restart into the same conversation. The restart button (or midna restart <id>) reopens the agent with claude --resume / codex resume. When a newer Claude Code is installed, midna restarts idle terminals into the same conversation (agents.restart_on_update).

Claude Code’s spend comes from midna’s status line and shows per turn. Codex doesn’t report cost. Insights (⇧ ⌘ I) charts turns, messages, spend, approvals, and how long each agent worked versus waited on you, by day, week or month, with an activity log you can filter.

Terminal window
midna insights --range week --by project