refactor(server): remove the unused V1 Codex session runtime - #13462
Conversation
makeCodexSessionRuntime had no production caller since the V2 Codex adapter took over. Its only live exports were the MCP elicitation helpers used by CodexAdapterV2, which now live in provider/CodexMcpElicitation.ts with their tests. The developer instruction tests that sat in the V1 test file move next to CodexDeveloperInstructions.ts. Deletes the runtime, its V1-only tests, the collab integration and wire routing tests that exercised it, the Windows mock-peer wrapper only that integration test spawned, and codexSessionAppServerArgs. The .sh/.mjs mock peer and codexMultiAgentWire.json stay: the provider registry readiness probe test still spawns them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This PR removes an unused V1 Codex runtime and its dedicated test harness while relocating shared MCP elicitation helpers without changing their implementation or the active V2 path. The remaining changes are limited to tests, tooling, documentation, and private-symbol cleanup. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
982c612
into
t3code/codex-turn-mapping
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
makeCodexSessionRuntime(the V1 Codex session runtime, ~2,700 lines) has had no production caller since the V2 Codex adapter took over. It was kept alive by one integration test and byCodexAdapterV2importing two MCP elicitation helpers from it.What changed
describeMcpElicitationandtoMcpElicitationResponse(plus their private schemas and helpers) now live inapps/server/src/provider/CodexMcpElicitation.ts, next to the other shared Codex modules (CodexDeveloperInstructions.ts,CodexToolPresentation.ts). The code is moved as-is.CodexAdapterV2imports from the new module.CodexMcpElicitation.test.ts. The 8 developer/browser instruction tests, which only exercisedbuildCodexDeveloperInstructions, go toCodexDeveloperInstructions.test.ts. Both are unchanged.CodexSessionRuntime.tsCodexSessionRuntime.test.ts: thread history/pagination,buildTurnStartParams,hasConfiguredMcpServer, the memory-consolidation filter,codexSessionAppServerArgs,isRecoverableThreadResumeError,openCodexThread, plus one test that only restated aneffect-codex-app-servererror message.CodexCollabRuntime.integration.test.ts, which booted the V1 runtime against a mock peer.CodexCollabWire.test.ts, which tested the V1 child-notification router.codexCollabMockPeer.cmd: only that integration test spawned it on Windows. The registry test that still uses the peer skips Windows.codexSessionAppServerArgs, which only V1 used.codexCollabMockPeer.sh/.mjsandcodexMultiAgentWire.json.ProviderInstanceRegistryLive.test.tsstill spawns the peer as a fakecodexfor the readiness probe.collabAgentToolCallhandling inCodexAdapterV2is not touched: Codex 0.156.1 still emits v1 collab items.buildCodexInitializeParamsis now private (knip flagged it as an unused export once V1 was gone). The manual-Effect-runner lint ceiling for the deleted test file is removed. The V2 TODO and the lineage doc now describe the missing paginated rollback path directly instead of pointing at V1.Not ported (V2 behaves differently)
memory_consolidationsubagent threads. V2 has no equivalent filter.thread/startwhen resume fails recoverably. V1 started a fresh thread whenthread/resumefailed with a "thread not found / no rollout" style error. V2resumeThreadsurfaces the error instead.buildTurnStartParamsrewrote skill mentions typed with any currency sigil (€review,£review) into Codex's canonical$reviewform (fix(skills): support unicode currency symbols as skill aliases #12098). This PR deletes its only test, "sends currency skill aliases in Codex's canonical dollar form". V2 already lacked the rewrite before this PR; fix(server): Codex V2 runs skills typed with any currency sigil #13461 fixes that separately.packages/effect-codex-app-server/src/client.ts:272).Verification
vp exec tsc --noEmit -p .inapps/server: noerror TS.vp linton every touched TS file: 0 errors. The 2 existingno-unused-varswarnings inCodexAdapterV2.tswere already there before this change.vp fmton touched files.knip --workspace apps/server --workspace packages/effect-codex-app-server --exportsandknip --include files,dependencies: clean after makingbuildCodexInitializeParamsprivate.vp test runonCodexMcpElicitation.test.ts,CodexDeveloperInstructions.test.ts,codexLaunchArgs.test.ts,CodexProvider.test.ts,CodexAdapterV2.test.ts,ProviderInstanceRegistryLive.test.ts: 6 files, 152 tests passed.git grepover apps, packages, scripts, docs,.githuband root config for every deleted symbol and file name: no remaining references.Model: Claude Opus 5.5 (Claude Code)
🤖 Generated with Claude Code