-
Notifications
You must be signed in to change notification settings - Fork 60
Update codex to 0.106.0 #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
476fa75
Update codex to 0.106.0
github-actions[bot] e497416
LLM-25226 add missing classes
83702c4
LLM-25226 Update Codex to 0.106.0 and align event mapping for new app…
543f19c
LLM-25226 Add codex-update-compat skill for future Codex migrations
07de945
LLM-25226 update test data
d81a0ac
LLM-25226 refactor test
dbe34c9
LLM-25226 extract common code
c43e1b6
Merge branch 'main' into codex-update/0.106.0
slapoguzov 1d2bbc9
LLM-25226 clean up dynamicToolCall
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| --- | ||
| name: codex-update-compat | ||
| description: Upgrade Codex in this repository and resolve compatibility regressions caused by app-server schema/protocol changes. Use when bumping Codex/npm package versions, regenerating `src/app-server` types, fixing TypeScript errors after update, repairing event mappings, and updating tests/snapshots to match new Codex behavior (especially model list, thread/session fields, sandbox policy shape, and tool/event notifications). | ||
| --- | ||
|
|
||
| # Codex Update Compat | ||
|
|
||
| Use this workflow to safely upgrade Codex and close update-induced regressions. | ||
|
|
||
| ## Workflow | ||
|
|
||
| 1. Inspect update scope before changing code. | ||
| Run: | ||
| ```bash | ||
| git log --oneline -n 5 | ||
| git show --name-only --oneline -n 1 | ||
| ``` | ||
| Focus first on `package.json`, `package-lock.json`, and generated `src/app-server/**` changes. | ||
|
|
||
| 2. Run typecheck and tests immediately. | ||
| Run: | ||
| ```bash | ||
| npm run typecheck | ||
| npm test | ||
| ``` | ||
| Treat type errors as the migration guide for required protocol changes. | ||
|
|
||
| 3. Fix runtime compatibility in source files. | ||
| Typical hotspots: | ||
| - `src/CodexAcpClient.ts`: thread start/resume params and initialize capabilities | ||
| - `src/AgentMode.ts`: sandbox policy shape changes | ||
| - `src/CodexEventHandler.ts`: new/changed server notifications | ||
| - `src/CodexAcpServer.ts`: history replay for new `ThreadItem` variants | ||
| - `src/CodexToolCallMapper.ts`: mapping new tool-like items to ACP events | ||
|
|
||
| 4. Fix test fixtures and snapshots. | ||
| Update typed fixtures for new required fields instead of weakening types. | ||
| Then update snapshots only after behavior is intentionally verified. | ||
|
|
||
| 5. Re-run targeted suites, then full checks. | ||
| Run focused tests for touched behavior, then: | ||
| ```bash | ||
| npm run typecheck | ||
| npm test | ||
| ``` | ||
|
|
||
| ## Non-Trivial Changes: Ask Before Finalizing | ||
|
|
||
| When migration requires behavior decisions (not only schema fixes), ask the user first. Examples: | ||
| - Enabling/disabling experimental flags (`persistExtendedHistory`, `experimentalApi`) | ||
| - User-visible messaging changes for new events (e.g., model reroute wording) | ||
| - Converting integration tests to mocks or skipping env-dependent tests | ||
|
|
||
| ## Event Mapping Rule | ||
|
|
||
| Do not silently drop new event/item variants if they should be visible to users. | ||
| Map them to ACP updates: | ||
| - Tool-like operations -> `tool_call` / `tool_call_update` | ||
| - Informational reasoning/infra events -> `agent_thought_chunk` (if user-meaningful) | ||
| - Internal/noise events -> explicit no-op case (documented in switch) | ||
|
|
||
| ## References | ||
|
|
||
| For common break patterns and ready fixes, read: | ||
| - `references/codex-update-playbook.md` |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| interface: | ||
| display_name: "Codex Update Compat" | ||
| short_description: "Upgrade Codex and resolve compatibility" | ||
| default_prompt: "Update Codex, run typecheck/tests, and fix app-server compatibility regressions." |
74 changes: 74 additions & 0 deletions
74
.agents/skills/codex-update-compat/references/codex-update-playbook.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # Codex Update Playbook | ||
|
|
||
| Use this checklist when Codex version bumps cause compile/test breakage. | ||
|
|
||
| ## Common Type Breakages | ||
|
|
||
| 1. New required model fields. | ||
| Symptoms: | ||
| - `Property 'hidden' is missing in type ...` | ||
| Fix: | ||
| - Add `hidden: false` (or expected value) in all `Model` fixtures. | ||
|
|
||
| 2. Thread shape expansion. | ||
| Symptoms: | ||
| - Missing `status`, `agentNickname`, `agentRole`, `name` in `Thread`. | ||
| Fix: | ||
| - Add these fields in test fixtures and mocks. | ||
|
|
||
| 3. Thread item schema changes. | ||
| Symptoms: | ||
| - `agentMessage` missing `phase`. | ||
| Fix: | ||
| - Add `phase: null` unless specific phase is required by test. | ||
|
|
||
| 4. Rate limits payload changes. | ||
| Symptoms: | ||
| - Missing `limitId` / `limitName` in `RateLimitSnapshot`. | ||
| Fix: | ||
| - Include `limitId` and `limitName` under `rateLimits` snapshot object. | ||
| - If notification wrapper changed, map from new shape in handler. | ||
|
|
||
| 5. Sandbox policy contract changes. | ||
| Symptoms: | ||
| - Missing `access` for read-only or `readOnlyAccess` for workspace-write policy. | ||
| Fix: | ||
| - Provide required nested objects in policy fixtures and runtime mapping. | ||
|
|
||
| 6. Thread start/resume required flags. | ||
| Symptoms: | ||
| - Missing `persistExtendedHistory`. | ||
| Fix: | ||
| - Set explicitly in `threadStart` and `threadResume` params. | ||
| - Keep `false` unless user confirms enabling experimental behavior. | ||
|
|
||
| ## Event Compatibility Patterns | ||
|
|
||
| 1. New tool-like items/events. | ||
| Approach: | ||
| - Add mapper function in `CodexToolCallMapper.ts`. | ||
| - Emit `tool_call` on start and `tool_call_update` on completion. | ||
| - Include meaningful `kind`, `title`, and `rawInput`. | ||
|
|
||
| 2. Streaming/progressive session events. | ||
| Approach: | ||
| - Keep stable `toolCallId`. | ||
| - First event: `tool_call`, subsequent events: `tool_call_update`. | ||
| - Completion event should set `status: completed` or `failed`. | ||
|
|
||
| 3. Informational infra events (e.g., model reroute). | ||
| Approach: | ||
| - Emit `agent_thought_chunk` with concise user-readable text. | ||
|
|
||
| ## Test Strategy | ||
|
|
||
| 1. Fix types first (`npm run typecheck`). | ||
| 2. Run focused tests for touched event/file. | ||
| 3. Update snapshots only after confirming expected behavior. | ||
| 4. Run full suite at end. | ||
|
|
||
| ## Known Env-Dependent Failures | ||
|
|
||
| Authentication integration tests may fail on CI/local machines due OS keychain restrictions: | ||
| - examples: `failed to save api key`, `logout failed`, `Operation not permitted`. | ||
| Treat separately from migration regressions. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.