Agent view

The terminal's screen for work that runs while you keep talking. It shows everything running in this terminal, grouped by what it wants from you: the background tasks of the conversation you are in, and sessions started beside it. The sessions saved on this machine follow as history, and a box at the bottom starts a new session. From here you can read any of it, message it, stop it, or move the window to another session.

 Agents  1 needs input · 2 working · 2 tasks · 14 sessions          Esc back

  Needs input · 1
  ❯ ? Publish the docs  session · a permission question is open          1m

  Working · 2
    ● general: Refactor the parser  a1f3 · Read src/parse.ts            2m
    ● Bump the dependencies  session · Bash(npm outdated)              40s

  Completed · 1
    ✓ bash: npm test  9c02 · exit 0                                10m ago

  Recent sessions
    ◆ Fix the login redirect  this one · 12 turns                   just now
    · Dark mode toggle  k9x8 · 4 turns · site                         3h ago

╭──────────────────────────────────────────────────────────────────────────╮
│ › Start a new session in the background…                                 │
╰──────────────────────────────────────────────────────────────────────────╯
 ↑↓ select · Enter open · Tab reply · ^X stop · type to start a session · Esc back

Opening it

FromDo
A shellRun oharness agents
An empty input boxPress ←
Anywhere in the terminal UIType /tasks

oharness agents is the ordinary interactive start, opened on the view instead of the conversation, so it takes the usual options: oharness agents -c opens the last conversation in this directory with its background tasks, and oharness agents -r <id> a given one. It takes no prompt; type one in the box instead. Without a terminal to own (piped input, CI) it exits with code 2.

Close it with Esc or ← while the box is empty, or Ctrl-C (which, here, does not quit). The conversation keeps running underneath: a reply that is streaming goes on streaming, and is there when you come back. A permission question still opens over the view, as it does over the conversation.

The line-based terminal (piped input, CI, OHARNESS_NO_TUI=1) has no agent view; /tasks there prints the conversation's tasks as text.

Starting a session

Type in the box and press Enter. A new session starts with that as its first message and runs beside the conversation in the window, in the same directory, with the same model and permission mode. It appears under Working straight away, the window stays where it was, and you can start another.

Opening the view creates nothing: the window's own conversation is listed only once something has been said in it, and a session is saved on its first message, not before. A session started from the box is an ordinary saved session: it is in /sessions, and oharness --resume <id> reopens it. While it runs, its permission questions open over whatever is on screen, named for it, and it sits under Needs input until they are answered. When its turn ends it moves to Completed, showing its recap or the start of its last reply; Enter then moves the window to it.

Sessions started here run in this process, so they stop when the terminal closes: a turn that is still running is interrupted the way Ctrl-C would interrupt it, and what it had done is kept.

Groups

Every row lands in one group, whatever kind it is. A group with nothing in it is left out.

GroupHoldsOrder
Needs inputTasks and sessions with a permission question open, including one queued behind another questionOldest first
WorkingRunning and queued tasks; sessions running a turn, this window's includedOldest first, so rows hold still as new ones arrive
CompletedTasks and sessions that finished, failed or were stoppedLatest first
Recent sessionsThis window's conversation while it is idle, once it has a message, then the twenty most recently used sessions on this machineMost recently used first

Each row shows its mark (? needs input, ● running, ○ queued, ✓ done, ✗ failed, – stopped, ◆ this window, · history), its name, then:

  • for a task, its id (what /tasks <id> and the model call it), and the tool it is using now or the first line of its result or error;
  • for a session started here, session, and the tool it is using now or how it ended;
  • for history, its id, its turns and, when it is from another directory, that folder's name.

The right edge says how long it has run, or how long ago it ended or was last used. The cursor follows what it is on when that moves to another group.

Keys

Typing always goes into the box, so letters are never commands here.

KeyDoes
↑ ↓Select a row
Text, then EnterStart a session with it
Enter or → on a task, or a running sessionOpen it: the lower half of the screen shows its conversation (a shell command's output), newest last, following it live. Again to close.
Enter on another session that is not runningMove the window to it: its conversation is drawn in the transcript and the next message continues it
Enter on this window's conversationBack to it
Tab, text, EnterReply to the selected task or session. Something running reads it at its next step; something that has ended runs again with it. Shell commands take no messages.
Ctrl-XStop the selected task or session
Ctrl-DHide an ended task or session. Nothing is deleted: a task is still read with /tasks <id>, a session stays under Recent sessions.
EscClear the box, or leave the view when it is empty

A window will not switch while a turn is running in it, since the rest of that turn would land in the wrong transcript. The session it leaves keeps nothing running that you cannot see: its background tasks are written down as they stand and come back when it is opened again.

When background tasks end while nothing else is running, the model gets a turn to read their results, and the transcript says so with a line ending in ← to view.

Commands

The view is a screen over commands that also work on their own:

CommandDoes
oharness agentsStart on the agent view
/tasksOpen the agent view (prints the list in the line-based terminal)
/tasks <id>Print the tail of one task's conversation
/tasks send <id> <text>Message a task
/tasks stop <id>Stop a task
/sessionsPrint the recent sessions and their ids
/agentsList the subagents that can be run, not the ones running

Not yet

Everything here runs in the terminal's own process and stops with it. Sessions that run on after the terminal closes, started with something like oharness --bg, are planned and not available yet.