feat(agents): join observed harness state into the roster, Doctor, and human output - #322
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cbba4cdb85
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
cbba4cd to
c9a6d04
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9a6d041db
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
c9a6d04 to
1a8913b
Compare
1a8913b to
213e860
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 213e860b02
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
213e860 to
386fcaa
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 386fcaae38
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
386fcaa to
f41f9e4
Compare
f41f9e4 to
95092f4
Compare
95092f4 to
447de04
Compare
447de04 to
eaa3c7a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eaa3c7ab42
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| &format!("{bus_id} observed harness state ended"), | ||
| &format!( | ||
| "session ended ({}) while desired state is running — crashed seat?", | ||
| observed.exit.as_deref().unwrap_or("exit unstated") |
There was a problem hiding this comment.
Report reason-only terminal diagnostics
When Codex reports CodexObservedState::TerminalError, harness_observation creates an ended record with reason: "systemError" but no exit (src/codex_app_server.rs:229-231). This fallback therefore makes Doctor print only session ended (exit unstated) and discards the actual terminal diagnostic, obscuring the cause operators need to investigate; include observed.reason when exit is absent.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 493cb8c on schickling/hs-04-roster: the Doctor ended-advisory now falls back to the recorded reason when no exit is present (e.g. Codex's reason-only systemError terminal), instead of discarding it as 'exit unstated'.
Posted on behalf of @schickling
| field | value |
|---|---|
agent_identity |
unknown |
agent_persona |
generalist |
agent_supervisor |
unavailable |
agent_tool |
OMP |
agent_tool_version |
18.0.3 |
agent_runtime |
OMP 18.0.3 |
tooling_profile |
dotfiles@f33cd9c-dirty |
…d human output The chosen $E surface from #268: an appended observedState object on both roster JSON shapes (null = no record, distinct from derived unknown), a compact observed column in human output, and advisory-only doctor lines. The session-liveness cross-check demands positive evidence of death (ding::session_liveness); an unreadable registry downgrades nothing. Row 22's wording now names the third independent axis with its proof, and two stale stream proof references from the #300/#313 renames are corrected. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…observed output Review-pass fixes for the exposure slice: the session-liveness probe derives the runner's own pty root from the catalog (PTY_ROOT and PTY_SESSION_DIR still win) so operator shells get the cross-check without exporting anything, with the errno mapping now unit-tested; observedState serializes exit and reason as explicit null per the roster's null-not-omit convention; Doctor gains the ended-while-desired-running crashed-seat advisory and tests covering all four observed-state arms; and the human observed column is prefixed obs: so two bare state words never sit ambiguously side by side. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PTY_SESSION_DIR pointed the probe at a directory st2-managed sessions never use (provable deaths read indeterminate); the probe now shares run::effective_pty_root verbatim. observedState gains the machine-readable ask axis, pinned literals updated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
reason precedes exit, as the spec example pins; pinned literals updated in the same change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…stated An ended record can carry only a reason — Codex's observed systemError writes reason without an exit — and the catch-all advisory discarded it, leaving the operator 'exit unstated' with nothing to act on. The advisory now falls back to the recorded reason when no exit is present. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> agent-identity: unknown agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.3 agent-runtime: OMP 18.0.3 tooling-profile: dotfiles@f33cd9c-dirty
eaa3c7a to
493cb8c
Compare
The exposure slice: #268 §E's roster join (the maintainer call, decided for the join), Doctor, and the reader-side liveness cross-check.
ding::session_liveness: positive-evidence probe (ESRCH → dead; unreadable registry → indeterminate, downgrading nothing — a reader may not share the writer's PTY root).agents --json:observedStateappended last on both wire shapes —nullwhen no record exists (no producer ≠ unknown); the probe applies only to this-host agents. The three pinned full-string assertions updated deliberately in the same change, with a new proof that declared presence and observed state are independent axes andlastActivitykeeps its meaning.INVARIANTS "Stable roster JSON" wording extended to name the third axis; row 14's two drifted proof references (post-feat(stream): implement declared event ingress #300/feat(ding): support OpenCode composer delivery #313 renames) repaired in passing — they were failing
qualified_proof_references_resolveon the branch base.Human
st2 agentsgains an observed column; Doctor emits advisories (missing record → driver gap; rotted record → reason), exit code unaffected.Cycle-2: the probe resolves the pty root exactly as the runner does (legacy PTY_SESSION_DIR deliberately dropped);
observedStatecarries theaskkind.Part of the #268 stack (#319→#326).
🤖 Generated with Claude Code
Refinement pass: the liveness probe derives the runner's own pty root from the catalog (
PTY_ROOT/PTY_SESSION_DIRstill win), so operator shells get the cross-check without exporting anything — the live smoke proved the cross-check fires with the right root and stays safely inert without it; the errno mapping is unit-tested (ESRCH→dead, EPERM→alive, unreadable→indeterminate);observedStateserializesexit/reasonas explicit null per the roster's null-not-omit convention; Doctor gains the ended-while-desired-running crashed-seat advisory with tests covering all four observed-state arms; and the human observed column is prefixedobs:so declared and observed state words never sit ambiguously side by side.