Skip to content

fix: preserve prompt cache across runtime memory writes - #28

Merged
Grivn merged 2 commits into
mainfrom
codex/runtime-memory-context
Aug 17, 2026
Merged

fix: preserve prompt cache across runtime memory writes#28
Grivn merged 2 commits into
mainfrom
codex/runtime-memory-context

Conversation

@Grivn

@Grivn Grivn commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • project Runtime Memory through DSH's native systemPrompt.context() snapshot path instead of a mutable system-prompt section
  • preserve literal {{}} interpolation and per-Agent workspace overrides
  • document the cache-stable tail-snapshot behavior in English and Chinese

Why

Runtime Memory writes changed the system prompt at the start of every request, invalidating the reusable prefix containing tools and conversation history. DSH runtime-context snapshots keep that prefix stable and append a new user-role snapshot only when the projection changes.

Verification

  • pnpm run verify
  • 324 tests passed; 1 Windows-only test skipped on macOS
  • deterministic build, Headless activation, and package checks passed

Closes #26

@Grivn
Grivn merged commit 29afc97 into main Aug 17, 2026
2 checks passed
@Grivn
Grivn deleted the codex/runtime-memory-context branch August 17, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Runtime Memory 投影注入 system prompt,每次记忆写入都使前缀缓存全量失效(建议改为注入到消息列表末尾)

1 participant