| … | … | @@ -5426,6 +5426,27 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* ( | |
| 5439 | + | if (wakeStart === -1) return current; | |
| 5440 | + | const messages = buffered.messages.filter( | |
| 5441 | + | (entry, index) => | |
| 5442 | + | index < wakeStart || (entry.type === "system" && "task_id" in entry), | |
🟡 Medium Adapters/ClaudeAdapterV2.ts:5442
When a user result drops the absorbed wake frames, it also deletes buffered subagent assistant and user frames, so the continuation replays the surviving task start without the child's conversation or tool activity. The filter retains only task-related system messages after wakeStart; preserve frames with a non-null parent_tool_use_id as well.
No longer relevant as of 48c1e2f54db2f6ec3374ad4604278b3efe65cf8b
Note
Written by claude-opus-5-5 on behalf of Maria
Fixed in 48c1e2f5. Frames with a parent_tool_use_id belong to a background subagent, not the absorbed root turn, so the prune keeps them along with task system frames.
48c1e2f5 addresses this, but it isn’t in the branch snapshot I can see yet.