Enhance roadmap and documentation with new features and optimizations

- Add optimization pass details including subagent model override, system prompt caching, and memory recall improvements.
- Document per-path permission matching for apply_patch and read_many_files.
- Update configuration to include subagentModel for cost-effective task handling.
- Implement atomic config writes to prevent half-written JSON on crashes.
- Introduce empty-report subagent retry mechanism for improved reliability.
- Adjust memory entry limits and search functionality for better performance.
- Add tests for new features and ensure existing functionality remains intact.
This commit is contained in:
asepharyana
2026-09-04 22:37:38 +07:00
parent 1e2df2b751
commit e90bcac7c3
16 changed files with 406 additions and 74 deletions
+8
View File
@@ -61,6 +61,14 @@ That is not an optimisation. A `todo_write` on step one must be visible to step
`system:` on `streamText` is bound once for the whole run. Returning `instructions` from
`prepareStep` is the only place per-step state can enter.
Building it, though, is cheap to cache. `systemFor()` re-renders the same strings and re-serialises
the same prompt on every step when nothing changed, and on Anthropic that defeats prompt caching
(sending the identical prefix each request misses the cache hit). So `Session` keeps the built
prompt and reuses it whenever the underlying inputs are unchanged: same message count, same
notebook revision, same agent variant. A `todo_write`, a `/save`, or a model switch bumps one of
those and the next step rebuilds. The result is one system prompt string per actual state change,
and identical requests across steps for the unchanged ones.
The prompt also describes only the tools actually offered this turn. A prompt that mentions a
withheld tool teaches the model to attempt impossible calls. Two things narrow that set: a
read-only agent variant, and `toolSets` in config. Both go through `activeTools()`, so a