Commit Graph
3607 Commits
Author SHA1 Message Date
Michael Bolin cea5b106cc Merge 7ca0c2f20f into sapling-pr-archive-bolinfest 2025-09-11 20:35:13 -07:00
Michael Bolin 7ca0c2f20f feat: include reasoning_effort in NewConversationResponse 2025-09-11 20:35:05 -07:00
Dylan 027944c64e fix: improve handle_sandbox_error timeouts (#3435)
## Summary
Handle timeouts the same way, regardless of approval mode. There's more
to do here, but this is simple and should be zero-regret

## Testing
- [x] existing tests pass
- [x] test locally and verify rollout
2025-09-11 12:09:20 -07:00
Michael Bolin bec51f6c05 chore: enable clippy::redundant_clone (#3489)
Created this PR by:

- adding `redundant_clone` to `[workspace.lints.clippy]` in
`cargo-rs/Cargol.toml`
- running `cargo clippy --tests --fix`
- running `just fmt`

Though I had to clean up one instance of the following that resulted:

```rust
let codex = codex;
```
2025-09-11 11:59:37 -07:00
pakrym-oai 66967500bb Assign the entire gpt-5 model family same characteristics (#3490)
So the context size indicator is displayed.
2025-09-11 18:56:49 +00:00
Michael Bolin 1b174eb6a2 merge commit for archive created by Sapling 2025-09-11 11:49:50 -07:00
Michael Bolin 93a3227a87 chore: enable clippy::redundant_clone 2025-09-11 11:49:45 -07:00
Michael Bolin e259027af6 merge commit for archive created by Sapling 2025-09-11 11:46:02 -07:00
Michael Bolin 989976c69d chore: enable clippy::redundant_clone 2025-09-11 11:45:48 -07:00
Ahmed Ibrahim 167b4f0e25 Clear composer on fork (#3445)
Fixes this

<img width="344" height="51" alt="image"
src="https://github.com/user-attachments/assets/f227d338-b044-4f8d-bf07-87499b4230d8"
/>
2025-09-11 11:45:17 -07:00
Michael Bolin c68ad4a0b5 Merge 19aa4c1fd3 into sapling-pr-archive-bolinfest 2025-09-11 11:45:01 -07:00
Michael Bolin 19aa4c1fd3 chore: enable clippy::redundant_clone 2025-09-11 11:44:32 -07:00
Michael Bolin 167154178b fix: use -F instead of -f for force=true in gh call (#3486)
Apparently `-F` is the correct thing to use. From the code sample on 


https://docs.github.com/en/rest/git/refs?apiVersion=2022-11-28#update-a-reference

```shell
gh api \
  --method PATCH \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  /repos/OWNER/REPO/git/refs/REF \
   -f 'sha=aa218f56b14c9653891f9e74264a383fa43fefbd' -F "force=true"
```

Also, I ran the following locally and verified it worked:

```shell
export GITHUB_REPOSITORY=openai/codex
export GITHUB_SHA=305252b2fb2d57bb40a9e4bad269db9a761f7099
gh api \
  repos/${GITHUB_REPOSITORY}/git/refs/heads/latest-alpha-cli \
  -X PATCH \
  -f sha="${GITHUB_SHA}" \
  -F force=true
```

`$GITHUB_REPOSITORY` and `$GITHUB_SHA` should already be available as
environment variables for the `run` step without having to be redeclared
in the `env` section.
2025-09-11 11:32:47 -07:00
Michael Bolin e1b5c172e4 merge commit for archive created by Sapling 2025-09-11 11:13:05 -07:00
Michael Bolin 5d07b3c250 fix: use -F instead of -f for force=true in gh call 2025-09-11 11:12:57 -07:00
Ahmed Ibrahim 674e3d3c90 Add Compact and Turn Context to the rollout items (#3444)
Adding compact and turn context to the rollout items

based on #3440
2025-09-11 18:08:51 +00:00
jif-oai 114ce9ff4d NIT unified exec (#3479)
Fix the default value of the experimental flag of unified_exec
2025-09-11 16:19:12 +00:00
Eric Traut e13b35ecb0 Simplify auth flow and reconcile differences between ChatGPT and API Key auth (#3189)
This PR does the following:
* Adds the ability to paste or type an API key.
* Removes the `preferred_auth_method` config option. The last login
method is always persisted in auth.json, so this isn't needed.
* If OPENAI_API_KEY env variable is defined, the value is used to
prepopulate the new UI. The env variable is otherwise ignored by the
CLI.
* Adds a new MCP server entry point "login_api_key" so we can implement
this same API key behavior for the VS Code extension.
<img width="473" height="140" alt="Screenshot 2025-09-04 at 3 51 04 PM"
src="https://github.com/user-attachments/assets/c11bbd5b-8a4d-4d71-90fd-34130460f9d9"
/>
<img width="726" height="254" alt="Screenshot 2025-09-04 at 3 51 32 PM"
src="https://github.com/user-attachments/assets/6cc76b34-309a-4387-acbc-15ee5c756db9"
/>
2025-09-11 09:16:34 -07:00
Jeremy RoseandCodex 377af75730 apply-patch: sort replacements and add regression tests (#3425)
- Ensure replacements are applied in index order for determinism.
- Add tests for addition chunk followed by removal and worktree-aware
helper.

This fixes a panic I observed.

Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
2025-09-11 09:07:03 -07:00
Michael Bolin 86e0f31a7e chore: rust-release.yml should update the latest-alpha-cli branch (#3458)
This updates `rust-release.yml` so that the last step of creating a
release entails updating the `latest-alpha-cli` branch to point to the
tag used to create the latest release. This will facilitate building
automation to identify the most recent alpha release of Codex CLI
(though note this branch could also point to an official release, as it
is implemented today).

This introduces a new job, `update-branch`, which depends on the
`release` job. I made it separate from the `release` job because
`update-branch` needs the `contents: write` permission, so this limits
the amount of work we do with that permission.

Note I also created a branch protection rule for `latest-alpha-cli`
that:

- specifies repository admins as the only members of the bypass list
- only those with bypass permissions can create, update, or delete this
branch
- this branch requires a linear history
- note that force pushes _are_ allowed

This is the first step in fixing
https://github.com/openai/codex/issues/3098.
2025-09-11 08:06:28 -07:00
Michael Bolin 29bb73a911 merge commit for archive created by Sapling 2025-09-10 23:46:13 -07:00
Michael Bolin 0df0ca8cf4 chore: rust-release.yml should update the latest-alpha-cli branch 2025-09-10 23:46:06 -07:00
Michael Bolin 8f837f1093 fix: add check to ensure output of generate_mcp_types.py matches codex-rs/mcp-types/src/lib.rs (#3450)
As a follow-up to https://github.com/openai/codex/pull/3439, this adds a
CI job to ensure the codegen script has to be updated in order to change
`codex-rs/mcp-types/src/lib.rs`.
2025-09-10 23:31:28 -07:00
Michael Bolin a5aae350a6 merge commit for archive created by Sapling 2025-09-10 23:29:37 -07:00
Michael Bolin b1eb9dc185 chore: rust-release.yml should update the latest-alpha-cli branch 2025-09-10 23:28:07 -07:00
Michael Bolin 1bcc79fad6 Merge a3e6ccf32f into sapling-pr-archive-bolinfest 2025-09-10 23:09:37 -07:00
Michael Bolin a3e6ccf32f chore: rust-release.yml should update the latest-alpha-cli branch 2025-09-10 23:09:30 -07:00
Michael Bolin d29da8de9a merge commit for archive created by Sapling 2025-09-10 19:03:09 -07:00
Michael Bolin b4ac6439f0 fix: add check to ensure output of generate_mcp_types.py matches codex-rs/mcp-types/src/lib.rs 2025-09-10 19:03:04 -07:00
Michael Bolin 707d0bfec0 merge commit for archive created by Sapling 2025-09-10 19:01:16 -07:00
Michael Bolin 6bc81ef229 fix: add check to ensure output of generate_mcp_types.py matches codex-rs/mcp-types/src/lib.rs 2025-09-10 19:01:10 -07:00
Michael Bolin a30f990c45 Merge ad5f80d201 into sapling-pr-archive-bolinfest 2025-09-10 18:59:35 -07:00
Michael Bolin ad5f80d201 fix: add check to ensure output of generate_mcp_types.py matches codex-rs/mcp-types/src/lib.rs 2025-09-10 18:59:26 -07:00
Ahmed Ibrahim 162e1235a8 Change forking to read the rollout from file (#3440)
This PR changes get history op to get path. Then, forking will use a
path. This will help us have one unified codepath for resuming/forking
conversations. Will also help in having rollout history in order. It
also fixes a bug where you won't see the UI when resuming after forking.
2025-09-10 17:42:54 -07:00
jif-oai c09ed74a16 Unified execution (#3288)
## Unified PTY-Based Exec Tool

Note: this requires to have this flag in the config:
`use_experimental_unified_exec_tool=true`

- Adds a PTY-backed interactive exec feature (“unified_exec”) with
session reuse via
  session_id, bounded output (128 KiB), and timeout clamping (≤ 60 s).
- Protocol: introduces ResponseItem::UnifiedExec { session_id,
arguments, timeout_ms }.
- Tools: exposes unified_exec as a function tool (Responses API);
excluded from Chat
  Completions payload while still supported in tool lists.
- Path handling: resolves commands via PATH (or explicit paths), with
UTF‑8/newline‑aware
  truncation (truncate_middle).
- Tests: cover command parsing, path resolution, session
persistence/cleanup, multi‑session
  isolation, timeouts, and truncation behavior.
2025-09-10 17:38:11 -07:00
Michael Bolin 65f3528cad feat: add UserInfo request to JSON-RPC server (#3428)
This adds a simple endpoint that provides the email address encoded in
`$CODEX_HOME/auth.json`.

As noted, for now, we do not hit the server to verify this is the user's
true email address.
2025-09-10 17:03:35 -07:00
Michael Bolin 44262d8fd8 fix: ensure output of codex-rs/mcp-types/generate_mcp_types.py matches codex-rs/mcp-types/src/lib.rs (#3439)
https://github.com/openai/codex/pull/3395 updated `mcp-types/src/lib.rs`
by hand, but that file is generated code that is produced by
`mcp-types/generate_mcp_types.py`. Unfortunately, we do not have
anything in CI to verify this right now, but I will address that in a
subsequent PR.

#3395 ended up introducing a change that added a required field when
deserializing `InitializeResult`, breaking Codex when used as an MCP
client, so the quick fix in #3436 was to make the new field `Optional`
with `skip_serializing_if = "Option::is_none"`, but that did not address
the problem that `mcp-types/generate_mcp_types.py` and
`mcp-types/src/lib.rs` are out of sync.

This PR gets things back to where they are in sync. It removes the
custom `mcp_types::McpClientInfo` type that was added to
`mcp-types/src/lib.rs` and forces us to use the generated
`mcp_types::Implementation` type. Though this PR also updates
`generate_mcp_types.py` to generate the additional `user_agent:
Optional<String>` field on `Implementation` so that we can continue to
specify it when Codex operates as an MCP server.

However, this also requires us to specify `user_agent: None` when Codex
operates as an MCP client.

We may want to introduce our own `InitializeResult` type that is
specific to when we run as a server to avoid this in the future, but my
immediate goal is just to get things back in sync.
2025-09-10 16:14:41 -07:00
Michael Bolin 1c62f360b5 merge commit for archive created by Sapling 2025-09-10 16:13:12 -07:00
Michael Bolin 62d8c68d19 feat: add UserInfo request to JSON-RPC server 2025-09-10 16:13:03 -07:00
Jeremy RoseandCodex 95a9938d3a fix trampling projects table when accepting trusted dirs (#3434)
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
2025-09-10 23:01:31 +00:00
Michael Bolin f44332ad41 Merge 2a002b77e9 into sapling-pr-archive-bolinfest 2025-09-10 15:52:48 -07:00
Michael Bolin 2a002b77e9 fix: ensure output of codex-rs/mcp-types/generate_mcp_types.py matches codex-rs/mcp-types/src/lib.rs 2025-09-10 15:51:41 -07:00
Jeremy Rose f69f07b028 put workspace roots in the environment context (#3375)
to keep the tool description constant when the writable roots change.
2025-09-10 15:10:52 -07:00
Michael Bolin c594b67982 Merge 44ca4952c9 into sapling-pr-archive-bolinfest 2025-09-10 14:32:03 -07:00
Michael Bolin 44ca4952c9 fix: ensure output of codex-rs/mcp-types/generate_mcp_types.py matches codex-rs/mcp-types/src/lib.rs 2025-09-10 14:31:47 -07:00
Gabriel Peal 8d766088e6 Make user_agent optional (#3436)
# External (non-OpenAI) Pull Request Requirements

Currently, mcp server fail to start with:
```
🖐  MCP client for `<CLIENT>` failed to start: missing field `user_agent`
````

It isn't clear to me yet why this is happening. My understanding is that
this struct is simply added as a new field to the response but this
should fix it until I figure out the full story here.

<img width="714" height="262" alt="CleanShot 2025-09-10 at 13 58 59"
src="https://github.com/user-attachments/assets/946b1313-5c1c-43d3-8ae8-ecc3de3406fc"
/>
2025-09-10 14:15:02 -07:00
dedrisian-oai 87654ec0b7 Persist model & reasoning changes (#2799)
Persists `/model` changes across both general and profile-specific
sessions.
2025-09-10 20:53:46 +00:00
Michael Bolin 51d9e05de7 Back out "feat: POSIX unification and snapshot sessions (#3179)" (#3430)
This reverts https://github.com/openai/codex/pull/3179.

#3179 appears to introduce a regression where sourcing dotfiles causes a
bunch of activity in the title bar (and potentially slows things down?)


https://github.com/user-attachments/assets/a68f7fb3-0749-4e0e-a321-2aa6993e01da

Verified this no longer happens after backing out #3179.

Original commit changeset: 62bd0e3d9d
2025-09-10 12:40:24 -07:00
Michael Bolin d98f623a23 Merge f2953eb587 into sapling-pr-archive-bolinfest 2025-09-10 12:36:38 -07:00
Michael Bolin f2953eb587 fix: have the GitHub Action publish to npm 2025-09-10 12:36:31 -07:00