Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(v2): compact full sessions before provider handoffs #13123

ClosedBil0000(GitHub profile, opens in a new tab)wants to merge 5 commits intot3code/codex-turn-mapping fromrefs/pull/13123/headopened View on GitHub

Switching to a smaller model can exhaust the target native session. V2 now compacts that same session, then retries the unchanged request once. Saved chat stays visible; no encrypted provider state is copied.

Verified: 209 focused tests, adapter compaction tests, server typecheck, targeted lint and formatting, and an Opus 5.5 pr-audit. Unknown capacity or unsupported/insufficient compaction can still fail safely.

Built with GPT-6 Astra / Codex; audited with Opus 5.5 / Claude.

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This PR changes the default production behavior for exhausted provider contexts by adding native compaction, retry, and new persistent orchestration transitions across several services. The scope and state-machine complexity are substantial enough to require human review.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. Bil0000(GitHub profile, opens in a new tab) changed the title

    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      All clear

      Posted via Macroscope — Effect Service Conventions
    5. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      All clear

      Posted via Macroscope — Effect Service Conventions
    6. Note

      This comment is posted by Julius' dot

      Closing under the prior-approval rule. This replaces the documented capacity-error/manual-compaction workflow with automatic native compaction and a persisted retry of the original request, including new stop, steering, and restart behavior. That intentional workflow change needs explicit maintainer approval of direction and scope; none is linked or present in the discussion. The model-switch capacity problem and focused tests are useful. Please agree on the automatic-compaction policy with maintainers, link the approval, and request reconsideration.

    7. juliusmarminge closed this

Sign in to join this conversation.