Regenerate Codex app-server types from Codex 0.149.1 - #2436
Merged
SawyerHood merged 1 commit intoAug 25, 2026
Conversation
Regenerate the pruned schema under plugins/provider-codex/src/generated from the stable surface of codex app-server generate-ts (0.149.1). The new types surface two real gaps in the hand-written code: - visibility.ts: add the ten new server notifications to both method maps, and drop the manual rawResponse/completed union now that the schema includes it. - session-params.ts: DynamicToolSpec is now a tagged union, so emit type: "function". Codex 0.136.0 (bb's minimum) ignores the extra field and 0.149.1 accepts both shapes via normalize_dynamic_tool_specs. Test fixtures gain the new required fields. The generated README names the current importers and package filter. Co-Authored-By: Claude <noreply@anthropic.com>
SawyerHood
deleted the
bb/regenerate-codex-app-server-types-thr_yd6yrwxywj
branch
August 25, 2026 22:33
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
The vendored Codex app-server types under
plugins/provider-codex/src/generated/codex-app-server/schema/were last generated on 2026-08-17 and had drifted from the Codex CLI that bb now spawns (0.149.1). The stale types hid two real gaps: Codex emits ten server notifications thatvisibility.tsdid not know about, andDynamicToolSpecbecame a tagged union upstream (0.143.0), so bb still sent the legacy untagged shape and only worked because Codex keeps a legacy-format normalizer.What changed
codex app-server generate-ts(stable surface, Codex 0.149.1) and re-pruned to the transitive import closure of the hand-written importers: 235 of the 663 emitted files (33 modified, 32 new, 1 dead fileThreadCompactStartParams.tsremoved). The committed tree matched the stable surface byte-for-byte, and no hand-written code uses experimental fields.visibility.ts: adds the ten new server notifications to both method maps as"unknown"(thread/deleted,thread/reverted,thread/queue/changed,thread/project/updated,thread/environment/{connected,disconnected},project/changed,model/safetyBuffering/updated,autoApprovalReview/strictReviewRequired,externalAgentConfig/import/progress). Drops the manual"rawResponse/completed"union extension now that the schema includes it.session-params.ts:toCodexDynamicToolsemitstype: "function". Verified against upstream source across bb's supported range: Codex 0.136.0 (CODEX_MINIMUM_SUPPORTED_VERSION) deserializes through a struct withoutdeny_unknown_fields, so the extra field is ignored; Codex 0.149.1'snormalize_dynamic_tool_specsaccepts both the legacy and canonical shapes.deliveryonagentMessage,pluginId/scriptPathoncommandExecution,appContext/readOnlyHintonmcpToolCall,resultsonwebSearch,section/sectionEnteredAt/projectId/recencyAtonThread,cacheWriteInputTokens,spendControlReached).adapter.tsand@bb/agent-runtime, which no longer exist) and records that the committed tree is the stable surface.No
HOST_DAEMON_PROTOCOL_VERSIONbump: these types only cross the bridge↔Codex wire, not server↔daemon. No CLI or config surface changed.Not wired up in this PR (flows through existing default paths): the new
subAgentActivityandsleepitem types anddelivery: "async"agent messages.AskForApprovaldropped"on-failure"upstream; nothing in bb used it.How you verified
pnpm exec turbo run typecheck --filter=bb-plugin-provider-codexfailed with 36 errors against the new schema (missing notification methods,DynamicToolSpecshape, missing required fixture fields). After: green.pnpm exec turbo run typecheck test --filter=bb-plugin-provider-codex --force: 24 test files, 238 tests pass. ThetoCodexDynamicToolstest expectation now asserts thetype: "function"tag.HEAD: 0 hits.Fixes #