Skip to content

fix(codex): recover from oversized synthesized turns#111

Closed
juacker wants to merge 1 commit into
mainfrom
fix/codex-oversized-turn-recovery
Closed

fix(codex): recover from oversized synthesized turns#111
juacker wants to merge 1 commit into
mainfrom
fix/codex-oversized-turn-recovery

Conversation

@juacker

@juacker juacker commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • budget Codex synthesized system instructions below the 1,048,576-character hard limit
  • preserve the current user/task prompt verbatim and retain both ends of oversized system instructions
  • add Unicode-safe regression coverage and a 4,096-character safety margin

Root cause

Context-limit recovery compacted persisted conversation history, but Codex validates the complete synthesized turn. Unbounded agent, skill, tool, and workspace instructions could dominate that turn, so compaction rebuilt essentially the same oversized input and failed again.

Verification

  • cargo fmt --manifest-path src-tauri/Cargo.toml -- --check
  • cargo test --manifest-path src-tauri/Cargo.toml assistant::local_agent::tests -- --nocapture (31 passed)
  • independent Code Review Checklist verdict: production_quality

Note

A misconfigured upstream initially mapped the feature push to main; commit 410eb0b immediately reverted it. This PR contains the reviewed change on the explicit feature ref.

@juacker juacker closed this Jul 12, 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