Skip to content

fix(context): snapshot primary thread compaction - #137

Merged
yanpgwang merged 1 commit into
mainfrom
codex/fix-primary-context-snapshots
Aug 11, 2026
Merged

fix(context): snapshot primary thread compaction#137
yanpgwang merged 1 commit into
mainfrom
codex/fix-primary-context-snapshots

Conversation

@yanpgwang

Copy link
Copy Markdown
Owner

Summary

  • persist immutable context-compaction snapshots for the primary Thread as well as child Threads
  • restore the first committed primary projection on a retried PrepareTurn Activity, even if context policy or token budget changes between attempts
  • verify that primary events and snapshots use the existing primary Thread ledger and database constraints
  • update architecture and compatibility docs to describe compaction checkpoints as per-Thread rather than child-only

The database schema and runtime already model the primary conversation as a durable Thread. The remaining child-only guard in PrepareTurn prevented primary compaction from using the same replay-safe checkpoint mechanism.

Verification

  • make verify
  • make test-service
  • make docs-check
  • focused primary/child Activity retry tests
  • focused PostgreSQL primary/child snapshot tests

@yanpgwang
yanpgwang merged commit 44a4c81 into main Aug 11, 2026
6 checks passed
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