Skip to content

fix(opencodez): align remote compaction with the Codex wire - #11

Merged
Krablante merged 1 commit into
mainfrom
compaction-wire
Oct 15, 2026
Merged

Krablante merged 1 commit into
mainfrom
compaction-wire

Conversation

@Krablante

@Krablante Krablante commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

ChatGPT remote compaction could reject a session before contacting OpenAI because a JSON-byte estimate treated encrypted state as ordinary prompt text. It also bypassed the Codex transport and serialized a different request from normal sampling, preventing WebSocket continuation.

Reuse the prepared sampling controls and authenticated Responses wire for compact. Keep System instructions, reasoning parts, assistant phases, tool schemas and image results consistent. Send the full active input first; only a provider-confirmed context overflow permits one retry with bounded tool outputs. Install the compacted working window only after success.

Validation: 123 focused tests, package typechecks, generated-client checks, and a production build. Live ChatGPT checks cover compacting long existing conversations, continuing them, repeated compaction, and rebuilding the compacted window after a backend restart.

The release workflow passed validation, built all 12 platform archives, and verified their checksums. The inherited broad upstream Blacksmith matrix was not run for this scoped fix.

@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@Krablante
Krablante merged commit 268188d into main Oct 15, 2026
3 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant