Repository navigation
fix(core): tell parents their subagents resumed after restart - #62637
opencode-agent[bot] wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
The change looks sound. I ran the session execution tests: the updated recovery test fails against the base restart.ts and passes with this change, and tsc for packages/core is clean. The parent is only flagged when a child was actually resumed or is already active, so children that ran out of their resume budget still report an error as before. The change stays inside restart recovery.
Public API: unchanged (only the wording of the restart notice sent to the model changes).
No blocking concerns.
Related: #36349
There was a problem hiding this comment.
The new commit only shortens the parent's extra notice to "Subagents have resumed automatically." and updates the test's expected text. The logic is unchanged. The session execution tests and tsc for packages/core still pass.
Public API: unchanged.
No concerns.
Issue for this PR
N/A, reported in Slack.
Type of change
What does this PR do?
After a server restart, every interrupted session gets the same "Continuing after restart" notice: "Continue from where you left off without repeating completed work." Restart recovery also relaunches a parent's running subagents in the background. The notice doesn't say that, so the parent often tries to resume or relaunch them itself.
When at least one of a parent's subagents was actually resumed (or is already running), the parent's notice now adds: "Subagents have resumed automatically." Subagents that ran out of their resume budget don't count, because they report an error instead. Sessions without resumed subagents, including the subagents themselves, still get the original text.
How did you verify your code works?
session-execution.test.tsnow checks the notice text for both the parent and the child. It fails without the change and passes with it.bun test test/session-execution.test.ts: 36 pass.tsc -b tsconfig.tests.jsoninpackages/corepasses. oxlint and prettier are clean on the changed files.Checklist
Requested by: @Hona (Hona via Slack)
Added by the opencode bot (AI-generated).
Related: #36349