Skip to content

fix(agents): preserve timeout and termination details in process logs - #129273

Merged
steipete merged 1 commit into
mainfrom
codex/qa-process-log-terminal-provenance
Aug 25, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa-process-log-terminal-provenance

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where agents inspecting a finished background command with process(action="log") lost its timeout or termination reason, received no warning before retrying a potentially non-idempotent command, and could not produce the structured process-failure diagnostic that the equivalent poll action already supplied.

Why This Change Was Made

Both finished-process observation actions now derive their terminal status, exit reason, timeout facts, signal, and command identity from the same lifecycle-owned projection. Finished logs reuse the existing timeout retry guidance without consuming unread output, acknowledging completion notifications, or changing log pagination; an obsolete no-op guidance call on running polls is removed.

User Impact

Agents can distinguish overall timeouts, no-output timeouts, cancellations, successful exits, and ordinary nonzero exits when reading finished process logs. Timeout logs explicitly warn that external side effects may already have happened, and a subsequent poll still receives the complete unread output and owns completion acknowledgment.

Evidence

  • Before the fix: 6 regressions fail—five actual finished log lifecycle states omit terminal provenance, and the real registry → process log → agent subscriber path loses its structured timeout diagnostic.
  • After the fix: 250 tests pass across 6 focused suites, including real lifecycle-owner → tool → subscriber integration, overall timeout with exit code zero, no-output timeout, ordinary nonzero exit retaining its completed status, successful exit, manual cancellation, preserved unread output, and deferred completion acknowledgment.
  • Independent review and fresh authenticated Codex structured review: no actionable findings.
  • Formatting, assertion-safety ratchet, and max-lines ratchet pass; the grandfathered process owner stays exactly 766 lines.
  • Production: +32/-32 (net zero). Tests: +122/-47.
  • Reviewed commit: dd89e7519a4f77fa3107b086650359c60c7b4f02.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels Aug 25, 2026
@steipete
steipete marked this pull request as ready for review August 25, 2026 11:26
@steipete
steipete merged commit 7a6c8e8 into main Aug 25, 2026
299 checks passed
@steipete
steipete deleted the codex/qa-process-log-terminal-provenance branch August 25, 2026 11:41
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant