Commit Graph
8002 Commits
Author SHA1 Message Date
Rasmus Rygaard b2d3843109 Translate websocket errors (#10937)
When getting errors over a websocket connection, translate the error
into our regular API error format
2026-02-09 17:53:09 +00:00
jif-oai cfce286459 tools: remove get_memory tool and tests (#11198)
Drop this memory tool as the design changed
2026-02-09 17:47:36 +00:00
Charley Cunningham 0883e5d3e5 core: account for all post-response items in auto-compact token checks (#11132)
## Summary
- change compaction pre-check accounting to include all items added
after the last model-generated item, not only trailing codex-generated
outputs
- use that boundary consistently in get_total_token_usage() and
get_total_token_usage_breakdown()
- update history tests to cover user/tool-output items after the last
model item

## Why
last_token_usage.total_tokens is API-reported for the last successful
model response. After that point, local history may gain additional
items (user messages, injected context, tool outputs). Compaction
triggering must account for all of those items to avoid late compaction
attempts that can overflow context.

## Testing
- just fmt
- cargo test -p codex-core
2026-02-09 08:34:38 -08:00
Michael Bolin 04041083f6 merge commit for archive created by Sapling 2026-02-09 08:25:28 -08:00
Michael Bolin 47795a6201 feat: retain NetworkProxy, when appropriate 2026-02-09 08:24:44 -08:00
gt-oai 9fe925b15a Load requirements on windows (#10770)
We support requirements on Unix, loading from
`/etc/codex/requirements.toml`. On MacOS, we also support MDM.

Now, on Windows, we'll load requirements from
`%ProgramData%\OpenAI\Codex\requirements.toml`
2026-02-09 16:05:38 +00:00
gt-oai 54b401aa5f Deflake mixed parallel tools timing test (#11193)
```
        FAIL [   1.903s] (1926/3311) codex-core::all suite::tool_parallelism::mixed_parallel_tools_run_in_parallel
  stdout ───

    running 1 test
    test suite::tool_parallelism::mixed_parallel_tools_run_in_parallel ... FAILED

    failures:

    failures:
        suite::tool_parallelism::mixed_parallel_tools_run_in_parallel

    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 684 filtered out; finished in 1.86s
    
  stderr ───

    thread 'suite::tool_parallelism::mixed_parallel_tools_run_in_parallel' (205083) panicked at core/tests/suite/tool_parallelism.rs:74:5:
    expected parallel execution to finish quickly, got 1.406255993s
    stack backtrace:
       0: __rustc::rust_begin_unwind
                 at /rustc/254b59607d4417e9dffbc307138ae5c86280fe4c/library/std/src/panicking.rs:689:5
       1: core::panicking::panic_fmt
                 at /rustc/254b59607d4417e9dffbc307138ae5c86280fe4c/library/core/src/panicking.rs:80:14
       2: all::suite::tool_parallelism::assert_parallel_duration
                 at ./tests/suite/tool_parallelism.rs:74:5
       3: all::suite::tool_parallelism::mixed_parallel_tools_run_in_parallel::{{closure}}
                 at ./tests/suite/tool_parallelism.rs:206:5
       4: <core::pin::Pin<P> as core::future::future::Future>::poll
                 at /home/runner/.rustup/toolchains/1.93.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:133:9
       5: tokio::runtime::park::CachedParkThread::block_on::{{closure}}
                 at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/runtime/park.rs:284:71
       6: tokio::task::coop::with_budget
                 at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/task/coop/mod.rs:167:5
       7: tokio::task::coop::budget
                 at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/task/coop/mod.rs:133:5
       8: tokio::runtime::park::CachedParkThread::block_on
                 at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/runtime/park.rs:284:31
       9: tokio::runtime::context::blocking::BlockingRegionGuard::block_on
                 at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/runtime/context/blocking.rs:66:14
      10: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}}
                 at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/runtime/scheduler/multi_thread/mod.rs:89:22
      11: tokio::runtime::context::runtime::enter_runtime
                 at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/runtime/context/runtime.rs:65:16
      12: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
                 at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/runtime/scheduler/multi_thread/mod.rs:88:9
      13: tokio::runtime::runtime::Runtime::block_on_inner
                 at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/runtime/runtime.rs:370:50
      14: tokio::runtime::runtime::Runtime::block_on
                 at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/runtime/runtime.rs:342:18
      15: all::suite::tool_parallelism::mixed_parallel_tools_run_in_parallel
                 at ./tests/suite/tool_parallelism.rs:208:7
      16: all::suite::tool_parallelism::mixed_parallel_tools_run_in_parallel::{{closure}}
                 at ./tests/suite/tool_parallelism.rs:178:52
      17: core::ops::function::FnOnce::call_once
                 at /home/runner/.rustup/toolchains/1.93.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
      18: core::ops::function::FnOnce::call_once
                 at /rustc/254b59607d4417e9dffbc307138ae5c86280fe4c/library/core/src/ops/function.rs:250:5
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```
2026-02-09 15:16:54 +00:00
jif-oai 284c03ceab chore: enable sub agents (#11173) 2026-02-09 11:25:37 +00:00
jif-oai 13de744296 fix: do not show closed agents in /agent (#11175) 2026-02-09 11:25:31 +00:00
jif-oai 753821c90f chore: enable shell snapshot (#11172) 2026-02-09 11:23:59 +00:00
jif-oai 6cf61725d0 feat: do not close unified exec processes across turns (#10799)
With this PR we do not close the unified exec processes (i.e. background
terminals) at the end of a turn unless:
* The user interrupt the turn
* The user decide to clean the processes through `app-server` or
`/clean`

I made sure that `codex exec` correctly kill all the processes
2026-02-09 10:27:46 +00:00
rakan-oai 4e9e6ca243 tui: avoid no-op status-line redraws (#11155)
Rate-limit snapshots are polled every 60s, which causes unconditional
redraws.
This causes spurious "tab changed" indicators in terminal apps.
2026-02-09 00:13:19 -08:00
Michael Bolin 383b45279e feat: include NetworkConfig through ExecParams (#11105)
This PR adds the following field to `Config`:

```rust
pub network: Option<NetworkProxy>,
```

Though for the moment, it will always be initialized as `None` (this
will be addressed in a subsequent PR).

This PR does the work to thread `network` through to `execute_exec_env()`, `process_exec_tool_call()`, and `UnifiedExecRuntime.run()` to ensure it is available whenever we span a process.
2026-02-09 03:32:17 +00:00
Michael Bolin cee317dc30 merge commit for archive created by Sapling 2026-02-08 18:56:36 -08:00
Michael Bolin bd84f0cd03 feat: include NetworkConfig through ExecParams 2026-02-08 18:56:20 -08:00
Michael Bolin 8a3ca17faa merge commit for archive created by Sapling 2026-02-08 18:42:55 -08:00
Michael Bolin 714e5958a8 feat: include NetworkConfig through ExecParams 2026-02-08 18:42:42 -08:00
Michael Bolin 6ff6ae2084 Merge 1c3bade37e into sapling-pr-archive-bolinfest 2026-02-08 18:34:09 -08:00
Michael Bolin 1c3bade37e feat: include NetworkConfig through ExecParams 2026-02-08 18:33:58 -08:00
Michael Bolin 60f84088e1 Merge 9eaece2c68 into sapling-pr-archive-bolinfest 2026-02-08 18:28:02 -08:00
Michael Bolin 9eaece2c68 feat: include NetworkConfig through ExecParams 2026-02-08 18:27:57 -08:00
Michael Bolin 1164895336 merge commit for archive created by Sapling 2026-02-08 18:23:45 -08:00
Michael Bolin af61bf1141 feat: include NetworkConfig through ExecParams 2026-02-08 18:23:24 -08:00
Michael Bolin 09cb32313c Merge 4b54cfb499 into sapling-pr-archive-bolinfest 2026-02-08 17:22:29 -08:00
Michael Bolin 4b54cfb499 feat: include NetworkConfig through ExecParams 2026-02-08 17:21:56 -08:00
Michael Bolin ff74aaae21 chore: reverse the codex-network-proxy -> codex-core dependency (#11121) 2026-02-08 17:03:24 -08:00
Michael Bolin f25b5f872d Merge 753196e2bc into sapling-pr-archive-bolinfest 2026-02-08 16:18:29 -08:00
Michael Bolin 753196e2bc chore: reverse the codex-network-proxy -> codex-core dependency 2026-02-08 16:18:09 -08:00
Michael Bolin c9b2febde8 merge commit for archive created by Sapling 2026-02-08 15:58:54 -08:00
Michael Bolin b615c4a7c2 chore: reverse the codex-network-proxy -> codex-core dependency 2026-02-08 15:58:00 -08:00
Matthew Zeng 45b7763c3f [apps] Improve app loading. (#10994)
There are two concepts of apps that we load in the harness:

- Directory apps, which is all the apps that the user can install.
- Accessible apps, which is what the user actually installed and can be
$ inserted and be used by the model. These are extracted from the tools
that are loaded through the gateway MCP.

Previously we wait for both sets of apps before returning the full apps
list. Which causes many issues because accessible apps won't be
available to the UI or the model if directory apps aren't loaded or
failed to load.

In this PR we are separating them so that accessible apps can be loaded
separately and are instantly available to be shown in the UI and to be
provided in model context. We also added an app-server event so that
clients can subscribe to also get accessible apps without being blocked
on the full app list.

- [x] Separate accessible apps and directory apps loading.
- [x] `app/list` request will also emit `app/list/updated` notifications
that app-server clients can subscribe. Which allows clients to get
accessible apps list to render in the $ menu without being blocked by
directory apps.
- [x] Cache both accessible and directory apps with 1 hour TTL to avoid
reloading them when creating new threads.
- [x] TUI improvements to redraw $ menu and /apps menu when app list is
updated.
2026-02-08 15:24:56 -08:00
Michael Bolin 181b721ba5 feat: include [experimental_network] in <environment_context> (#11044)
If `NetworkConstraints` is set, then include the relevant settings on `<environment_context>`. Example:

```xml
<environment_context>
  <cwd>/repo</cwd>
  <shell>bash</shell>
  <network enabled="true">
    <allowed>api.example.com</allowed>
    <allowed>*.openai.com</allowed>
    <denied>blocked.example.com</denied>
  </network>
</environment_context>
```
2026-02-08 15:16:50 -08:00
Matthew Zeng 9f1009540b Upgrade rmcp to 0.14 (#10718)
- [x] Upgrade rmcp to 0.14
2026-02-08 15:07:53 -08:00
Michael Bolin a2de4e4f6f merge commit for archive created by Sapling 2026-02-08 15:03:20 -08:00
Michael Bolin 22930e0bae chore: reverse the codex-network-proxy -> codex-core dependency 2026-02-08 15:02:44 -08:00
Michael Bolin 22140791cb merge commit for archive created by Sapling 2026-02-08 15:00:18 -08:00
Michael Bolin 41c8e49d8a feat: include [experimental_network] in <environment_context> 2026-02-08 15:00:11 -08:00
Michael Bolin 860f3c5705 merge commit for archive created by Sapling 2026-02-08 14:55:07 -08:00
Michael Bolin 51292e7415 feat: include [experimental_network] in <environment_context> 2026-02-08 14:51:54 -08:00
Michael Bolin c897987511 merge commit for archive created by Sapling 2026-02-08 14:30:31 -08:00
Michael Bolin fa577c0cf1 feat: include [experimental_network] in <environment_context> 2026-02-08 14:30:20 -08:00
Michael Bolin ef5d26e586 chore: refactor network-proxy so that ConfigReloader is injectable behavior (#11114)
Currently, `codex-network-proxy` depends on `codex-core`, but this
should be the other way around. As a first step, refactor out
`ConfigReloader`, which should make it easier to move
`codex-rs/network-proxy/src/state.rs` to `codex-core` in a subsequent
commit.
2026-02-08 22:28:20 +00:00
Michael Bolin ae6f71646f merge commit for archive created by Sapling 2026-02-08 14:25:46 -08:00
Michael Bolin 081dc2a050 feat: include [experimental_network] in <environment_context> 2026-02-08 14:25:36 -08:00
Michael Bolin 2dab9e9741 merge commit for archive created by Sapling 2026-02-08 14:14:40 -08:00
Michael Bolin c2b786e38e feat: include [experimental_network] in <environment_context> 2026-02-08 14:14:23 -08:00
Michael Bolin a8e029a92d Merge 1497ff720b into sapling-pr-archive-bolinfest 2026-02-08 14:10:27 -08:00
Michael Bolin 1497ff720b chore: refactor network-proxy so that ConfigReloader is injectable behavior 2026-02-08 14:10:18 -08:00
Michael Bolin 39eeb8903a Merge 09053f7629 into sapling-pr-archive-bolinfest 2026-02-08 14:09:17 -08:00
Michael Bolin 09053f7629 feat: include [experimental_network] in <environment_context> 2026-02-08 14:09:10 -08:00