Commit graph

4 commits

Author SHA1 Message Date
yushen
a3acd732e0 fix(subagent): persist LLM summary after internal announce to parent context
After child subagents complete, the coalesced announcement runs as an
internal turn which rolls back all messages from the parent's in-memory
context. This causes the parent LLM to lose findings in subsequent turns.

Add persistResponse option to writeInternal that re-injects the LLM's
summary as a non-internal assistant message after the internal run
completes. The internal prompt stays hidden while the summary persists
in both memory and session JSONL for future turns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 19:38:18 +08:00
yushen
4d6017e782 fix(subagent): forward assistant stream events for internal announce 2026-02-06 19:04:40 +08:00
yushen
9687e7f2a6 fix(subagent): forward announce replies from internal runs 2026-02-06 18:58:54 +08:00
yushen
f7267f6698 fix(agent): prevent internal run leaks in async streams 2026-02-06 18:38:54 +08:00