Files
codewhale/crates
wangfeng 60e4fc96fc feat(subagents): cache-aware resident file sub-agents for refactors (closes #529)
Add resident_file parameter to agent_spawn. When set, the child's prompt
is prefixed with the full file contents under a stable <!-- resident_file -->
comment block so DeepSeek's prefix cache stays warm across follow-up
send_input calls. File ownership is tracked via a process-scoped OnceLock
table; a second spawn on the same path receives a resident_conflict warning.

- input_schema: new resident_file string property with description
- SpawnRequest: resident_file: Option<String> field
- execute(): reads file, builds byte-stable prefix, checks ownership table
- Backward compatible: absent resident_file follows existing code path

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 16:36:45 -07:00
..