refactor: hide remaining subagent helpers

This commit is contained in:
Tianyi Cui
2026-07-14 02:45:34 +08:00
parent f85b831bd2
commit 65521b589f
7 changed files with 25 additions and 31 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ The fork provider creates an in-process child seeded with the parent's completed
The parent's current tool-calling turn is still open when a subagent starts: its log contains the assistant tool call but not the matching tool result or `turn/end`. Copying that raw log would give the child an invalid, unbalanced session.
Fork therefore uses `completedTurnPrefix(parent.session.events)`: the contiguous prefix ending at the last `turn/end`. The child sees all completed parent turns and none of the in-flight turn. If the parent has not completed a turn yet, the seed is empty and the child behaves like a fresh spawn.
Fork therefore computes the contiguous prefix ending at the last `turn/end`. The child sees all completed parent turns and none of the in-flight turn. If the parent has not completed a turn yet, the seed is empty and the child behaves like a fresh spawn.
The seed transfers conversation history only. The child still receives a fresh flat registration scope; it does not inherit the parent's tool restrictions or authority.