Skip to content

Agent status C6: keep waiting prompts visible with host checks - #21059

Closed
brennanb2025 wants to merge 7 commits into
mainfrom
brennanb2025/agent-status-c6-execution-evidence
Closed

brennanb2025 wants to merge 7 commits into
mainfrom
brennanb2025/agent-status-c6-execution-evidence

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 28 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1529 $\color{#cf222e}{\Huge{\mathbf{−}}}$​52 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1477
Prod 79 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2599 $\color{#cf222e}{\Huge{\mathbf{−}}}$​260 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2339

When an agent waits a long time for a question or approval, Orca should not make that request disappear just because 30 minutes passed. This draft keeps the last known request visible, marks uncertainty honestly, and asks the machine running the terminal whether the exact attached agent process is still live, cannot be verified, or has exited.

This is a substantial foundation, but it is not merge-ready and does not complete the whole status-recovery project. The final remote-host wiring, mixed-version behavior, and current-head app QA still need work.

Before / after

Before After in this draft
A blocked or waiting status could age out after 30 minutes even though the operator still owed an answer. Covered desktop and mobile readers retain that last known request and show reduced confidence when execution cannot be verified.
The notes menu could drop an old-but-running agent with no explanation. A usable route may remain selectable, with secondary text explaining that the process could not be verified. An exited process or unusable route remains disabled.
A surviving shell, reused PID, or lost connection could be mistaken for proof about the agent. The execution host checks the process attached to the recorded terminal instance and reports live, unverifiable, or exited. A live process does not imply that the turn is still working, and an exit does not imply successful completion.
Different screens could each reinterpret an old timestamp. Execution evidence is written through the host status service and shared with readers; the checks are coalesced, deadline-bounded, and backed off after failures.

The after behavior above is implemented and covered by focused tests. It has not yet been confirmed by current-head Electron or mobile app QA, a real SSH/relay run, or a mixed-version host/client run.

Issue status

No issue is marked closed by this draft.

Partially addressed and still open:

  • STA-7357 / GitHub #20400: focused tests cover retaining a long-waiting request instead of dropping it at the 30-minute boundary. The reported app flow still needs Electron reproduction and remote/mixed-version validation at this exact revision.
  • STA-4436 / GitHub #14798: this draft addresses the stale-status part and adds an uncertainty message for sendable routes. It does not remove the separate current-worktree restriction or resolve every reported send-permission failure.

Both Linear records are currently Todo and both GitHub issues are open.

Why this approach

Simply exempting waiting states from the 30-minute rule would preserve real questions, but it would also leave abandoned sessions looking active forever. Checking only whether a terminal or PID exists is also unsafe because the agent may have exited into a shell or the operating system may have reused the PID.

Instead, the execution host owns the check because it can inspect the correct local, WSL, or SSH environment. It matches evidence to the recorded terminal instance, publishes the result through the existing host status service, and lets every screen use the same result. One bounded scheduler groups checks by host, limits concurrency, applies deadlines and retry delays, and discards delayed results after an attachment is replaced. Keeping execution evidence separate from turn completion is deliberate: process state cannot answer whether an agent finished successfully or still owes work.

Reader-specific exceptions were also considered. They would let the sidebar, tab bar, mobile row, and notes menu disagree, so this draft keeps readers focused on presentation rather than making each one decide whether an old process is real.

Scope, dependencies, and overlap

  • C2 (#21056) still owns recovery when a completion event is missing. C6 process evidence must not manufacture a completion or renew a stale Working state.
  • Direct SSH relay/headless publication and complete snapshot behavior remain C7 work (#21060). C7 has an unresolved architecture review, so this draft does not treat that dependency as complete.
  • This branch includes earlier C5 and C7 foundation commits and therefore overlaps #21058 and #21060. The earlier C5 foundation in Agent status C5: tie status reports to the launched agent #21058 also overlaps the combined C5/C10 branch #21054; do not merge those independently without first choosing an integration order.
  • A separate renderer process-check cadence still exists. It should be removed or replaced only when the C2/C7 contracts land, rather than starting a second production polling loop now.

Review and validation status

Draft / not ready for merge. An independent review did not complete because the reviewer provider disconnected. The merge with current origin/main also required a semantic integration change: C6 execution observations now enter the updated read-only legacy-status boundary through its declared write adapter. That change preserves the new main behavior and C6 publication, but it needs fresh independent review.

At head 0132b5180fd1d0d309f3fc0aec4ace6fe3d25158, rebased by merge on upstream 36cdb34097a7075718abe41c29d559101841166a:

  • 9 focused desktop/main test files: 164 tests passed.
  • 3 status-ingress/integration test files: 26 tests passed; one file overlaps the focused set.
  • Mobile row projection: 8 tests passed.
  • Node, web, CLI, and mobile typechecks passed.
  • Changed-file code-quality gate passed with zero new findings across 108 files.
  • Diff whitespace and conflict-marker checks passed.

Still missing: current-head Electron and mobile app QA, real SSH/relay/headless coverage, mixed-version validation, disconnect/overnight soak, scale measurements, removal of the competing renderer cadence, and a completed independent review of the integrated head.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Review and validation handoff — 2026-09-16

Draft / not merge-ready. Published at the user's request before review/QA completion. Published head: 676f55102aad50992a3dbfa92c59a1f16c660f38.

What has been done

Review-and-fix reported commits f4cf7e0 and 676f551, with 220 tests across 10 focused files, node/web typechecks and changed-code quality passing. Coverage was bounded to the implemented observation/presentation seams.

These are recorded worker/reviewer results from the stated revisions, not a fresh coordinator rerun, CI result, or blanket approval of today's PR head. Recovery/review workers used GPT-5.6 Sol xhigh; provider interruptions prevented some follow-up stages from finishing.

What still needs to be done

Remove competing renderer observation cadence and finish direct-SSH/relay/headless publication plus C2/C7 consumer integration. Validate PID/attachment replacement, partial inventories, disconnect and bounded scan/RPC cost. No completed current-head manual Electron QA or real remote soak is available. Local process presence must not imply turn completion or renew Working.

Before marking ready: address proven findings, reconcile current main and cross-batch overlap, complete independent review of the final diff, rerun relevant tests/typechecks/quality, and perform fresh manual Electron QA against that exact head. Use background/hidden CDP validation; unavailable auth/platform scenarios remain explicitly unverified. No successful final-head review or QA should be inferred from old report filenames or task completion labels.

Related batch PRs

C1: #21053 · C10: #21054 · C2: #21056 · C3: #21055 · C4: #21057 · C5: #21058 · C6: #21059 · C7: #21060

The remaining full-batch work stays open; opening this draft does not mark those requirements complete.

@brennanb2025 brennanb2025 changed the title Agent status C6: host execution evidence and uncertainty Agent status C6: keep waiting prompts visible with host checks Sep 16, 2026
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Integrated current origin/main into this draft and rewrote the description for the current scope.

  • New head: 0132b5180fd1d0d309f3fc0aec4ace6fe3d25158
  • Upstream baseline: 36cdb34097a7075718abe41c29d559101841166a
  • Conflicts: src/main/runtime/rpc/methods/index.ts keeps both the C6 status-store RPC registration and main's new agent-launch/browser-identity registrations; src/main/runtime/rpc/rpc-params-type-parity.ts keeps both the C6 status methods and main's new agent.launch exception.
  • Integration decision: main made the old status map read-only. server-execution-observation.ts now publishes C6 evidence through the declared legacy-status write adapter, with a matching manifest entry, instead of writing the map directly. This is a semantic integration change and needs fresh independent review.
  • Rerun checks: 9 focused desktop/main files (164 tests); 3 ingress/integration files (26 tests, with one overlapping file); mobile projection (8 tests); node/web/CLI/mobile typechecks; changed-file quality (0 findings across 108 files); whitespace and conflict-marker checks. All passed with ORCA_BACKGROUND_LAUNCH=1 for tests.
  • Remaining blockers: independent review did not complete; no current-head Electron/mobile app QA, real SSH/relay/headless run, mixed-version validation, disconnect soak, or scale measurement; direct-host publication and the competing renderer cadence remain unfinished dependencies.

GitHub currently reports the draft as mergeable, with checks still unstable/pending. The pre-existing uncommitted lockfile change and private notes remain outside the commit.

…atus-c6-execution-evidence

# Conflicts:
#	src/main/runtime/rpc/rpc-params-type-parity.ts
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Closing this draft from the September 14 agent-status plan. That plan was re-examined against current main and replaced.

This branch conflicts with main, and its central work duplicated contracts that had already merged (the canonical status store and the child-work contract landed on 15–16 September). The replacement work is being done as smaller root-cause PRs, each planned, challenged and reviewed first.

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.

1 participant