* fix(kiro): keep the Kiro session when kiro-cli reports status over OSC 7501
kiro-cli's TUI reports its state over OSC 7501 as `app=kiro-cli`, while
Orca's Kiro hooks, resume records and cold restore all use the agent id
`kiro`. The projector passed the app id through unmapped, so one Kiro pane
was tracked as two agents:
- a `kiro-cli` report that followed a finished `kiro` hook row took the row
over as a different program and dropped its provider session;
- while a `kiro-cli` row was live, `kiro` hooks were treated as a nested CLI
and their session id was not recorded.
`kiro-cli` is not a resumable agent id, so no resume record was kept and a
restarted Orca reopened Kiro tabs as plain shells instead of running
`kiro-cli --resume-id <id>`.
Map the app id to `kiro`, as `claude-code` and `grok-build` already are.
* docs(agent-hooks): list Kiro as an OSC 7501 sender reporting as kiro-cli
---------
Co-authored-by: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com>
* fix(agent-status): prevent shared-service OpenCode OSC 7501 from marking idle tabs working (#39619)
* fix(agent-status): scope OpenCode shared-folder OSC 7501 to the pane's hook
OpenCode 2 keys its OSC 7501 records by root sessions and never by
child sessions, so drop the parent/child id exception. Keep OpenCode's
all-idle report able to settle a hook-silent pane, and move the
precedence test to the server layer.
* fix(agent-status): keep another OpenCode session's status off a hooked pane
OpenCode's OSC 7501 root summarizes every session sharing the folder's
tabs, so its block or title on an OpenCode hook row belongs to another
pane. The pane's own prompts already come from Orca's plugin.
* refactor(agent-status): decide OpenCode peer records from the root app
---------
Co-authored-by: Eng. Mahmoud Bek ElNemer <tt21913@gmail.com>
* fix(agent-status): match OSC 7501 spec length limits and progress parsing
* fix(agent-status): keep a capped OSC 7501 body whose ST splits across chunks
* fix(program-status): keep a Pi row working while a pi-subagents child outlives the parent's done
OSC 7501 projected the root record's done straight onto the row even when
live child records remained, so a Pi parent showed Done/IDLE while an async
pi-subagents worker kept running. Fold child liveness with the existing
foldMainAgentWithRowChildWork; mainAgent keeps the lead's own verdict so the
row settles to done once the last child ends.
Fixes#33657
* fix(program-status): announce a held turn's done on time and keep hook verdicts authoritative
- Stamp turnCompletedAt on the child-held row and its all-clear so the lead's
done is announced once, when it happens, as hook rows do.
- Hold only a finished (non-boundary) turn, only for working/waiting children;
in-turn rows and failed/idle children keep the root's state.
- A settled hook row is never reopened by a program's child-held working row,
so the 2-minute silence fallback cannot flip done -> working -> done.
* fix(program-status): lapse an unrefreshed child hold to the lead's done
Children report only changes, so a pi-subagents that dies or hangs inside a
live Pi would hold the row working until decay. The lease timer now settles a
child-held row no report refreshed within AGENT_STATUS_STALE_AFTER_MS minus one
renewal interval (20-30 min) to the lead's done, keeping turnCompletedAt so it
is not announced again.
* perf(orcad): keep the server bundle ASCII so V8 stores it one byte per character
129 non-ASCII characters in regex literals (and three in a String.raw plugin
template) made V8 hold the whole ~11 MB orcad-server.js source as a two-byte
string. Write them as \uXXXX escapes and fail the build if any return.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(orcad): keep license comments ASCII and name the module the guard trips on
esbuild gathers legal comments at the end of the bundle; escape that comment so
a dependency's license text cannot fail the ASCII guard, while licenses still
ship with the code. The guard now reports the offset and, from an unminified
rebuild, the module the character came from. A dark-switch build is covered.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix(agent-status): never drop a running helper for lack of room
Helper state (subagents, background tasks and commands) was bounded by counts and byte budgets that refused or evicted live records once hit, so the agent kept working while Orca listed it wrong. Every one of these records already dies with its session, pane or chat, so the count and size caps go; identity-history, transcript and transport bounds stay.
* fix(agent-status): keep the status field limit, measured without the subagent roster
The previous commit dropped the 256 KiB status check outright; it still guards every other field. Only the roster, whose rows are bounded individually, is left out of the measurement.
* fix(agent-status): fit helper previews and walk lineage once
* fix(agent-status): skip an oversized Pi row instead of stopping, and parse every envelope the store can write
Review follow-up: one long row no longer hides later rows that still fit the request, and the transport envelope's reader no longer refuses a size its writer now produces.
Builds on the program-status core:
- A determinate progress ring replaces the working spinner when a program
reports progress (rows and tabs; percent only in tooltip/aria), in the
attention tone while blocked. The working color becomes the
--agent-working token.
- Non-agent programs (brew, terraform, …) get their first letter as icon.
- The program's own one-line message shows as the row preview, a failed
program reads "Failed: <message>", and a block such as sign-in that the
row's state does not show raises attention.
- A finished program's result outlives its exit until the next keypress or
command in that pane, as the protocol asks; real agents are unchanged.
Programs can tell Orca what they are doing through the Program Status
Protocol (OSC 7501); Claude Code, Codex, Grok, pi and oh-my-pi already do.
Orca answers the protocol's feature-detection probe (visible xterm and the
hidden-pane emulator), parses reports from PTY output on the execution host
(src/shared/program-status/), and keeps two lanes:
- Lifecycle state keeps one owner per pane. Hooks win; OSC 7501 drives the
row when hooks are off, missing, or silent on a state the program has
left (server/program-status/hook-precedence).
- The program's own report (progress, its one-line message, blocks such as
sign-in) is a live-only `programStatus` facet kept per pane
(server/program-status/facet-store), stitched onto rows at publish time
and carried to the renderer store, mobile, paired clients and
`worktree ps`. Facet-only changes patch just the facet.
Title-driven readers (idle edges, delivery, tui-idle, exit inference)
classify by the program's OSC 7501 activity while it reports one and fall
back to title glyphs only for agents that report nothing explicit, so they
keep working when Claude stops painting its title glyph after the probe.