Agent Monitor
Every session on this computer beside one prompt that starts new sessions or sends to the ones you tag.
The Agent Monitor is for running several agents at once. It lists every session on this computer on the right: the ones waiting for you, running, completed and failed. The prompt in the centre starts a new session, or sends to the sessions you tag with @.
Opening it
- Press ← on an empty prompt (no text and no attachments), on the home screen or in a session. With text in the prompt, ← moves the cursor as usual. In a subagent session ← still goes to the previous subagent, and in the diff viewer it still collapses.
- Type
/monitor, or press<leader>o(agent_monitorin keybinds). - Esc or →, with the prompt empty, takes you back to where you were. With the list focused, Esc always does.
To stop ← opening it, set "left_opens_monitor": false in tui.json. /monitor and the keybind still work.
The list of sessions
The list shows the same sessions as /sessions: every project, every Lunos running on this computer, Claude Code and Codex sessions, and background subagents under the session that started them. It’s in three sections, always in this order and each with its count, the same as the sidebar’s Subagents section:
- Working: running sessions.
- Waiting for action: a session asking for approval or with a question. The row shows what it asks, for example
approve: bash git push origin main. - Completed: failed ones first, then those finished or idle in the last 24 hours. Older ones are behind Show older.
Click a section’s header, or select it and press Enter, to collapse or expand it. A collapsed section says what it holds, for example ✕ 1 failed · ✓ 2 done, and an empty one shows (0), dimmed. Completed starts collapsed when it holds more than three. What you choose is remembered across restarts. Waiting for action opens itself again whenever a new ask arrives, so a waiting session is never hidden. A collapsed section’s sessions keep their numbers, so @n still reaches them.
Each row has a number, the title, the project, the agent (or Claude Code / Codex), a state symbol, the time since its last activity and its cost. The symbols are ! waiting, » running, ○ idle, ✓ finished and ✕ failed, so the state is readable without colour (NO_COLOR). A row that starts waiting moves to the top and is highlighted for a moment. With reduced motion it isn’t highlighted.
Press Tab to move between the prompt and the list. In the list:
| Key | Does |
|---|---|
| ↑ ↓ | Move, across the sections and their headers |
| Enter | Open the session, or collapse or expand the selected section |
a | Approve what the session asks (once) |
d | Deny it, or dismiss its question |
s | Stop the session, after you confirm |
x | Delete the session for good, after you confirm (as Delete in /sessions) |
/ | Filter by title, project, state, agent or tool |
o | Show or hide completed sessions older than 24 hours |
t | Take over a session whose Lunos closed with prompts queued (shown only then) |
An approval given here goes to the Lunos that runs the session, which checks it and writes it to its audit log, as if you’d answered it there.
stop all and clear list in the list’s header work as in /sessions, on the sessions the list shows (with its filter): Stop all stops every running or waiting one, and Clear list archives the finished, idle and failed ones after a confirmation that counts them. Archived sessions aren’t listed; /sessions → “show archived” brings them back. Both have no key by default: click them, press Tab and then Ctrl+P (with the list focused, Ctrl+P opens the command palette), or bind monitor.stop_all and monitor.clear.
In a terminal narrower than 100 columns, the list takes the whole screen. Tab switches between it and the prompt, and what you’ve typed stays.
Starting a session
Type a prompt with no tag and press Enter. A new session starts in this project with the current agent and model, and appears under Working. You stay in the monitor, ready for the next one. Ctrl+P picks another project from the ones in the list.
Sending to a session
Tag a session with @ and its number: @2 run the tests sends “run the tests” to session 2. Type @ and part of a session’s title to pick it from the sessions at the top of the suggestions; files and agents are suggested below them as usual. Above the prompt, you see the session you tagged and its last message.
Numbers stay with their session while the monitor is open, even when the rows move, so @2 keeps meaning the same session.
What happens to the prompt depends on the session:
- Idle or finished: it runs as the session’s next turn.
- Working: it’s queued, and sent when the current turn ends. The row shows how many prompts are queued. Ctrl+Enter stops the turn and sends it now, ahead of the queue. Ctrl+Enter needs a terminal that reports it separately from Enter (kitty, WezTerm, Ghostty, iTerm2 with CSI u). In others it is just Enter, and the prompt is queued.
- Waiting for an answer to a question: the prompt is the answer, when the question takes a typed answer.
- Waiting for an approval: the prompt is queued. A prompt never approves or denies a tool call: press
aord. - Run by another Lunos on this computer: that Lunos receives it and runs it, with its own agent, permissions and organisation policy. A session is never run by two Lunos processes at once.
- Its Lunos closed in the middle of a turn: you’re asked “Take over this session here?” before it runs in this Lunos.
- Its Lunos closed with prompts still queued for it: see Queued prompts when a Lunos closes.
- A Claude Code or Codex session with no Lunos session: open it to send to it.
Tag several sessions to send the same prompt to each. You confirm first (“Send to 3 sessions?”).
Queued prompts when a Lunos closes
The Lunos that runs a session keeps the prompts queued for it in a file under your data directory that only your OS user can read, so they aren’t lost when that Lunos quits, crashes or is killed. The prompt text is kept only there: it isn’t written to any log, and the audit log records counts and ids, never the text.
When that Lunos has closed, its session shows 2 queued (owner closed). Nothing sends those prompts on its own. When you next send a prompt to the session, from the Agent Monitor or typed in the session itself (in the terminal, the desktop app or the web UI), you’re asked “Take over this session here?”, with how many prompts are queued and a choice:
- Send them first: they run in this Lunos, one turn each, in the order they were queued, and then your prompt.
- Discard them: they’re deleted, and only your prompt runs.
- Cancel: nothing is sent, the prompts stay queued, and what you typed stays in the prompt.
To send just the queued prompts, without a prompt of your own, select the session in the list and press t (Take over on the row in the desktop app and the web UI). You choose Send 2 queued prompts (the default) or Discard them, or cancel. Sent, they run in this Lunos in the order they were queued, and the session is run by this Lunos from then on. The key is monitor.takeover in your keybinds.
Each prompt is sent at most once. It leaves the closed Lunos’s file before it’s sent, so if a Lunos crashes in the middle of a take-over, a prompt is never sent twice, but the one prompt being moved at that moment can be lost. The ones not yet moved stay queued for the next take-over.
Deleting a session (on its own, with Delete archived, with lunos session delete or through the API) also deletes the prompts queued for it, from every Lunos’s file; the confirmation says how many. Archiving a session keeps them: unarchive it and take it over to send them.
A Lunos that is still running but not responding (for example, a suspended one) keeps its prompts: the take-over is refused until it has closed.
In the desktop app and the web UI
The Sessions window of the desktop app, and /sessions in the web UI, have the same layout. The list on the right is sorted By status into the same four sections, each with its count, and every row has its number. A waiting row shows what it asks, with Approve and Deny (or Dismiss for a question). By group shows your session groups as before; the search, the filters, Stop all and Clear list work in both. The window remembers which one you used last.
The prompt in the centre works as in the terminal:
- With no tag, Enter starts a session in the project picked under the prompt and keeps you in the window. The project starts as the one of the most recently active session in the list.
@2sends to session 2. Typing@and part of a title or project lists matching sessions; ↑/↓ and Enter pick one. Clicking a row’s number adds its tag. Each tagged session shows as a chip above the prompt, and the chip’s × removes the tag.- Ctrl+Enter (⌘+Enter on macOS) interrupts a running session and sends now. Shift+Enter starts a new line.
- Sending to several sessions asks first, and a session whose Lunos closed asks “Take over this session here?”.
The prompt sends text only. To attach files or pick an agent or model, open the session.
Safety
- Each prompt sent to an existing session is written to the audit log of the Lunos that runs it, as
session.promptwithorigin: "monitor", the session and how it was delivered. The text of the prompt is never logged. - Lunos processes on this computer reach each other only on
127.0.0.1, with a random token in a file only your OS user can read. Requests from a browser are refused. - The receiving session’s organisation policy and data-residency rules apply, exactly as if the prompt had been typed in it.