Skip to content

fix: preserve per-round subagent task results on resume - #597

Open
LHMQ878 wants to merge 1 commit into
Opencode-DCP:masterfrom
LHMQ878:fix/595-subagent-task-result-cache
Open

fix: preserve per-round subagent task results on resume#597
LHMQ878 wants to merge 1 commit into
Opencode-DCP:masterfrom
LHMQ878:fix/595-subagent-task-result-cache

Conversation

@LHMQ878

@LHMQ878 LHMQ878 commented Aug 8, 2026

Copy link
Copy Markdown

Summary

  • Seed subagent result cache from each task tool''s stored <task_result> body before fetching the shared subagent session.
  • Avoid overwriting earlier resumed task results with the subagent''s latest reply after in-memory cache resets.
  • Add regression tests for multi-round task resume and empty task_result expansion.

Fixes #595

Test plan

  • npm test -- tests/subagent-results.test.ts
  • npm test

Seed subagent result cache from each task_result body before falling back
to the shared subagent session, which previously overwrote every prior
task result with the latest reply after session switches.
@LHMQ878
LHMQ878 force-pushed the fix/595-subagent-task-result-cache branch from 20ecc6d to 6ed5a00 Compare August 8, 2026 09:18
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.

[Bug]: Resuming a subagent via task_id silently rewrites all previous task results with the latest reply

1 participant