Skip to content

Restore summary fallback for recovered agent threads - #124

Merged
swerner merged 1 commit into
mainfrom
codex/recovered-thread-summary
Oct 16, 2026
Merged

swerner merged 1 commit into
mainfrom
codex/recovered-thread-summary

Conversation

@swerner

@swerner swerner commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Fixes #102.

When two full-fidelity agents share a thread across a command, restarting during the command currently resumes successfully but sends only the second agent's new prompt. Recover the thread's prior use from its recorded events and supply the documented summary:high fallback. Retain the rebuilt conversation so the following agent returns to normal full-fidelity reuse. Previously unused threads still start fresh.

The runtime supplies ResumeInfo as an execution-local capability on both resume paths. This reuses existing recorded events and stage outputs; it adds no persistent transcript store or log format change.

Verification:

  • Reproduced on Petri main 56ec3849 and Fabro main ebb1f0bbb (0.387.0-nightly.0), which already includes Preserve workflow context during native skill expansion #118. The uninterrupted control carries QA_FIRST_CONTEXT; the recovered request carries neither that answer nor a summary.
  • Rebuilt that same Fabro revision against this patch. Using an isolated local server, scripted Anthropic responses, and a local sandbox, killed only the server with SIGKILL while the intervening command was blocked. Confirmed the command was redispatched, the run succeeded, the second request included QA_FIRST_CONTEXT in its stage summary, and a third agent reused the rebuilt conversation. The uninterrupted control also passed.
  • Added binary-level regressions using scripted OpenAI responses for the uninterrupted control, crash during the command, subsequent thread reuse, and a previously unused thread after recovery.
  • 19 recovery, compaction, and hooks black-box tests passed; 336 agent, runtime, and driver tests passed. Scoped Clippy with warnings denied, pinned formatting, and whitespace checks passed.

The existing failed-predecessor-after-compaction regression passed separately. Direct-agent resume was not separately retested. The full routine gate, Docker/Daytona tiers, and compatibility corpus were not run. Issue #102 should remain open until this fix lands.

@swerner
swerner merged commit 50809f9 into main Oct 16, 2026
4 checks passed
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.

Recovered agents should retain their preceding conversation or a summary

1 participant