diff options
| author | Adam Malczewski <[email protected]> | 2026-06-24 04:02:09 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-24 04:02:09 +0900 |
| commit | b180cc1e03f90a139c90ef498d1c1fb449508fd7 (patch) | |
| tree | 2daaf7bf051072bdf73b8857ea9daf30f77f3af7 /packages/kernel/src/runtime | |
| parent | 69f89ab49be842d9826fb0b1621cc8c8dea5f14c (diff) | |
| download | dispatch-b180cc1e03f90a139c90ef498d1c1fb449508fd7.tar.gz dispatch-b180cc1e03f90a139c90ef498d1c1fb449508fd7.zip | |
fix(system-prompt): reconstruct on cwd change via getWithMeta
The system-prompt service cached the resolved prompt on first turn and reused
it on subsequent turns via get(). But the prompt is cwd-sensitive (file:AGENTS.md,
prompt:cwd variables). When a conversation's cwd changed after the first turn,
the cached prompt was stale — referenced files from the new cwd were not loaded.
system-prompt: added getWithMeta(conversationId) returning { prompt, cwd } and
stores resolved-cwd:<id> alongside resolved:<id> in construct().
session-orchestrator: subsequent turns now call getWithMeta, compare stored cwd
vs effective cwd, and reconstruct if they differ. Compaction path (always
constructs) and warm path (no system prompt) are unaffected.
1411 vitest pass; tsc + biome clean.
Diffstat (limited to 'packages/kernel/src/runtime')
0 files changed, 0 insertions, 0 deletions
