Skip to content

feat(agent-status): OSC 7501 program status core (part 1 of 2) - #30144

Closed
Regis-RCR wants to merge 17 commits into
stablyai:mainfrom
Regis-RCR:contrib/osc7501-part1
Closed

Regis-RCR wants to merge 17 commits into
stablyai:mainfrom
Regis-RCR:contrib/osc7501-part1

Conversation

@Regis-RCR

Copy link
Copy Markdown
Contributor

ELI5

Some coding agents can now tell the terminal what they are doing (working, waiting for an answer, done) with a standard escape sequence, OSC 7501. Orca does not listen for it yet. This PR adds the parts that read and remember those reports, plus real recordings of an agent sending them. Nothing in the app uses these parts yet, so nothing changes for users. Part 2 plugs them in.

What Changed

Before and after, as a user sees it: no change. The new OSC 7501 core has no production callers in this part. The three refactors preserve existing runtime behavior.

The mechanism, commit by commit:

  • Parser (src/shared/program-status/program-status-report.ts): reads one report body by the spec (rev 0.4) and validates its fields. Malformed pairs are skipped, unknown keys ignored, the last duplicate wins (the id grammar is checked on that last value, its size on every occurrence), and a report that breaks a field limit (field sizes, strict base64 that decodes as UTF-8, control characters) is discarded whole.
  • Stream scanner (program-status-stream-scanner.ts): finds reports, prompt starts (OSC 133;A) and RIS in a PTY stream whatever the chunk boundaries, and enforces the 4096-byte whole-sequence limit before a report reaches the parser. A prompt start drops records, so it counts only once BEL or ST ends it, as Orca's existing OSC 133 reader (terminal-shell-lifecycle-scanner.ts) requires; a bare ESC, a missing terminator or a body over 4096 bytes is not one. It carries at most one partial frame, never buffers an oversized one, and costs one indexOf per active pattern on a chunk with nothing to report.
  • Record store and projection (program-status-record-store.ts, program-status-projection.ts): the spec's records (a report replaces its record, clear removes a subtree, 256 records max, prompt start drops working and blocked, RIS drops everything), summarized into what a status dot shows, plus what remains once the process exits.
  • Tracker (program-status-tracker.ts): runs the above for one PTY, numbers each change it would publish (reportSeq), gives each view a generation that is never reused, and throttles emission (burst of 8, then 20 per second) while always delivering the latest state.
  • Slot, transitions and composition (program-status-slot.ts, program-status-slot-transition.ts, compose-agent-status-entry.ts): the data a pane will hold beside its hook row, the pure rule that accepts or refuses a write (an exit write must carry the view it shows), the dismissal rule, and the pure function readers will use to choose between the hook row and the program's own report.
  • Three neutral refactors that part 2 builds on: the startup query answer dispatch is extracted from pty-startup-ingress.ts, the daemon session's startup ingress wiring is extracted from session.ts (both files sat at the line cap), and the PTY-to-pane attribution rule is exported as runtime-pty-pane-attribution.ts.
  • Real transcripts (src/main/runtime/__fixtures__/claude-program-status-2-1-295-*): six recordings of Claude Code 2.1.295 on macOS (startup, one turn, a permission prompt, a question, an interrupt, a subagent then /exit), captured with config/scripts/capture-agent-pty-transcript.mjs and scrubbed at the same length. A replay test runs the real bytes through the core; it covers seven read sizes and every cut in and immediately around each detected sequence.
  • Design note (docs/design/osc7501-program-status.md): the problem, constraints, choices, rejected alternatives and limits. It says which part lands what and describes the state once both parts are merged. docs/** is ignored by default, so the commit adds two allow-list lines to .gitignore, the way other tracked docs are listed.
  • Fixes from review, seven commits after the note: the prompt start rule above, the id grammar on the last duplicate, the exit write that must carry its view, and the secret scanner's redaction (below). The other three update the note: two follow part 2's own fixes (a retired pane reopens only once its restore binds; a report taken before its pane exists is written once the pane binds), and one says which part lands what.

Two existing CI checks needed a change because of the new transcripts:

  • config/scripts/pty-transcript-secret-scan.mjs flagged the base64 msg= values of the reports as opaque tokens. The scanner now decodes OSC 7501 msg and title values strictly (as the parser does) and scans the decoded text with the same rules, so a secret inside a message is still caught and reported at its encoded position. Redacting such a secret re-encodes the scrubbed text at the same length, so the report still decodes. A value that does not decode is left to the existing rules.
  • src/main/daemon/serialize-grid-transcript-replay.test.ts replays every committed transcript through the snapshot serializer. Five of the new ones show divergences that already exist in the serializer (a true-colour background left on restored cells, and in the subagent run a cursor one column short after a shrink). The serializer is not touched; they are added to KNOWN_PREEXISTING_I2_FAILURES in the file's existing style. The unscrubbed captures diverge identically. I can drop these entries if you would rather track them elsewhere.

Why

OSC 7501 lets agents report their state directly instead of Orca inferring it from titles and per-agent hooks (#26809). Splitting the work keeps each review tractable: this part is the pure core plus three behavior-preserving refactors, which you can read and test on their own, and part 2 is the integration that changes behavior. Real transcripts come first because the protocol leaves room for behaviors that matter here (see the design memo below), and AGENTS.md asks for rules about agent screens to be written against captured transcripts.

Design memo

The full note is docs/design/osc7501-program-status.md. It can be dropped from this PR if you prefer not to keep design docs in the repo (as with the cleanup in #26328); this section carries the same content in short.

Problem. Agents without hooks or a recognizable title show no status in Orca, and title parsers break when titles change. Agents that wait for feature detection, including the captured Claude Code version, report only after the terminal answers the OSC 7501 ; ? probe, which Orca never does.

Constraints from the spec (rev 0.4). Strict limits and a discard-whole rule; records with a subtree clear; prompt start and RIS rules; on process exit done and error survive; no heartbeat, so a record must not expire only because the program is quiet; reports are untrusted input; the probe reply may spell out the default states and kinds.

What the capture showed. The agent writes XTVERSION, the Kitty keyboard query, the 7501 probe and DA1 in one write. If the DA1 reply arrives before the 7501 reply, it decides support is absent and never probes again. done arrives twice (bare, then with a message about two seconds later). An interrupt reports idle. Exit sends three root clear reports. Subagent ids are flat hex ids, and a child ends with clear:id=..., never done.

Choices.

  • One store: the hook server's store gets a second producer slot per pane beside the hook row, and neither ever writes the other, following the AGENTS.md rule that new producers write into that one store.
  • Composition on the read side as presentation policy: a pure function with no clock. By default a valid hook row wins; a setting (part 2) makes the program's own report win.
  • The probe is answered by the PTY owner's startup ingress, in the same parse turn, before any DA1 answer can leave the owner.
  • The daemon tracks reports itself before it thins a backgrounded stream, and every fact carries the session incarnation and an ordering number, so stale or reordered facts are dropped.
  • A dismissal acknowledges one exact incarnation, view and generation, so a new state shows again and a stale dismissal changes nothing.
  • Two PRs: this one adds the pure core and changes no behavior; part 2 carries all integration.

Rejected alternatives.

  • A separate store and channel for 7501: every reader would need a second subscription and its own merge, against the one-store rule.
  • Merging both producers into the one hook row: the result depends on arrival order, the program's report would inherit the hook row's identity and permission data, and one producer's teardown would erase the other.
  • Answering the probe in the renderer (as [Feature]: Support the Program Status Protocol (OSC 7501) as an agent status source #26809 suggests): hidden or parked panes may have no renderer receiving live bytes. While the daemon's shell-ready barrier holds, the daemon answers DA1 itself, so a renderer-only probe handler cannot guarantee the required reply order.
  • Answering in the headless terminal model: it answers only for dropped hidden chunks and sits after the owner, so it cannot guarantee the order either.

Compatibility, scope and limits. The new OSC 7501 core has no production callers in this part, and the three refactors preserve existing runtime behavior, so nothing changes for any client. Part 2 adds daemon protocol 50, optional fields, and a new program-status kind within the existing transientFact event, with no new opcode; old clients and mobile stay on hooks. Supported scope will be the macOS desktop app (local and daemon PTYs); SSH, Linux, Windows and orca serve are not yet covered. Known limits are listed in the note.

Linked Issue

Refs #26809 (part 1 of 2; part 2 carries Fixes #26809).

Visual Proof

N/A, no visual change. The new OSC 7501 core has no production callers in this part, and the three refactors preserve existing runtime behavior.

Testing

  • Every commit passes pnpm tc on its own, and oxlint (default and config/oxlint-react-doctor.json) on the files it touches, oxfmt --check, pnpm run check:code-quality:changed and check:max-lines-ratchet; the four note commits have no code to lint.

  • Every test file this part adds or changes (15 files): 660 tests pass at its last commit.

  • Transcript replay (src/main/runtime/program-status-claude-transcripts.test.ts): 26 tests, checked to fail against deliberately broken implementations (the scanner's carry, the tracker's fold of the second done, the parser's title handling, the store's child clear).

  • Refactors shown neutral by comparing per-test results before and after each one: the 12 test files around the startup ingress (176 tests, identical), all of src/main/daemon (identical, including 18 real-shell timeout tests that fail the same way before the change on this machine), and all of src/main/runtime (identical apart from the 6 added tests; 3 existing tests fail the same way before the change).

  • config/scripts/pty-transcript-secret-scan.test.mjs: 145 tests, including new ones for a secret hidden in a decoded msg or title and for a scrubbed report that still parses. serialize-grid-transcript-replay.test.ts: 127 tests.

  • Not run: pnpm build, e2e, and the full pnpm test on this part alone (the full suite was run on the stacked branch, see part 2). macOS only, under Node 26 (the repo pins 24, which I don't have on this machine).

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

AI Disclosure

Assisted by Claude (Anthropic).

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Security: reports are untrusted. They are parsed strictly and, in part 2, only ever displayed; no action reader sees them. The transcripts are scrubbed of session ids, paths, plan tier and usage values, and the secret scanner now reads inside the encoded fields.
  • Cross-platform, SSH, mobile, backward compatibility: the new core is not reachable in this part, and the refactors preserve existing behavior. Part 2 states the scope.
  • Performance: the scanner does one indexOf per active pattern on a chunk with nothing to report and copies nothing.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Parse the body of one Program Status report (protocol rev 0.4) into a
report or a discard. Malformed pairs are skipped and counted; every
well-formed occurrence is checked against the per-pair limits (key
length, msg and title encoded and decoded size, strict base64 that
decodes as UTF-8, control characters, app size, id size and grammar)
before duplicates resolve, so an invalid earlier duplicate discards the
report. A missing or unrecognized state discards it; an unrecognized
kind, app or progress is treated as absent. Decoded msg and title are
validated and not retained.

Pure and not yet wired to any terminal.
Scan a PTY stream for OSC 7501 reports, OSC 133;A prompt starts and
RIS, each with its source offsets, whatever the chunk boundaries. A
report ends at BEL or ST, and a bare ESC also terminates it, as in
Ghostty: the report is parsed up to that ESC and scanning resumes at
the ESC, so it can begin the next sequence. The scanner carries at
most a partial prefix or one open frame; a frame over 4096 UTF-8 bytes
(skipped pairs and a BEL or ST terminator included) is discarded
whole and skipped to its terminator without being buffered. The probe
body is ignored. RIS and prompt starts are only scanned while the
caller says they matter, re-read after every event so a report can
arm the rest of the same chunk; DECSTR, alternate screen switches and
erase display are not resets.

Searches only move forward, and a chunk with nothing to report costs
one indexOf per active pattern with no copy of the chunk.
Keep the per-terminal records the Program Status protocol describes: a
report replaces its record completely, clear removes the addressed
record and its subtree (no id is the root, so it empties the store),
and past 256 records the least recently updated one is evicted. A prompt
start drops working and blocked records and keeps idle, done and error;
RIS drops everything.

Summarize the records into the aggregate state a status dot shows
(blocked and question above working above error above done above idle,
ties to the most recent update), the root record's own state, and
whether a child failed. A child error never becomes the aggregate
error. The projection carries the current summary and the one that
remains once the attached process exits (done and error only), computed
without changing the store.

Pure and not yet wired to any terminal.
…ations and budget

Run the scanner and the record store for one PTY incarnation and number
what they produce. After every applied event, in byte order and before
any throttling, the tracker recomputes the projection and gives each of
its two views (now, and what remains on exit) a new generation when
that view's summary changed, drawn from one counter that clear, RIS and
prompt starts never reset, so a generation is never reused. A changed
view also records, on the owner's wall clock passed in by the caller,
when its aggregate and its root last changed. Any change of either view
takes the next reportSeq, so an equal reportSeq always means an
identical observation, and a repeated state takes no number.

Emission is throttled per PTY (a burst of 8, 20 per second) and the
latest observation is always delivered, at worst by one 100 ms trailing
timer. The budget and its timer read an injectable monotonic clock,
never the wall clock, so a step of the owner's clock, backward or
forward, neither credits time that did not pass nor delays delivery. An
emission carries the reportSeq and the views recorded with it, so a
coalesced done, working, done still shows a newer generation than the
first done. snapshot() returns the current state without incrementing
anything, and discarded reports are counted by reason.

Pure and not yet wired to any terminal.
…mposition

Define the program-status slot a pane will hold beside its hook row:
the PTY and incarnation it belongs to, the tracker's reportSeq, a
liveness (live, unverifiable, exited) with the instant it began, and
the shown view (now, or what remains on exit) with its generation. A
dismissal is an acknowledgement of one incarnation, view and
generation. A strict codec parses the fact a PTY owner sends and the
acknowledgement argument, rejecting an unknown state, a non-positive or
fractional generation and a non-finite time.

applyProgramStatusWrite is the pure acceptance rule: reports are
ordered by reportSeq inside an incarnation and another incarnation
replaces the slot; lifecycle writes are fenced by identity, exited is
absorbing, and an empty view removes the slot. The liveness time is
copied from the write and never stamped, so a re-created slot keeps the
instant its producer was last verified. carryAckAcrossExit keeps a
dismissal across the process exit only when it names exactly the
pre-exit view and the remaining view shows the same summary; it reads
the acknowledgement and the exit write alone, so it holds with no pane
record.

composeAgentStatusEntry applies the precedence setting as a pure input
and reads no clock or timestamp: without a slot the hook entry is
returned as is; by default a hook row wins unless it is absent, a seed
Orca planted at launch or from process output, or restored and not yet
confirmed. The display entry built from a slot maps the aggregate to
the existing states, takes the main agent verdict from the root alone,
and marks the idle state as resting. Tests run the existing sidebar
row, dashboard, worktree card and worktree ps readers on that entry
and on a hook entry of the same state and verdict, and expect the same
result for every summary but idle.

Pure and not yet wired to any reader.
Six transcripts of the agent CLI version 2.1.295 on macOS, captured with
config/scripts/capture-agent-pty-transcript.mjs: idle at startup, one
turn, a Bash permission dialog answered allow once, an AskUserQuestion
answered with its first option, an Escape interrupt, and one subagent
followed by /exit. The agent reports only once its OSC 7501 probe is
answered ahead of DA1, so the capture script ran inside a test terminal
that answers the probe the way the PTY owner's startup ingress does and
the other startup queries the way the renderer's xterm.js does. Orca's
own reply ordering is covered by the startup ingress tests. A run whose
terminal leaves the probe unanswered carries the probe and no report.

Each sidecar records the commit the capture ran on, the route and the
scenario. Session link ids, the home path, the plan tier, the usage
notice and the resume id are scrubbed at the same length, so the
captured screens keep their wrapping.

The replay reads the real bytes through the pure core: the scanner
yields the same events at every read size and at every cut in and around
each sequence, the parser accepts every report, the tracker yields each
scenario's transitions with the descriptive second done folded into the
first, and the subagent run drives a child record, its clear by id and
the exit-time root clears.
Record the problem, the protocol and capture constraints, the
architecture, compatibility, scope, rejected alternatives and known
limits of OSC 7501 program status support.
A secret found inside the decoded msg or title of an OSC 7501 report
was redacted by filling the encoded span with X. That fill is not valid
base64 of UTF-8 text, so the parser discards the whole report and a
scrubbed fixture silently stops carrying it on replay.

Redact the decoded text instead and encode it again, keeping the
original padding style. The placeholders are ASCII, so the encoding
keeps its length whenever the secret was ASCII. The new test parses the
scrubbed report, not only rescans it.
A lifecycle write that omits `shown` keeps the slot's view. On the move
into `exited` that kept the pre-exit `now` view while the slot was
relabelled `onExit`, so the pane went on showing working or blocked
state after the exit, and an `onExit` dismissal was compared against a
`now` generation.

Refuse a lifecycle write that omits `shown` when it would change the
view name. Only the move into `exited` does that, since `exited` is
absorbing; an `exited` to `exited` write without `shown` is still a
no-op. The ledger's exit write already carries the `onExit` view.
The parser checked the id grammar on every occurrence of `id`, so
`state=done:id=a//b:id=a` was discarded although the spec says the last
value of a repeated key wins and ignores only a report whose id does not
match the grammar.

Keep the id size limits (128 bytes, 32 per segment, 8 levels) on every
occurrence, as the spec asks of every limit before any record is
touched, and check the segment grammar once, on the value that wins.
The msg and title checks are unchanged.
The scanner reported OSC 133;A as a prompt start as soon as a `;`
followed the `A`, so a truncated `ESC]133;A;` dropped every working and
blocked record although no complete prompt sequence arrived. A bare ESC
right after the `A` counted too.

Scan a prompt start like a report frame: through its parameters, across
chunks, under the same 4096 byte bound, and report it only once BEL or
ST ends it, which is how the shell lifecycle scanner reads OSC 133. A
bare ESC ends the candidate without a prompt start and is scanned as the
next sequence; an unterminated or oversized body reports nothing. The
event's end now points past the terminator, like a report's.
Copilot AI balanced review requested due to automatic review settings October 18, 2026 01:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 50f6758d-e1e2-43ce-b56b-629cfb90a9c8
📥 Commits

Reviewing files that changed from the base of the PR and between ce2d608 and df68f11.

📒 Files selected for processing: 45
  • .gitignore
  • config/scripts/pty-transcript-secret-scan.mjs
  • config/scripts/pty-transcript-secret-scan.test.mjs
  • docs/design/osc7501-program-status.md
  • src/main/daemon/serialize-grid-transcript-replay.test.ts
  • src/main/daemon/session-startup-ingress.ts
  • src/main/daemon/session.ts
  • src/main/runtime/__fixtures__/claude-program-status-2-1-295-interrupt.meta.json
  • src/main/runtime/__fixtures__/claude-program-status-2-1-295-interrupt.txt
  • src/main/runtime/__fixtures__/claude-program-status-2-1-295-permission.meta.json
  • src/main/runtime/__fixtures__/claude-program-status-2-1-295-permission.txt
  • src/main/runtime/__fixtures__/claude-program-status-2-1-295-question.meta.json
  • src/main/runtime/__fixtures__/claude-program-status-2-1-295-question.txt
  • src/main/runtime/__fixtures__/claude-program-status-2-1-295-startup.meta.json
  • src/main/runtime/__fixtures__/claude-program-status-2-1-295-startup.txt
  • src/main/runtime/__fixtures__/claude-program-status-2-1-295-subagent.meta.json
  • src/main/runtime/__fixtures__/claude-program-status-2-1-295-subagent.txt
  • src/main/runtime/__fixtures__/claude-program-status-2-1-295-turn.meta.json
  • src/main/runtime/__fixtures__/claude-program-status-2-1-295-turn.txt
  • src/main/runtime/program-status-claude-transcripts.test.ts
  • src/main/runtime/program-status-composed-entry-terminal-status.test.ts
  • src/main/runtime/runtime-pty-pane-attribution.test.ts
  • src/main/runtime/runtime-pty-pane-attribution.ts
  • src/main/runtime/terminal/output/terminal-derived-agent-facts.ts
  • src/renderer/src/lib/program-status-composed-entry-readers.test.ts
  • src/shared/program-status/compose-agent-status-entry.test.ts
  • src/shared/program-status/compose-agent-status-entry.ts
  • src/shared/program-status/program-status-entry-table.test-support.ts
  • src/shared/program-status/program-status-projection.test.ts
  • src/shared/program-status/program-status-projection.ts
  • src/shared/program-status/program-status-record-store.test.ts
  • src/shared/program-status/program-status-record-store.ts
  • src/shared/program-status/program-status-report.test.ts
  • src/shared/program-status/program-status-report.ts
  • src/shared/program-status/program-status-scan-budget.test.ts
  • src/shared/program-status/program-status-slot-transition.test.ts
  • src/shared/program-status/program-status-slot-transition.ts
  • src/shared/program-status/program-status-slot.test.ts
  • src/shared/program-status/program-status-slot.ts
  • src/shared/program-status/program-status-stream-scanner.test.ts
  • src/shared/program-status/program-status-stream-scanner.ts
  • src/shared/program-status/program-status-tracker.test.ts
  • src/shared/program-status/program-status-tracker.ts
  • src/shared/pty-startup-ingress.ts
  • src/shared/pty-startup-query-answer.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The change adds OSC 7501 report parsing, stream scanning, record tracking, slot lifecycle rules, and display-entry composition. It also connects startup-query handling to daemon session ingress, adds PTY pane attribution resolution, and adds transcript fixtures and tests. Transcript secret scanning now checks valid encoded report fields and re-encodes redacted text.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to df68f

This change adds the core for tracking OSC 7501 program status, but nothing in the app uses it yet. The startup-query, session-ingress, and pane-attribution refactors keep their existing behavior. The transcript secret scanner now also checks encoded status-report fields. No concrete regression was found, so the change appears ready to merge, with the integration behavior still to be verified in the follow-up part.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 41.30% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 92 functions across 31 files. (14 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: adding the OSC 7501 program-status core as part one of two.
Description check Passed The description is complete and follows the template. It explains the user impact, implementation, rationale, linked issue, testing, scope, security, compatibility, and performance considerations. It …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description is complete and follows the template. It explains the user impact, implementation, rationale, linked issue, testing, scope, security, compatibility, and performance considerations. It also records unrun checks and the unchecked manual-testing and self-review items.

Full details: Docstring Coverage

Explanation

Docstring coverage is 41.30% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 92 functions across 31 files. (14 skipped: 14 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@innocarpe

Copy link
Copy Markdown
Contributor

Adding my support for this foundation: accurate agent status is important when managing multiple sessions. In my current workflow, a Codex CLI session waiting for verification results from another session appears completed as soon as its response turn ends. I shared the concrete use case on the integration PR: #30145 (comment). I have not verified whether OSC 7501 covers that specific Codex case, but support for explicit program-reported status is valuable for making these workflows clearer.

@Regis-RCR

Copy link
Copy Markdown
Contributor Author

Closing this as superseded by #30260, #30261 and #30262, merged on 2026-10-19.

I compared the two stacks against main at de7a2d24f9. Main covers every behavior this stack shipped, on a wider scope: every platform, SSH and remote runtimes behind a capability, mobile and paired clients, worktree ps. It also shows more of each report, with msg previews, the progress ring, the blocked kind and kept results.

Two differences remain, and neither justifies a follow-up today. This stack had a setting that let OSC 7501 outrank hooks. #30261 keeps hooks first and hands the row to OSC 7501 after 2 minutes of hook silence, which covers the crashed-hook case without a setting. Our daemon also tracked reports before keep-tail thinning, so a hidden, backlogged daemon pane could not lose one. Main degrades that case to "ended", not to a wrong state, and I have no live repro of it. I will open an issue only if I get one.

Thanks @nwparker for the implementation. The Codex question from @innocarpe is answered on #30145.

@Regis-RCR Regis-RCR closed this Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants