Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Approach:
2. Run focused tests for touched event/file.
3. Update snapshots only after confirming expected behavior.
4. Run full suite at end.
5. Do not change the logic of authentication tests.

## Known Env-Dependent Failures

Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/codex-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,22 @@ jobs:
npm run generate-types
git add package.json package-lock.json src/app-server
git commit -m "Update codex to ${{ env.VERSION }}"

- name: Finalize update with Codex
id: codex-finalize
uses: openai/codex-action@v1
with:
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
codex-version: ${{ env.VERSION }}
codex-args: '-c shell_environment_policy.inherit=none'
output-file: pr-body.md
prompt: >
Finalize the update using codex-update-compat skill.
Commit the changes, the message should mention that types or/and tests after the update were fixed.
Do not include validation run details to the final message, mention only what you changed and why.

- name: Push branch updates
run: |
git push origin "${{ env.BRANCH }}"

- name: Generate GitHub App token
Expand All @@ -75,8 +91,10 @@ jobs:
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
echo -e "[What's new](https://github.com/openai/codex/releases/tag/rust-v${{ env.VERSION }})\n\n$(cat pr-body.md 2>/dev/null || true)" > pr-body.md

gh pr create \
--base main \
--title "Update codex to ${{ env.VERSION }}" \
--body "[What's new](https://github.com/openai/codex/releases/tag/rust-v${{ env.VERSION }})" \
--body-file pr-body.md \
--label "codex-update"
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- Tests live under `src/__tests__/` and use Vitest.
- Favor event-driven assertions (see `src/__tests__/CodexACPAgent/*`).
- Prefer snapshot-based tests using `toMatchFileSnapshot()` over inline assertions.
- When snapshot response data drifts, prefer replacing that response payload with a stable placeholder over asserting fragile fields.
- When snapshot response data drifts, prefer replacing that response payload with a stable placeholder over asserting fragile fields (except for 'model/list').
- Focus on behavior and outputs rather than implementation details.
- Use `/run-codex` skill (`.claude/skills/run-codex/`) to test with real Codex and observe actual events.

