Skip to content

preserve fork prompt cache state#20909

Closed
friel-openai wants to merge 2 commits into
mainfrom
dev/friel/frodex-129-fork-cache-exec
Closed

preserve fork prompt cache state#20909
friel-openai wants to merge 2 commits into
mainfrom
dev/friel/frodex-129-fork-cache-exec

Conversation

@friel-openai
Copy link
Copy Markdown
Contributor

@friel-openai friel-openai commented May 3, 2026

Summary

Preserves prompt-cache state when Codex starts a forked agent.

Forked agents usually reuse a long prefix of the parent conversation. This PR carries the parent prompt cache key, previous response ID, MCP tool snapshot, and response-continuation state into fork startup so the backend can reuse cached prefix tokens instead of treating the fork as an unrelated request. The change also keeps environment gates for disabling the two experimental fork-cache behaviors during debugging.

Validation

  • CODEX_SKIP_VENDORED_BWRAP=1 cargo build -p codex-cli --bin codex

@friel-openai friel-openai force-pushed the dev/friel/frodex-129-fork-cache-exec branch from ca2bf5d to c11f96b Compare May 3, 2026 23:32
@friel-openai friel-openai force-pushed the dev/friel/frodex-129-fork-cache-exec branch from c11f96b to d1ec95e Compare May 4, 2026 00:18
@friel-openai friel-openai changed the title frodex: preserve fork prompt cache state preserve fork prompt cache state May 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this May 18, 2026
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.

1 participant