Commit Graph
8634 Commits
Author SHA1 Message Date
Ahmed Ibrahim e3aaee00c8 feat: show gpt mini (#6583) 2025-11-13 05:21:00 +00:00
Ahmed Ibrahim b1979b70a8 remove porcupine model slug (#6580) 2025-11-13 04:43:31 +00:00
Eric Traut 73ed30d7e5 Avoid hang when tool's process spawns grandchild that shares stderr/stdout (#6575)
We've received many reports of codex hanging when calling certain tools.
[Here](https://github.com/openai/codex/issues/3204) is one example. This
is likely a major cause. The problem occurs when
`consume_truncated_output` waits for `stdout` and `stderr` to be closed
once the child process terminates. This normally works fine, but it
doesn't handle the case where the child has spawned grandchild processes
that inherits `stdout` and `stderr`.

The fix was originally written by @md-oai in [this
PR](https://github.com/openai/codex/pull/1852), which has gone stale.
I've copied the original fix (which looks sound to me) and added an
integration test to prevent future regressions.
2025-11-12 20:08:12 -08:00
Ahmed Ibrahim ad7eaa80f9 Change model picker to include gpt5.1 (#6569)
- Change the presets
- Change the tests that make sure we keep the list of tools updated
- Filter out deprecated models
2025-11-12 19:44:53 -08:00
Ahmed Ibrahim 966d71c02a Update subtitle of model picker as part of the nux (#6567) 2025-11-12 18:30:43 -08:00
pakrym-oai f97874093e Set verbosity to low for 5.1 (#6568)
And improve test coverage
2025-11-13 01:40:52 +00:00
Ahmed Ibrahim e63ab0dd65 NUX for gpt5.1 (#6561)
- Introducing a screen to inform users of model changes. 
- Config name is being passed to be able to reuse this component in the
future for future models
2025-11-13 01:24:21 +00:00
Owen Lin 964220ac94 [app-server] feat: thread/resume supports history, path, and overrides (#6483)
This updates `thread/resume` to be at parity with v1's
`ResumeConversationParams`. Turns out history is useful for codex cloud
and path is useful for the VSCode extension. And config overrides are
always useful.
2025-11-12 22:02:43 +00:00
pakrym-oai 2f58e69997 Do not double encode request bodies in logging (#6558) 2025-11-12 21:28:42 +00:00
pakrym-oai ec69a4a810 Add gpt-5.1 model definitions (#6551) 2025-11-12 12:44:36 -08:00
Michael Bolin 90009c50fe merge commit for archive created by Sapling 2025-11-12 11:46:21 -08:00
Michael Bolin e1f91433bc fix: close non-stdio fds before exec 2025-11-12 11:46:14 -08:00
Michael Bolin 12370e0cbc merge commit for archive created by Sapling 2025-11-12 11:44:11 -08:00
Michael Bolin bdbc9e9b80 fix: close non-stdio fds before exec 2025-11-12 11:44:04 -08:00
Michael Bolin 30f6361151 Merge 49716d4c71 into sapling-pr-archive-bolinfest 2025-11-12 11:13:06 -08:00
Michael Bolin 49716d4c71 fix: close non-stdio fds before exec 2025-11-12 11:12:56 -08:00
Eric Traut ad09c138b9 Fixed status output to use auth information from AuthManager (#6529)
This PR addresses https://github.com/openai/codex/issues/6360. The root
problem is that the TUI was directly loading the `auth.json` file to
access the auth information. It should instead be using the AuthManager,
which records the current auth information. The `auth.json` file can be
overwritten at any time by other instances of the CLI or extension, so
its information can be out of sync with the current instance. The
`/status` command should always report the auth information associated
with the current instance.

An alternative fix for this bug was submitted by @chojs23 in [this
PR](https://github.com/openai/codex/pull/6495). That approach was only a
partial fix.
2025-11-12 10:26:50 -08:00
jif-oai e00eb50db3 feat: only wait for mutating tools for ghost commit (#6534) 2025-11-12 18:16:32 +00:00
pakrym-oai 7d9ad3effd Fix otel tests (#6541)
Mount responses only once, remove unneeded retries and add a final
assistant messages to complete the turn.
2025-11-12 16:35:34 +00:00
Michael Bolin c3a710ee14 chore: verify boolean values can be parsed as config overrides (#6516)
This is important to ensure that this:

```
codex --enable unified_exec
```

and this:

```
codex --config features.unified_exec=true
```

are equivalent. Also that when it is passed programmatically:


https://github.com/openai/codex/blob/807e2c27f0a9f2e85c50e7e6df5533f0d9b853c7/codex-rs/app-server-protocol/src/protocol/v1.rs#L55

then this should work for `config`:

```json
{"features": {"shell_command_tool": true}}
```

though I believe also this:

```json
{"features.shell_command_tool": true}
```
2025-11-12 08:19:16 -08:00
Michael Bolin 29364f3a9b feat: shell_command tool (#6510)
This adds support for a new variant of the shell tool behind a flag. To
test, run `codex` with `--enable shell_command_tool`, which will
register the tool with Codex under the name `shell_command` that accepts
the following shape:

```python
{
  command: str
  workdir: str | None,
  timeout_ms: int | None,
  with_escalated_permissions: bool | None,
  justification: str | None,
}
```

This is comparable to the existing tool registered under
`shell`/`container.exec`. The primary difference is that it accepts
`command` as a `str` instead of a `str[]`. The `shell_command` tool
executes by running `execvp(["bash", "-lc", command])`, though the exact
arguments to `execvp(3)` depend on the user's default shell.

The hypothesis is that this will simplify things for the model. For
example, on Windows, instead of generating:

```json
{"command": ["pwsh.exe", "-NoLogo", "-Command", "ls -Name"]}
```

The model could simply generate:

```json
{"command": "ls -Name"}
```

As part of this change, I extracted some logic out of `user_shell.rs` as
`Shell::derive_exec_args()` so that it can be reused in
`codex-rs/core/src/tools/handlers/shell.rs`. Note the original code
generated exec arg lists like:

```javascript
["bash", "-lc", command]
["zsh", "-lc", command]
["pwsh.exe", "-NoProfile", "-Command", command]
```

Using `-l` for Bash and Zsh, but then specifying `-NoProfile` for
PowerShell seemed inconsistent to me, so I changed this in the new
implementation while also adding a `use_login_shell: bool` option to
make this explicit. If we decide to add a `login: bool` to
`ShellCommandToolCallParams` like we have for unified exec:


https://github.com/openai/codex/blob/807e2c27f0a9f2e85c50e7e6df5533f0d9b853c7/codex-rs/core/src/tools/handlers/unified_exec.rs#L33-L34

Then this should make it straightforward to support.
2025-11-12 08:18:57 -08:00
Michael Bolin 739f5b08bf merge commit for archive created by Sapling 2025-11-12 07:46:11 -08:00
Michael Bolin 33232067e7 feat: shell_command tool 2025-11-12 07:46:00 -08:00
jif-oai 530db0ad73 feat: warning switch model on resume (#6507)
<img width="1259" height="40" alt="Screenshot 2025-11-11 at 14 01 41"
src="https://github.com/user-attachments/assets/48ead3d2-d89c-4d8a-a578-82d9663dbd88"
/>
2025-11-12 11:13:37 +00:00
Gabriel Peal 424bfecd0b Re-add prettier log-level=warn to generate-ts (#6528)
I added it in https://github.com/openai/codex/pull/6342 but it was
removed in
https://github.com/openai/codex/pull/5063/files#diff-e2aa6dad1e886b7765158a27aefd1be5de99baa71b44f6bc5ce3fe462b9ae5d3R135
as a result of a bad diamond merge
2025-11-11 21:30:01 -05:00
Lionel Cheng eb1c651c00 Update full-auto description with on-request (#6523)
This PR fixes #6522 by correcting the comment for `full-auto` in both
`codex-rs/exec/src/cli.rs` and `codex-rs/tui/src/cli.rs` from `-a
on-failure` to `-a on-request` to make it coherent with
`codex-rs/tui/src/lib.rs:97-105`:

```rust
pub async fn run_main(
    mut cli: Cli,
    codex_linux_sandbox_exe: Option<PathBuf>,
) -> std::io::Result<AppExitInfo> {
    let (sandbox_mode, approval_policy) = if cli.full_auto {
        (
            Some(SandboxMode::WorkspaceWrite),
            Some(AskForApproval::OnRequest),
        )
```

Running `just codex --help` or `just codex exec --help` should now yield
the correct description of `full-auto` CLI argument.

Signed-off-by: lionelchg <lionel.cheng@hotmail.fr>
2025-11-11 15:59:20 -08:00
Celia Chen e357fc723d [app-server] add item started/completed events for turn items (#6517)
This one should be quite straightforward, as it's just a translation of
TurnItem events we already emit to ThreadItem that app-server exposes to
customers.

To test, cp my change to owen/app_server_test_client and do the
following:
```
cargo build -p codex-cli
RUST_LOG=codex_app_server=info CODEX_BIN=target/debug/codex cargo run -p codex-app-server-test-client -- send-message-v2 "hello"
```

example event before (still kept there for backward compatibility):
```
{
<   "method": "codex/event/item_completed",
<   "params": {
<     "conversationId": "019a74cc-fad9-7ab3-83a3-f42827b7b074",
<     "id": "0",
<     "msg": {
<       "item": {
<         "Reasoning": {
<           "id": "rs_03d183492e07e20a016913a936eb8c81a1a7671a103fee8afc",
<           "raw_content": [],
<           "summary_text": [
<             "Hey! What would you like to work on? I can explore the repo, run specific tests, or implement a change. Let's keep it short and straightforward. There's no need for a lengthy introduction or elaborate planning, just a friendly greeting and an open offer to help. I want to make sure the user feels welcomed and understood right from the start. It's all about keeping the tone friendly and concise!"
<           ]
<         }
<       },
<       "thread_id": "019a74cc-fad9-7ab3-83a3-f42827b7b074",
<       "turn_id": "0",
<       "type": "item_completed"
<     }
<   }
< }
```

after (v2):
```
< {
<   "method": "item/completed",
<   "params": {
<     "item": {
<       "id": "rs_03d183492e07e20a016913a936eb8c81a1a7671a103fee8afc",
<       "text": "Hey! What would you like to work on? I can explore the repo, run specific tests, or implement a change. Let's keep it short and straightforward. There's no need for a lengthy introduction or elaborate planning, just a friendly greeting and an open offer to help. I want to make sure the user feels welcomed and understood right from the start. It's all about keeping the tone friendly and concise!",
<       "type": "reasoning"
<     }
<   }
< }
```
2025-11-11 22:43:24 +00:00
Michael Bolin d051d2daf3 Merge 62d0cb2bcf into sapling-pr-archive-bolinfest 2025-11-11 11:05:30 -08:00
Michael Bolin 62d0cb2bcf chore: verify boolean values can be parsed as config overrides 2025-11-11 11:05:24 -08:00
Michael Bolin 48b3620c12 merge commit for archive created by Sapling 2025-11-11 10:28:41 -08:00
Michael Bolin e4228a64be feat: shell_command tool 2025-11-11 10:28:30 -08:00
Michael Bolin f4faf63fdf merge commit for archive created by Sapling 2025-11-11 10:07:25 -08:00
Michael Bolin 09793c608c feat: shell_command tool 2025-11-11 10:07:20 -08:00
Michael Bolin 15de62f6d8 merge commit for archive created by Sapling 2025-11-11 10:04:18 -08:00
Michael Bolin bef0b3f2bf feat: shell_command tool 2025-11-11 10:04:14 -08:00
Michael Bolin 7e0f858f04 merge commit for archive created by Sapling 2025-11-11 09:57:55 -08:00
Michael Bolin f80c08be53 feat: shell_command tool 2025-11-11 09:57:49 -08:00
Michael Bolin 95a5f733cc Merge 419bee039d into sapling-pr-archive-bolinfest 2025-11-11 09:56:47 -08:00
Michael Bolin 419bee039d feat: shell_command tool 2025-11-11 09:56:44 -08:00
Michael Bolin 6a87b54d86 merge commit for archive created by Sapling 2025-11-11 09:54:12 -08:00
Michael Bolin c59c2a3a56 feat: shell_command tool 2025-11-11 09:54:06 -08:00
Michael Bolin 37d4395d91 merge commit for archive created by Sapling 2025-11-11 09:47:24 -08:00
Michael Bolin ce77090ac4 feat: shell_command tool 2025-11-11 09:47:20 -08:00
Michael Bolin 642d5d0332 merge commit for archive created by Sapling 2025-11-11 09:14:50 -08:00
Michael Bolin 0b0407bab8 feat: shell_command tool 2025-11-11 09:14:46 -08:00
Michael Bolin f392106fe2 merge commit for archive created by Sapling 2025-11-11 09:09:22 -08:00
Michael Bolin 0d848f3cc9 feat: shell_command tool 2025-11-11 09:09:17 -08:00
Michael Bolin 137477f408 merge commit for archive created by Sapling 2025-11-11 09:07:27 -08:00
Michael Bolin 564e00e1ca feat: shell_command tool 2025-11-11 09:07:21 -08:00
Michael Bolin 919550a002 Merge e629d46c1c into sapling-pr-archive-bolinfest 2025-11-11 09:06:28 -08:00