Description
What happened
An OmO pane reads READY or DONE in the sidebar and composer while the agent is working, and never reads RUN. Nothing changes when a turn starts, when it ends, or while OmO's background tasks run and later wake the session by themselves.
Three live OmO panes were watched for about three minutes, read-only and once a second: session.snapshot, a pane.agent_status_changed subscription for every pane, pane.read of the visible screen, and GET /api/session.
| What was read | Result |
|---|---|
| Screen | all three panes went back and forth between ── • Working (8s • esc to interrupt) ── / ── • Running eval (47s • esc to interrupt) ── and the resting prompt, several times each |
herdr agent / agent_status |
claude / idle in every sample |
pane.agent_status_changed frames |
0 |
GET /api/session |
omo / done for two panes, omo / idle for the third, unchanged; never working |
One of the panes had a background task child running for 21 minutes. Its main turn ended and started again by itself during the watch, and nothing changed anywhere.
Excerpt of the watch log (one row per change; raw is herdr, served is GET /api/session, fg is the screen's status line, bg counts task rows reading · running ·):
{"t":"20:38:23.160","k":"sub-started","panes":["w2W9:p1","w2WD:p1","w2WE:p1","w2WG:p1"]}
{"t":"20:38:23.262","k":"state","pane":"w2W9:p1","raw":"claude/idle","served":"omo/done","fg":"• Running eval (• esc to interrupt)","bg":1}
{"t":"20:38:23.268","k":"state","pane":"w2WE:p1","raw":"claude/idle","served":"omo/idle","fg":"• Working (• esc to interrupt)","bg":0}
{"t":"20:38:53.860","k":"state","pane":"w2WE:p1","raw":"claude/idle","served":"omo/idle","fg":null,"bg":0}
{"t":"20:38:57.918","k":"state","pane":"w2WG:p1","raw":"claude/idle","served":"omo/done","fg":"• Working (• esc to interrupt)","bg":0}
{"t":"20:40:59.014","k":"state","pane":"w2W9:p1","raw":"claude/idle","served":"omo/done","fg":"• Working (• esc to interrupt)","bg":0}Environment and frequency
- Observed on 2026-10-02 KST.
- herdr web ui 0.3.40, revision
ef900557aa725845dfea1013b468538baf20b2d4, managed installation. All links below point at that revision. - herdr 0.9.0, protocol 22. OmO 5.1.7 (engine senpi 2026.9.30). Linux x86_64.
- Every OmO pane, every turn: 3 of 3 panes, 0 status frames in the watch.
- The last working version is unknown. The header of
server/completion.tsrecords that OmO 5.0 still producedpi/working→claude/unknown→claude/idle.
Confirmed cause
1. herdr sends no status for an OmO pane
agent.getfor an OmO pane answersagent: "claude",agent_status: "idle"and noagent_sessionwhile the screen showsRunning eval. The subscription delivers nothing.pane.process_infolists two foreground processes:bun …/omo-ai/node_modules/@code-yeongyu/senpi/dist/bundle/cli.js --extension …/omo-ai/pluginand OmO's SDK childclaude.- OmO starts that child as
claude --output-format stream-json --input-format stream-json … --setting-sources= --permission-mode dontAsk … --resume=<id> --fork-session …. With--setting-sources=empty the user's Claude settings are not loaded, so herdr's Claude hook (~/.claude/hooks/herdr-agent-state.sh, registered forSessionStartonly) never runs in it. The child is started anew between requests: its pid changed during the watch. herdr integration statusreportspi: not installed, and herdr has no OmO integration.- Not established: why herdr settles on
idlerather thanunknown. That is inside herdr.
2. The server has no other source of status
Status reaches the browser from herdr only:
- events:
startStatusCollector→onStatus→completions.observe→pane-statusandpush.onStatus - snapshots:
completions.readSnapshot(sessionSnapshot, labelOmoPanes)inGET /api/session, the WSsnapshotandserver/machines.ts
CompletionTracker.settle turns an idle that follows work into done and keeps it until the pane works again or herdr's focus moves onto it (seen). With no later frame, done stays. Fed the sequence from the file's header, an in-memory new CompletionTracker(null) gives:
pi/working -> working | claude/unknown -> working | claude/idle -> done
every later snapshot with claude/idle -> done, done, done
a pane that never worked, claude/idle -> idle
The installation's completions.json held "finishedAgents": {"w2W9:p1":"claude","w2WG:p1":"claude"} for the two panes that read DONE, so an idle after work under the claude identity did happen once in each. That it happened at session start is inferred from the header comment; it was not observed in this watch.
3. Nothing reads OmO's own state
labelOmoPanesonly renames the pane toomo.- OmO's wake messages are
custom_messageentries withdisplay: false, whichserver/transcript-records.tsskips. - No code reads OmO's background task records.
What the user sees
- Sidebar, palette, composer: an OmO pane never reads RUN (
STATUS_WORD,Composer.tsx). - Held queue and Stop: a message sent while OmO works is sent at once instead of being held, and there is no Stop. Both need
agentStatus === "working"(PaneTerminal.tsxL1029, L1056). - Chat: the running turn is not shown as live (
isLiveWorkTurn), andstatusEdgeReadnever asks for an immediate read. The 2 s poll still runs. - Alerts: no done alert when a turn really ends, in the browser or by web push (
shared/notify-policy.ts,server/push.ts). If the inference above holds, one DONE appears shortly after the session starts, while the agent is still working. - DONE that stays: it clears only when herdr's focus moves onto the pane. A pane herdr already had focused (
w2W9:p1) read DONE throughout. - Background work: a main turn that ended while
taskchildren, monitors or background terminal sessions are still running looks the same as a session with nothing left to do, and the turn those wake later is not shown either.
What OmO records that a fix can read
All of this was read from live OmO 5.1.7 sessions. What was not verified is marked.
Which session a pane holds (already resolved)
omoTranscriptForPane finds the pane's session file through heldSessionIds: ~/.omo/agent/sessions/<cwd slug>/session-holders/<session id>/<pid>.json holds {"pid","bootAtMs","processStartedAtMs","cwd"} for the OmO process that pane.process_info names.
Whether the main turn is running: the session .jsonl
~/.omo/agent/sessions/<cwd slug>/<timestamp>_<session id>.jsonl, one entry per line:
{"type":"message","id":"…","parentId":"…","timestamp":"…","message":{"role":"user",…}}
{"type":"message",…,"message":{"role":"assistant","stopReason":"toolUse","content":[{"type":"thinking"},{"type":"toolCall"}]}}
{"type":"message",…,"message":{"role":"toolResult","toolCallId":"…","toolName":"eval"}}
{"type":"message",…,"message":{"role":"assistant","stopReason":"stop",…}}
{"type":"custom","customType":"senpi.hooks.stop-state",…}
{"type":"custom_message","customType":"omo-senpi:wake","display":false,"content":"task completion name:… status:completed …"}- An assistant entry is appended when that message is complete. While a tool runs, the last message entry is the assistant one with
stopReason: "toolUse"; thetoolResultentry follows when the tool returns. stopReasonover the three largest sessions:toolUse562,stop119,error25,aborted1.- A turn often starts with no
userentry. Of 143 turns that followed a finished one, 39 began with auserentry and 104 with an assistant entry, started by acustom_message: a finished background task (omo-senpi:wake), a monitor (senpi-monitor:notification), a background terminal session (senpi-terminal:notification),goal-continuation,senpi.todo-owed. A rule of "working when the last entry isuserortoolResult" misses the first request of those turns. - After a finished assistant message come bookkeeping
customentries (senpi.hooks.stop-state,goal-cache-warmup,omo-memory:accepted-turns,omo-memory:projection-pin). They do not start a turn.customclaude-sdk-oauth-bindingis written a few milliseconds before each assistant entry, so it is no start signal either. stopReason: "error"is not always the end: 8 of the 25 were followed bysenpi.hooks.stop-stateand agoal-continuationmessage, and the session went on.- Not verified: the full list of
custom_messagetypes that start a turn. Some are attached to a turn that is already running (omo-kibitzer:recall,environment-context), andomo-memory:noticemay be written with no turn at all. Check each type against a live OmO before treating it as a start. - The files are large (3.5 MB seen): read the tail, not the whole file.
Background children: the task records
<cwd>/.omo/senpi-task/tasks/st_*.json, one per task child:
{"task_id":"st_01a0f91c","status":"running","residency_state":"resident","parent_session_id":"01a0f88b-…","root_session_id":"01a0f88b-…","depth":1,"execution_mode":"process","created_at":"…","started_at":"…","updated_at":"…","name":"…","task_summary":"…","category":"deep-low"}- Seen
status:running,completed,cancelled. Seenresidency_state:resident,rpc_detached,disposed. Other fields includeterminal_at,host_pid,owner,notification. parent_session_idis the session id in the.jsonlname, so running children can be counted per pane.- A record goes from
completedback torunningwhen the child is resumed. - Not verified: whether a session that crashed leaves
runningrecords behind. Checkhost_pid/ownerbefore counting a record as live. - Monitors and background terminal sessions (
◉ watching 3: …in the footer) are not in these records. No file for them was found; not searched for exhaustively.
The screen, as a fallback only
- Main turn: the divider above the prompt reads
── • Working (8s • esc to interrupt) ──or── • Running eval (47s • esc to interrupt) ──, and is a plain rule at rest. - Children: one footer row each,
⠹ <summary> · category:… · turn 5 (8 tools) · … · running · 21m. esc to interruptanywhere on the screen is not enough: the watch matched the phrase inside conversation text. Anchor on the divider line.terminal_titleis not usable: one working pane readOmO - Running eval, anotherOmO - <session title> - <cwd>.- An OmO layout change breaks this.
server/prompt.tsalready reads OmO's question forms from the screen, which may be the way toblocked; not looked into here.
Suggested direction
Derive the status of an OmO pane in the server from OmO's own records, and feed it through the path every other agent's status already takes, so the client needs no change for RUN, the held queue, the live turn and alerts.
Part A, the bug: RUN / DONE for the main turn. Working while a turn runs, done when it ends, from the session .jsonl of the session the pane holds.
Part B, background work: needs a maintainer decision first. What a pane reads when its main turn has ended and children are still running. Recommended: DONE (the agent did answer, and the done alert belongs at that moment) plus a count of running background tasks next to it, rather than RUN for the whole time. A count is a new field on the wire. Part A does not depend on this and can ship alone.
Things that will go wrong if missed
- Snapshots undo a status that only went through
observe.CompletionTracker.project(called byreadSnapshot) settles every pane from the raw snapshot'sagent_statuson every read. herdr keeps sayingclaude/idle, so a derivedworkingbecomesdoneat the nextGET /api/session. The derived status has to replace herdr's for an OmO pane before the tracker sees it, on every path: status events, snapshots, and the collector'sonBaseline/onResyncthat seed and resync web push. - Identity. The tracker drops a finish when the agent changes (
finishedAgent !== agent), and matches on herdr's raw identity, not theomodisplay label (test: "matches finished raw identities before applying an omo display label"). herdr has named an OmO pane bothpiandclaude. Give the derived status one stable identity. - Nothing arrives to trigger a read. herdr sends no frame for these panes, so the server has to notice the file changing: a watch on the session file or a bounded poll, only for panes that run OmO, and running with no browser connected, since web push depends on it.
labelOmoPanesalready costs onepane.process_infoper candidate pane per snapshot; do not add a second probe per pane per read. - Remote PCs.
server/machines.tskeeps its own tracker, and the session files are on the remote PC. Derive where the files are (the bridge runs the same server code). A change to bridge code needsREMOTE_BUNDLE_VERSIONinshared/machines.tsbumped. - No mtime guessing.
server/omo.tsnever picks a session by recency ("tool activity is not evidence of pane ownership"). Read entries of the session the pane holds; a pane whose session cannot be resolved (two OmO panes in one cwd on a system without/proc, for instance) keeps herdr's status. seenstays. A DONE still clears when herdr's focus moves onto the pane.- Web push timing.
done: "long"alerts only after a turn that workedlongTurnor more (server/push.ts), measured between theworkinganddoneit is given. A turn woken by a background task must count as its own turn.
Constraints
- Do not install or edit anything of OmO's or Claude's: no hooks, settings or extensions (maintainer decision, as for fix(chat): build Claude's question and plan cards from the transcript's pending tool call #254). The fix reads files and the screen only.
- No new minimum herdr version; 0.9.0 stays supported.
- Codex (
codex/unknownat rest is a finish, fix(status): a Codex pane finishes instead of reading RUN for good #193), Claude, omp and Gajae Code panes keep their current behaviour. - A new field or WS frame needs
shared/protocol.ts, an answer insite/demo/transport.ts, and a Korean entry insrc/lib/i18n.ko.tsfor any new string.
Acceptance criteria
Part A:
- An OmO pane reads RUN within about 2 s of a turn starting, whether a user message or a wake (
omo-senpi:wake, a monitor, a background terminal session) started it, and stays RUN through tool calls. - It reads DONE when the turn ends, and a
pane-statusframe and a web push alert go out then, under the same rules as other agents. -
GET /api/session, the WSsnapshotandpane-statusframes agree; repeated snapshots do not turn a working OmO pane into DONE. - No DONE shortly after an OmO session starts while its first turn is still running.
- A message sent from the composer while OmO works goes to the held queue, and Stop is offered.
- DONE survives a restart of the server, as it does today, and a turn that was running at the restart reads RUN again after it.
- A turn that ended in
stopReason: "error"and was continued by OmO does not alert as done in between. - Other agents' statuses are unchanged; existing tests in
server/completion.test.ts,server/collector.test.tsandserver/push.test.tspass unmodified, or with changes that are explained.
Part B, once decided:
- A pane whose main turn ended while children run shows that children are running, and how many, from the task records of the session it holds.
- A
runningrecord left by a dead process is not counted.
Tests
- Pure logic (entries → status, task records → count) as unit tests beside
server/omo.test.tsandserver/completion.test.ts, with entry fixtures taken from the shapes above. - Anything that needs live herdr goes in a
*.contract.test.ts;server/omo.contract.test.tsalready runs a stand-in OmO process in a pane and writes a session store under a temp home. - No fixed sleeps: wait for the frame or the file change with a bounded deadline.
Reproduction
- Start OmO 5.1.7 in a herdr 0.9.0 pane and give it a task that takes a minute or more.
- While its screen shows
── • Working (… esc to interrupt) ──, readcurl -s localhost:7317/api/session | jq '.snapshot.panes[] | {pane_id, agent, agent_status}': the pane readsomowithidleordone. - Subscribe to
pane.agent_status_changedfor the pane and let the turn end and another start: no frame arrives. - In the app the pane reads READY or DONE the whole time, and a message sent from the composer during the turn is not held.
Activity
fix(status): show RUN and DONE for OmO panes, and their running backg…