Expand Down
65 changes: 30 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"license": "ISC",
"type": "module",
"devDependencies": {
"@openai/codex": "^0.111.0",
"@openai/codex": "^0.114.0",
"@types/node": "^24.10.1",
"mcp-hello-world": "^1.1.2",
"tsx": "^4.20.6",
Expand Down
4 changes: 4 additions & 0 deletions src/CodexEventHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ export class CodexEventHandler {
return null;
case "item/commandExecution/outputDelta":
return this.createCommandOutputDeltaEvent(notification.params);
case "command/exec/outputDelta":
case "hook/started":
case "hook/completed":
return null;
case "item/reasoning/summaryTextDelta": //TODO streaming reasoning?
case "item/reasoning/summaryPartAdded":
//skipped events
Expand Down
6 changes: 1 addition & 5 deletions src/__tests__/CodexACPAgent/CodexAcpClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,11 @@ describe('ACP server test', { timeout: 40_000 }, () => {
const codexAcpAgent = fixture.getCodexAcpAgent();

await codexAcpAgent.initialize({protocolVersion: 1});
await fixture.getCodexAcpClient().logout();
fixture.clearCodexConnectionDump();
fixture.getCodexAcpClient().authRequired = vi.fn().mockResolvedValue(true);

await expect(
codexAcpAgent.newSession({cwd: "", mcpServers: []})
).rejects.toThrow("Authentication required");

const transportDump = fixture.getCodexConnectionDump(ignoredFields);
await expect(transportDump).toMatchFileSnapshot("data/auth-failed.json");
});

it('should authenticate with key', async () => {
Expand Down
33 changes: 28 additions & 5 deletions src/__tests__/CodexACPAgent/data/auth-with-key.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@
"id": "id",
"model": "model",
"upgrade": "upgrade",
"upgradeInfo": null,
"upgradeInfo": {
"model": "model",
"upgradeCopy": null,
"modelLink": null,
"migrationMarkdown": "Introducing GPT-5.4\n\nCodex just got an upgrade with GPT-5.4, our most capable model for professional work. It outperforms prior models while being more token efficient, with notable improvements on long-running tasks, tool calling, computer use, and frontend development.\n\nLearn more: https://openai.com/index/introducing-gpt-5-4\n\nYou can always keep using GPT-5.3-Codex if you prefer.\n"
},
"availabilityNux": null,
"displayName": "gpt-5.3-codex",
"description": "Latest frontier agentic coding model.",
Expand All @@ -96,6 +101,24 @@
"supportsPersonality": true,
"isDefault": true
},
{
"id": "id",
"model": "model",
"upgrade": "upgrade",
"upgradeInfo": null,
"availabilityNux": null,
"displayName": "gpt-5.4",
"description": "Latest frontier agentic coding model.",
"hidden": false,
"supportedReasoningEfforts": "supportedReasoningEfforts",
"defaultReasoningEffort": "medium",
"inputModalities": [
"text",
"image"
],
"supportsPersonality": true,
"isDefault": false
},
{
"id": "id",
"model": "model",
Expand All @@ -104,7 +127,7 @@
"model": "model",
"upgradeCopy": null,
"modelLink": null,
"migrationMarkdown": "**Codex just got an upgrade. Introducing {model_to}.**\n\nCodex is now powered by {model_to}, our most capable agentic coding model yet. It's built for long-running, project-scale work, with mid-turn steering + frequent progress updates so you can collaborate while it runs (and it's faster too).\n\nLearn more: https://openai.com/index/introducing-gpt-5-3-codex/\n\nYou can keep using {model_from} if you prefer.\n"
"migrationMarkdown": "Introducing GPT-5.4\n\nCodex just got an upgrade with GPT-5.4, our most capable model for professional work. It outperforms prior models while being more token efficient, with notable improvements on long-running tasks, tool calling, computer use, and frontend development.\n\nLearn more: https://openai.com/index/introducing-gpt-5-4\n\nYou can always keep using GPT-5.3-Codex if you prefer.\n"
},
"availabilityNux": null,
"displayName": "gpt-5.2-codex",
Expand All @@ -127,7 +150,7 @@
"model": "model",
"upgradeCopy": null,
"modelLink": null,
"migrationMarkdown": "**Codex just got an upgrade. Introducing {model_to}.**\n\nCodex is now powered by {model_to}, our most capable agentic coding model yet. It's built for long-running, project-scale work, with mid-turn steering + frequent progress updates so you can collaborate while it runs (and it's faster too).\n\nLearn more: https://openai.com/index/introducing-gpt-5-3-codex/\n\nYou can keep using {model_from} if you prefer.\n"
"migrationMarkdown": "Introducing GPT-5.4\n\nCodex just got an upgrade with GPT-5.4, our most capable model for professional work. It outperforms prior models while being more token efficient, with notable improvements on long-running tasks, tool calling, computer use, and frontend development.\n\nLearn more: https://openai.com/index/introducing-gpt-5-4\n\nYou can always keep using GPT-5.3-Codex if you prefer.\n"
},
"availabilityNux": null,
"displayName": "gpt-5.1-codex-max",
Expand All @@ -150,7 +173,7 @@
"model": "model",
"upgradeCopy": null,
"modelLink": null,
"migrationMarkdown": "**Codex just got an upgrade. Introducing {model_to}.**\n\nCodex is now powered by {model_to}, our most capable agentic coding model yet. It's built for long-running, project-scale work, with mid-turn steering + frequent progress updates so you can collaborate while it runs (and it's faster too).\n\nLearn more: https://openai.com/index/introducing-gpt-5-3-codex/\n\nYou can keep using {model_from} if you prefer.\n"
"migrationMarkdown": "Introducing GPT-5.4\n\nCodex just got an upgrade with GPT-5.4, our most capable model for professional work. It outperforms prior models while being more token efficient, with notable improvements on long-running tasks, tool calling, computer use, and frontend development.\n\nLearn more: https://openai.com/index/introducing-gpt-5-4\n\nYou can always keep using GPT-5.3-Codex if you prefer.\n"
},
"availabilityNux": null,
"displayName": "gpt-5.2",
Expand All @@ -173,7 +196,7 @@
"model": "model",
"upgradeCopy": null,
"modelLink": null,
"migrationMarkdown": "**Codex just got an upgrade. Introducing {model_to}.**\n\nCodex is now powered by {model_to}, our most capable agentic coding model yet. It's built for long-running, project-scale work, with mid-turn steering + frequent progress updates so you can collaborate while it runs (and it's faster too).\n\nLearn more: https://openai.com/index/introducing-gpt-5-3-codex/\n\nYou can keep using {model_from} if you prefer.\n"
"migrationMarkdown": "Introducing GPT-5.4\n\nCodex just got an upgrade with GPT-5.4, our most capable model for professional work. It outperforms prior models while being more token efficient, with notable improvements on long-running tasks, tool calling, computer use, and frontend development.\n\nLearn more: https://openai.com/index/introducing-gpt-5-4\n\nYou can always keep using GPT-5.3-Codex if you prefer.\n"
},
"availabilityNux": null,
"displayName": "gpt-5.1-codex-mini",
Expand Down
Loading
Loading