Handle new Codex terminal error variants - #2455
Open
ymichael wants to merge 1 commit into
Open
Conversation
Keep the handwritten runtime error schema aligned with the generated Codex contract so session-budget and misalignment failures remain normalized and terminal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
Codex 0.149.1 added
sessionBudgetExceededandmisalignmentPolicyViolationto its generated error contract, but BB's handwritten runtime schema and category mapper remained stale. Because botherrorand failedturn/completedpass through that shared parser, either new literal was downgraded to an unhandled provider event and the failed turn omitted its terminal boundary. The root cause and current-main reproduction are recorded in the fixer thread.What changed
CodexErrorInfounion and the handwritten runtime schema so future regeneration drift fails typecheck.budget-exceeded, not an accountrate-limit, and classify misalignment aspolicy; preserve both exact provider codes.errorand failedturn/completedbehavior.This is provider-local runtime translation. No server/daemon wire contract changed, so
HOST_DAEMON_PROTOCOL_VERSIONis unchanged.How you verified
provider/unhandledinstead ofprovider/errorand never reached their failed-turn boundary assertion.origin/main.pnpm exec turbo run typecheck test build --filter=bb-plugin-provider-codex --force: 24 test files and 240 tests passed; typecheck and applicable build prerequisites passed.provider.errorplusturn.boundary; error info is exactlybudget-exceeded/sessionBudgetExceededandpolicy/misalignmentPolicyViolation.Fixes #