mirror of
https://github.com/openai/codex.git
synced 2026-05-03 10:56:37 +00:00
b4aefff87f11692db53bf5518c5d03c90906cf8e
4560 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
1d8e2b4da8 |
(MacOS) Load config requirements from MDM (#8743)
Load managed requirements from MDM key `requirements_toml_base64`.
Tested on my Mac (using `defaults` to set the preference, though this
would be set by MDM in production):
```
➜ codex git:(gt/mdm-requirements) defaults read com.openai.codex requirements_toml_base64 | base64 -d
allowed_approval_policies = ["on-request"]
➜ codex git:(gt/mdm-requirements) just c --yolo
cargo run --bin codex -- "$@"
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.26s
Running `target/debug/codex --yolo`
Error loading configuration: value `Never` is not in the allowed set [OnRequest]
error: Recipe `codex` failed on line 11 with exit code 1
➜ codex git:(gt/mdm-requirements) defaults delete com.openai.codex requirements_toml_base64
➜ codex git:(gt/mdm-requirements) just c --yolo
cargo run --bin codex -- "$@"
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.24s
Running `target/debug/codex --yolo`
╭──────────────────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.0.0) │
│ │
│ model: codex-auto-balanced medium /model to change │
│ directory: ~/code/codex/codex-rs │
╰──────────────────────────────────────────────────────────╯
Tip: Start a fresh idea with /new; the previous session stays in history.
```
|
||
|
|
bba5e5e0d4 |
fix(codex-api): handle Chat Completions DONE sentinel (#8708)
Context - This code parses Server-Sent Events (SSE) from the legacy Chat Completions streaming API (wire_api = "chat"). - The upstream protocol terminates a stream with a final sentinel event: data: [DONE]. - Some of our test stubs/helpers historically end the stream with data: DONE (no brackets). How this was found - GitHub Actions on Windows failed in codex-app-server integration tests with wiremock verification errors (expected multiple POSTs, got 1). Diagnosis - The job logs included: codex_api::sse::chat: Failed to parse ChatCompletions SSE event ... data: DONE. - eventsource_stream surfaces the sentinel as a normal SSE event; it does not automatically close the stream. - The parser previously attempted to JSON-decode every data: payload. The sentinel is not JSON, so we logged and skipped it, then continued polling. - On servers that keep the HTTP connection open after emitting the sentinel (notably wiremock on Windows), skipping the sentinel meant we never emitted ResponseEvent::Completed. - Higher layers wait for completion before progressing (emitting approval requests and issuing follow-up model calls), so the test never reached the subsequent requests and wiremock panicked when its expected-call count was not met. Fix - Treat both data: [DONE] and data: DONE as explicit end-of-stream sentinels. - When a sentinel is seen, flush any pending assistant/reasoning items and emit ResponseEvent::Completed once. Tests - Add a regression unit test asserting we complete on the sentinel even if the underlying connection is not closed. |
||
|
|
8f10d3bf05 |
feat(tui2): transcript scrollbar (auto-hide + drag) (#8728)
## Summary - Add a transcript scrollbar in `tui2` using `tui-scrollbar`. - Reserve 2 columns on the right (1 empty gap + 1 scrollbar track) and plumb the reduced width through wrapping/selection/copy so rendering and interactions match. - Auto-hide the scrollbar when the transcript is pinned to the bottom (columns remain reserved). - Add mouse click/drag support for the scrollbar, with pointer-capture so drags don’t fall through into transcript selection. - Skip scrollbar hit-testing when auto-hidden to avoid an invisible interactive region. ## Notes - Styling is theme-aware: in light themes the thumb is darker than the track; in dark themes it reads as an “indented” element without going full-white. - Pre-Ratatui 0.30 (ratatui-core split) requires a small scratch-buffer bridge; this should simplify once we move to Ratatui 0.30. ## Testing - `just fmt` - `just fix -p codex-tui2 --allow-no-vcs` - `cargo test -p codex-tui2` |
||
|
|
468ee8a75c |
[MCP] Sanitize MCP tool names to ensure they are compatible with the Responses APO (#8694)
The Responses API requires that all tool names conform to '^[a-zA-Z0-9_-]+$'. This PR replaces all non-conforming characters with `_` to ensure that they can be used. Fixes #8174 |
||
|
|
0b53aed2d0 |
fix: /review to respect session cwd (#8738)
Fixes /review base-branch prompt resolution to use the session/turn cwd (respecting runtime cwd overrides) so merge-base/diff guidance is computed from the intended repo; adds a regression test for cwd overrides; tested with cargo test -p codex-core --test all review_uses_overridden_cwd_for_base_branch_merge_base. |
||
|
|
649badd102 |
fix: chat multiple tool calls (#8556)
Fix this: https://github.com/openai/codex/issues/8479 The issue is that chat completion API expect all the tool calls in a single assistant message and then all the tool call output in a single response message |
||
|
|
a8e0fe8bb9 |
chore(deps): bump insta from 1.44.3 to 1.46.0 in /codex-rs (#8725)
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.44.3 to 1.46.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/mitsuhiko/insta/releases">insta's releases</a>.</em></p> <blockquote> <h2>1.46.0</h2> <h2>Release Notes</h2> <ul> <li>Add <code>INSTA_PENDING_DIR</code> environment variable for Bazel and other hermetic build systems. When set, pending snapshots are written to a separate directory while keeping the source tree read-only. We are very open to feedback on this feature. <a href="https://redirect.github.com/mitsuhiko/insta/issues/852">#852</a></li> <li>Fix documentation for <code>test.runner_fallback</code> config key. <a href="https://redirect.github.com/mitsuhiko/insta/issues/853">#853</a></li> </ul> <h2>Install cargo-insta 1.46.0</h2> <h3>Install prebuilt binaries via shell script</h3> <pre lang="sh"><code>curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/insta/releases/download/1.46.0/cargo-insta-installer.sh | sh </code></pre> <h3>Install prebuilt binaries via powershell script</h3> <pre lang="sh"><code>powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/insta/releases/download/1.46.0/cargo-insta-installer.ps1 | iex" </code></pre> <h2>Download cargo-insta 1.46.0</h2> <table> <thead> <tr> <th>File</th> <th>Platform</th> <th>Checksum</th> </tr> </thead> <tbody> <tr> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.46.0/cargo-insta-aarch64-apple-darwin.tar.xz">cargo-insta-aarch64-apple-darwin.tar.xz</a></td> <td>Apple Silicon macOS</td> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.46.0/cargo-insta-aarch64-apple-darwin.tar.xz.sha256">checksum</a></td> </tr> <tr> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.46.0/cargo-insta-x86_64-apple-darwin.tar.xz">cargo-insta-x86_64-apple-darwin.tar.xz</a></td> <td>Intel macOS</td> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.46.0/cargo-insta-x86_64-apple-darwin.tar.xz.sha256">checksum</a></td> </tr> <tr> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.46.0/cargo-insta-x86_64-pc-windows-msvc.zip">cargo-insta-x86_64-pc-windows-msvc.zip</a></td> <td>x64 Windows</td> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.46.0/cargo-insta-x86_64-pc-windows-msvc.zip.sha256">checksum</a></td> </tr> <tr> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.46.0/cargo-insta-x86_64-unknown-linux-gnu.tar.xz">cargo-insta-x86_64-unknown-linux-gnu.tar.xz</a></td> <td>x64 Linux</td> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.46.0/cargo-insta-x86_64-unknown-linux-gnu.tar.xz.sha256">checksum</a></td> </tr> <tr> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.46.0/cargo-insta-x86_64-unknown-linux-musl.tar.xz">cargo-insta-x86_64-unknown-linux-musl.tar.xz</a></td> <td>x64 MUSL Linux</td> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.46.0/cargo-insta-x86_64-unknown-linux-musl.tar.xz.sha256">checksum</a></td> </tr> </tbody> </table> <h2>1.45.1</h2> <h2>Release Notes</h2> <ul> <li>Fix backward compatibility with TOML format produced by insta < 1.45.0. <a href="https://redirect.github.com/mitsuhiko/insta/issues/849">#849</a> (<a href="https://github.com/chitoku-k"><code>@chitoku-k</code></a>)</li> </ul> <h2>Install cargo-insta 1.45.1</h2> <h3>Install prebuilt binaries via shell script</h3> <pre lang="sh"><code>curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/insta/releases/download/1.45.1/cargo-insta-installer.sh | sh </code></pre> <h3>Install prebuilt binaries via powershell script</h3> <pre lang="sh"><code>powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/insta/releases/download/1.45.1/cargo-insta-installer.ps1 | iex" </code></pre> <h2>Download cargo-insta 1.45.1</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md">insta's changelog</a>.</em></p> <blockquote> <h2>1.46.0</h2> <ul> <li>Add <code>INSTA_PENDING_DIR</code> environment variable for Bazel and other hermetic build systems. When set, pending snapshots are written to a separate directory while keeping the source tree read-only. We are very open to feedback on this feature. <a href="https://redirect.github.com/mitsuhiko/insta/issues/852">#852</a></li> <li>Fix documentation for <code>test.runner_fallback</code> config key. <a href="https://redirect.github.com/mitsuhiko/insta/issues/853">#853</a></li> </ul> <h2>1.45.1</h2> <ul> <li>Fix backward compatibility with TOML format produced by insta < 1.45.0. <a href="https://redirect.github.com/mitsuhiko/insta/issues/849">#849</a> (<a href="https://github.com/chitoku-k"><code>@chitoku-k</code></a>)</li> </ul> <h2>1.45.0</h2> <ul> <li>Add external diff tool support via <code>INSTA_DIFF_TOOL</code> environment variable. When set, insta uses the specified tool (e.g., <code>delta</code>, <code>difftastic</code>) to display snapshot diffs instead of the built-in diff. The tool is invoked as <code><tool> <old_file> <new_file></code>. <a href="https://redirect.github.com/mitsuhiko/insta/issues/844">#844</a></li> <li>Add <code>test.disable_nextest_doctest</code> config option to <code>insta.yaml</code>, allowing users to silence the nextest doctest warning via config instead of passing <code>--dnd</code> every time. <a href="https://redirect.github.com/mitsuhiko/insta/issues/842">#842</a></li> <li>Skip non-insta snapshot files in unreferenced detection. Projects using both insta and other snapshot tools (like vitest or jest) can now use <code>--unreferenced=reject</code> without false positives on <code>.snap</code> files from other tools. <a href="https://redirect.github.com/mitsuhiko/insta/issues/846">#846</a></li> <li>Collect warnings from tests for display after run. Ensures deprecation warnings are visible even when nextest suppresses stdout/stderr from passing tests. <a href="https://redirect.github.com/mitsuhiko/insta/issues/840">#840</a></li> <li>Update TOML serialization to be up-to-date and backwards-compatible. <a href="https://redirect.github.com/mitsuhiko/insta/issues/834">#834</a> (<a href="https://github.com/spoutn1k"><code>@spoutn1k</code></a>)</li> <li>Support <code>clippy::needless_raw_strings</code> lint by only using raw strings when content contains backslashes or quotes. <a href="https://redirect.github.com/mitsuhiko/insta/issues/828">#828</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
e139ef3e67 |
chore(deps): bump derive_more from 2.0.1 to 2.1.1 in /codex-rs (#8724)
Bumps [derive_more](https://github.com/JelteF/derive_more) from 2.0.1 to 2.1.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/JelteF/derive_more/releases">derive_more's releases</a>.</em></p> <blockquote> <h2>2.1.1</h2> <p><a href="https://docs.rs/derive_more/2.1.1">API docs</a> <a href="https://github.com/JelteF/derive_more/blob/v2.1.1/CHANGELOG.md#211---2025-12-22">Changelog</a></p> <h2>2.1.0</h2> <h3>Added</h3> <ul> <li>Support <code>#[display(rename_all = "<casing>")]</code> attribute to change output for implicit naming of unit enum variants or unit structs when deriving <code>Display</code>. (<a href="https://redirect.github.com/JelteF/derive_more/pull/443">#443</a>)</li> <li>Support <code>#[from_str(rename_all = "<casing>")]</code> attribute for unit enum variants and unit structs when deriving <code>FromStr</code>. (<a href="https://redirect.github.com/JelteF/derive_more/pull/467">#467</a>)</li> <li>Support <code>Option</code> fields for <code>Error::source()</code> in <code>Error</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/459">#459</a>)</li> <li>Support structs with no fields in <code>FromStr</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/469">#469</a>)</li> <li>Add <code>PartialEq</code> derive similar to <code>std</code>'s one, but considering generics correctly, and implementing <code>ne()</code> method as well. (<a href="https://redirect.github.com/JelteF/derive_more/pull/473">#473</a>, <a href="https://redirect.github.com/JelteF/derive_more/pull/475">#475</a>)</li> <li>Add <code>Eq</code> derive similar to <code>std</code>'s one, but considering generics correctly. (<a href="https://redirect.github.com/JelteF/derive_more/pull/479">#479</a>)</li> <li>Proxy-pass <code>#[allow]</code>/<code>#[expect]</code> attributes of the type in <code>Constructor</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/477">#477</a>)</li> <li>Support <code>Deref</code> and <code>DerefMut</code> derives for enums. (<a href="https://redirect.github.com/JelteF/derive_more/pull/485">#485</a>)</li> <li>Support custom error in <code>FromStr</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/494">#494</a>)</li> <li>Support custom error in <code>TryInto</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/503">#503</a>)</li> <li>Support skipping fields in <code>Add</code>-like, <code>AddAssign</code>-like, <code>Mul</code>-like and <code>MulAssign</code>-like derives. (<a href="https://redirect.github.com/JelteF/derive_more/pull/472">#472</a>)</li> </ul> <h3>Changed</h3> <ul> <li>The minimum supported Rust version (MSRV) is now Rust 1.81. (<a href="https://redirect.github.com/JelteF/derive_more/pull/466">#466</a>)</li> <li><code>Add</code>-like, <code>AddAssign</code>-like, <code>Mul</code>-like and <code>MulAssign</code>-like derives now infer trait bounds for generics structurally (bound field types instead of type parameters directly). (<a href="https://redirect.github.com/JelteF/derive_more/pull/472">#472</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>Suppress deprecation warnings in generated code. (<a href="https://redirect.github.com/JelteF/derive_more/pull/454">#454</a>)</li> <li>Silent no-op when <code>#[try_from(repr)]</code> attribute is not specified for <code>TryFrom</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/458">#458</a>)</li> <li>Missing trait bounds in <code>AsRef</code>/<code>AsMut</code> derives when associative types are involved. (<a href="https://redirect.github.com/JelteF/derive_more/pull/474">#474</a>)</li> <li>Erroneous code generated in <code>Try</code>/<code>TryInto</code> derives when <code>Self</code> type is present in the struct or enum definition. (<a href="https://redirect.github.com/JelteF/derive_more/pull/489">#489</a>)</li> <li>Dependency on unstable <code>feature(error_generic_member_access)</code> in <code>Error</code> derive when using <code>Backtrace</code> on a non-nightly toolchain. (<a href="https://redirect.github.com/JelteF/derive_more/pull/513">#513</a>)</li> <li>Broken support for <code>#[<display-trait>("default formatting")]</code> attribute without <code>{_variant}</code> being used as default for enum variants without explicit formatting. (<a href="https://redirect.github.com/JelteF/derive_more/pull/495">#495</a>)</li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/jasl"><code>@jasl</code></a> made their first contribution in <a href="https://redirect.github.com/JelteF/derive_more/pull/453">JelteF/derive_more#453</a></li> <li><a href="https://github.com/aborgna-q"><code>@aborgna-q</code></a> made their first contribution in <a href="https://redirect.github.com/JelteF/derive_more/pull/454">JelteF/derive_more#454</a></li> <li><a href="https://github.com/maxime-bruno"><code>@maxime-bruno</code></a> made their first contribution in <a href="https://redirect.github.com/JelteF/derive_more/pull/461">JelteF/derive_more#461</a></li> <li><a href="https://github.com/Cheban1996"><code>@Cheban1996</code></a> made their first contribution in <a href="https://redirect.github.com/JelteF/derive_more/pull/477">JelteF/derive_more#477</a></li> <li><a href="https://github.com/kiendang"><code>@kiendang</code></a> made their first contribution in <a href="https://redirect.github.com/JelteF/derive_more/pull/486">JelteF/derive_more#486</a></li> <li><a href="https://github.com/goldlinker"><code>@goldlinker</code></a> made their first contribution in <a href="https://redirect.github.com/JelteF/derive_more/pull/509">JelteF/derive_more#509</a></li> <li><a href="https://github.com/CJKay"><code>@CJKay</code></a> made their first contribution in <a href="https://redirect.github.com/JelteF/derive_more/pull/513">JelteF/derive_more#513</a></li> <li><a href="https://github.com/ErmitaVulpe"><code>@ErmitaVulpe</code></a> made their first contribution in <a href="https://redirect.github.com/JelteF/derive_more/pull/472">JelteF/derive_more#472</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/JelteF/derive_more/compare/v2.0.1...v2.1.0">https://github.com/JelteF/derive_more/compare/v2.0.1...v2.1.0</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/JelteF/derive_more/blob/master/CHANGELOG.md">derive_more's changelog</a>.</em></p> <blockquote> <h2>2.1.1 - 2025-12-22</h2> <h3>Fixed</h3> <ul> <li><code>.as_dyn_error()</code> method hygiene inside <code>Error</code> derive expansion. (<a href="https://redirect.github.com/JelteF/derive_more/pull/527">#527</a>)</li> </ul> <h2>2.1.0 - 2025-12-02</h2> <h3>Added</h3> <ul> <li>Support <code>#[display(rename_all = "<casing>")]</code> attribute to change output for implicit naming of unit enum variants or unit structs when deriving <code>Display</code>. (<a href="https://redirect.github.com/JelteF/derive_more/pull/443">#443</a>)</li> <li>Support <code>#[from_str(rename_all = "<casing>")]</code> attribute for unit enum variants and unit structs when deriving <code>FromStr</code>. (<a href="https://redirect.github.com/JelteF/derive_more/pull/467">#467</a>)</li> <li>Support <code>Option</code> fields for <code>Error::source()</code> in <code>Error</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/459">#459</a>)</li> <li>Support structs with no fields in <code>FromStr</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/469">#469</a>)</li> <li>Add <code>PartialEq</code> derive similar to <code>std</code>'s one, but considering generics correctly, and implementing <code>ne()</code> method as well. (<a href="https://redirect.github.com/JelteF/derive_more/pull/473">#473</a>, <a href="https://redirect.github.com/JelteF/derive_more/pull/475">#475</a>)</li> <li>Add <code>Eq</code> derive similar to <code>std</code>'s one, but considering generics correctly. (<a href="https://redirect.github.com/JelteF/derive_more/pull/479">#479</a>)</li> <li>Proxy-pass <code>#[allow]</code>/<code>#[expect]</code> attributes of the type in <code>Constructor</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/477">#477</a>)</li> <li>Support <code>Deref</code> and <code>DerefMut</code> derives for enums. (<a href="https://redirect.github.com/JelteF/derive_more/pull/485">#485</a>)</li> <li>Support custom error in <code>FromStr</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/494">#494</a>)</li> <li>Support custom error in <code>TryInto</code> derive. (<a href="https://redirect.github.com/JelteF/derive_more/pull/503">#503</a>)</li> <li>Support skipping fields in <code>Add</code>-like, <code>AddAssign</code>-like, <code>Mul</code>-like and <code>MulAssign</code>-like derives. (<a href="https://redirect.github.com/JelteF/derive_more/pull/472">#472</a>)</li> </ul> <h3>Changed</h3> <ul> <li>The minimum supported Rust version (MSRV) is now Rust 1.81. (<a href="https://redirect.github.com/JelteF/derive_more/pull/466">#466</a>)</li> <li><code>Add</code>-like, <code>AddAssign</code>-like, <code>Mul</code>-like and <code>MulAssign</code>-like derives now infer trait bounds for generics structurally (bound field types instead of type parameters directly). (<a href="https://redirect.github.com/JelteF/derive_more/pull/472">#472</a>)</li> </ul> <h3>Fixed</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
db1423ae8b |
chore(deps): bump tokio-stream from 0.1.17 to 0.1.18 in /codex-rs (#8723)
Bumps [tokio-stream](https://github.com/tokio-rs/tokio) from 0.1.17 to 0.1.18. <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
1d678c8187 |
chore(deps): bump clap_complete from 4.5.57 to 4.5.64 in /codex-rs (#8721)
Bumps [clap_complete](https://github.com/clap-rs/clap) from 4.5.57 to 4.5.64. <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
181ff89cbd |
tui2: copy selection dismisses highlight (#8718)
Clicking the transcript copy pill or pressing the copy shortcut now
copies the selected transcript text and clears the highlight.
Show transient footer feedback ("Copied"/"Copy failed") after a copy
attempt, with logic in transcript_copy_action to keep app.rs smaller and
closer to tui for long-term diffs.
Update footer snapshots and add tiny unit tests for feedback expiry.
https://github.com/user-attachments/assets/c36c8163-11c5-476b-b388-e6fbe0ff6034
|
||
|
|
5678213058 |
fix(tui2): render copy pill at viewport bottom (#8716)
When the selection ends on the last visible row, the copy affordance had no space below and never rendered. Fall back to placing it above (or on the same row for 1-row viewports) and add a regression test. |
||
|
|
279283fe02 |
fix(tui2): avoid scroll stickiness at cell boundaries (#8695)
Mouse/trackpad scrolling in tui2 applies deltas in visual lines, but the transcript scroll state was anchored only to CellLine entries. When a 1-line scroll landed on the synthetic inter-cell Spacer row (inserted between non-continuation cells), `TranscriptScroll::anchor_for` would skip that row and snap back to the adjacent cell line. That makes the resolved top offset unchanged for small/coalesced scroll deltas, so scrolling appears to get stuck right before certain cells (commonly user prompts and command output cells). Fix this by making spacer rows a first-class scroll anchor: - Add `TranscriptScroll::ScrolledSpacerBeforeCell` and resolve it back to the spacer row index when present. - Update `anchor_for`/`scrolled_by` to preserve spacers instead of skipping them. - Treat the new variant as "already anchored" in `lock_transcript_scroll_to_current_view`. Tests: - cargo test -p codex-tui2 |
||
|
|
19525efb22 |
fix: brighten transcript copy affordance (#8697)
- set the pill text to white so it stays legible on light themes - render the icon in bold light cyan so it stands out - reran `just fmt`, `just fix -p codex-tui2`, and `cargo test -p codex-tui2` after the tweak https://github.com/user-attachments/assets/6c296b8d-84fb-45b9-bce7-57982e0d531b |
||
|
|
90f37e8549 |
perf(tui2): cache transcript view rendering (#8693)
The transcript viewport draws every frame. Ratatui's Line::render_ref does grapheme segmentation and span layout, so repeated redraws can burn CPU during streaming even when the visible transcript hasn't changed. Introduce TranscriptViewCache to reduce per-frame work: - WrappedTranscriptCache memoizes flattened+wrapped transcript lines per width, appends incrementally as new cells arrive, and rebuilds on width change, truncation (backtrack), or transcript replacement. - TranscriptRasterCache caches rasterized rows (Vec<Cell>) per line index and user-row styling; redraws copy cells instead of rerendering spans. The caches are width-scoped and store base transcript content only; selection highlighting and copy affordances are applied after drawing. User rows include the row-wide base style in the cached raster. Refactor transcript_render to expose append_wrapped_transcript_cell for incremental building and add a test that incremental append matches the full build. Add docs/tui2/performance-testing.md as a playbook for macOS sample profiles and hotspot greps. Expand transcript_view_cache tests to cover rebuild conditions, raster equivalence vs direct rendering, user-row caching, and eviction. Test: cargo test -p codex-tui2 |
||
|
|
ee9d441777 | chore: update outdated docs (#8701) | ||
|
|
1b5095b5d1 |
Attach more tags to feedback submissions (#8688)
Attach more tags to sentry feedback so it's easier to classify and debug without having to scan through logs. Formatting isn't amazing but it's a start. <img width="1234" height="276" alt="image" src="https://github.com/user-attachments/assets/521a349d-f627-4051-b511-9811cd5cd933" /> |
||
|
|
c673e7adb6 |
chore(deps): bump tracing-opentelemetry from 0.31.0 to 0.32.0 in /codex-rs (#8415)
Bumps [tracing-opentelemetry](https://github.com/tokio-rs/tracing-opentelemetry) from 0.31.0 to 0.32.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tokio-rs/tracing-opentelemetry/releases">tracing-opentelemetry's releases</a>.</em></p> <blockquote> <h2>0.32.0</h2> <h3>Added</h3> <ul> <li>Add configuration for including <code>target</code> in spans (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/222">#222</a>)</li> </ul> <h3>Changed</h3> <ul> <li>OpenTelemetry context activation (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/202">#202</a>) <ul> <li>Trace ID and span ID can be obtained from <code>OtelData</code> via dedicated functions. Note that these will be available only if the context has already been built. (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/233">#233</a>)</li> </ul> </li> <li>Correctly track entered and exited state for timings (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/212">#212</a>)</li> <li>Slightly improve error message on version mismatch (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/211">#211</a>)</li> <li>Remove Lazy for thread_local static (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/215">#215</a>)</li> <li>Update description of special fields and semantic conventions</li> </ul> <h3>Breaking Changes</h3> <ul> <li>The attributes <code>code.filepath</code>, <code>code.lineno</code>, and <code>code.namespace</code> have been renamed to <code>code.file.path</code>, and <code>code.line.number</code>, and <code>code.module.name</code>, to align with the opentelemetry semantic conventions for code. (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/225">#225</a>)</li> <li>Upgrade from opentelemetry to 0.31.0. Refer to the upstream <a href="https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-sdk/CHANGELOG.md#0310">changelog</a> for more information. (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/230">#230</a>)</li> <li>Hold onto <code>MetricsProvider</code> in <code>MetricsLayer</code> (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/224">#224</a>)</li> <li>The attribute <code>otel.status_message</code> was changed to <code>otel.status_description</code> to align with the opentelemetry semantic conventions for code. (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/209">#209</a>)</li> <li>Remove the <code>metrics_gauge_unstable</code> feature.</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/tokio-rs/tracing-opentelemetry/blob/v0.1.x/CHANGELOG.md">tracing-opentelemetry's changelog</a>.</em></p> <blockquote> <h2><a href="https://github.com/tokio-rs/tracing-opentelemetry/compare/v0.31.0...v0.32.0">0.32.0</a> - 2025-09-29</h2> <h3>Added</h3> <ul> <li>Add configuration for including <code>target</code> in spans (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/222">#222</a>)</li> </ul> <h3>Changed</h3> <ul> <li>OpenTelemetry context activation (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/202">#202</a>) <ul> <li>Trace ID and span ID can be obtained from <code>OtelData</code> via dedicated functions. Note that these will be available only if the context has already been built. (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/233">#233</a>)</li> </ul> </li> <li>Correctly track entered and exited state for timings (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/212">#212</a>)</li> <li>Slightly improve error message on version mismatch (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/211">#211</a>)</li> <li>Remove Lazy for thread_local static (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/215">#215</a>)</li> <li>Update description of special fields and semantic conventions</li> </ul> <h3>Breaking Changes</h3> <ul> <li>The attributes <code>code.filepath</code>, <code>code.lineno</code>, and <code>code.namespace</code> have been renamed to <code>code.file.path</code>, and <code>code.line.number</code>, and <code>code.module.name</code>, to align with the opentelemetry semantic conventions for code. (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/225">#225</a>)</li> <li>Upgrade from opentelemetry to 0.31.0. Refer to the upstream <a href="https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-sdk/CHANGELOG.md#0310">changelog</a> for more information. (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/230">#230</a>)</li> <li>Hold onto <code>MetricsProvider</code> in <code>MetricsLayer</code> (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/224">#224</a>)</li> <li>The attribute <code>otel.status_message</code> was changed to <code>otel.status_description</code> to align with the opentelemetry semantic conventions for code. (<a href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/pull/209">#209</a>)</li> <li>Remove the <code>metrics_gauge_unstable</code> feature.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
6846bc1115 |
hard disable remote models refresh when feature is disabled (#8687)
We were refreshing on tag mismatch even with feature is disabled |
||
|
|
efd2d76484 |
Account for last token count on resume (#8677)
last token count in context manager is initialized to 0. Gets populated only on events from server. This PR populates it on resume so we can decide if we need to compact or not. |
||
|
|
3cfa4bc8be |
perf(tui2): reduce unnecessary redraws (#8681)
This reduces unnecessary frame scheduling in codex-tui2. Changes: - Gate redraw scheduling for streaming deltas when nothing visible changes. - Avoid a redraw feedback loop from footer transcript UI state updates. Why: - Streaming deltas can arrive at very high frequency; redrawing on every delta can drive a near-constant render loop. - BottomPane was requesting another frame after every Draw even when the derived transcript UI state was unchanged. Testing: - cargo test -p codex-tui2 Manual sampling: - sample "$(pgrep -n codex-tui2)" 3 -file /tmp/tui2.idle.after.sample.txt - sample "$(pgrep -n codex-tui2)" 3 -file /tmp/tui2.streaming.after.sample.txt |
||
|
|
2de731490e |
Remove model family from tui (#8488)
- Remove model family from tui |
||
|
|
7078a0b676 |
Log compaction request bodies (#8676)
We already log request bodies for normal requests, logging for compaction helps with debugging. |
||
|
|
79ce79a62e |
use a SandboxUsers group for ACLs instead of granting to each sandbox user separately (#8483)
This is more future-proof if we ever decide to add additional Sandbox Users for new functionality This also moves some more user-related code into a new file for code cleanliness |
||
|
|
66b7c673e9 |
Refresh on models etag mismatch (#8491)
- Send models etag - Refresh models on 412 - This wires `ModelsManager` to `ModelFamily` so we don't mutate it mid-turn |
||
|
|
13c42a077c |
chore(deps): bump regex-lite from 0.1.7 to 0.1.8 in /codex-rs (#8598)
Bumps [regex-lite](https://github.com/rust-lang/regex) from 0.1.7 to 0.1.8. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/rust-lang/regex/blob/master/CHANGELOG.md">regex-lite's changelog</a>.</em></p> <blockquote> <h1>0.1.80</h1> <ul> <li>[PR <a href="https://redirect.github.com/rust-lang/regex/issues/292">#292</a>](<a href="https://redirect.github.com/rust-lang/regex/pull/292">rust-lang/regex#292</a>): Fixes bug <a href="https://redirect.github.com/rust-lang/regex/issues/291">#291</a>, which was introduced by PR <a href="https://redirect.github.com/rust-lang/regex/issues/290">#290</a>.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
a48904de72 |
chore(deps): bump tokio from 1.47.1 to 1.48.0 in /codex-rs (#8597)
[//]: # (dependabot-start) ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.47.1 to 1.48.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tokio-rs/tokio/releases">tokio's releases</a>.</em></p> <blockquote> <h2>Tokio v1.48.0</h2> <h1>1.48.0 (October 14th, 2025)</h1> <p>The MSRV is increased to 1.71.</p> <h3>Added</h3> <ul> <li>fs: add <code>File::max_buf_size</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7594">#7594</a>)</li> <li>io: export <code>Chain</code> of <code>AsyncReadExt::chain</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7599">#7599</a>)</li> <li>net: add <code>SocketAddr::as_abstract_name</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7491">#7491</a>)</li> <li>net: add <code>TcpStream::quickack</code> and <code>TcpStream::set_quickack</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7490">#7490</a>)</li> <li>net: implement <code>AsRef<Self></code> for <code>TcpStream</code> and <code>UnixStream</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7573">#7573</a>)</li> <li>task: add <code>LocalKey::try_get</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7666">#7666</a>)</li> <li>task: implement <code>Ord</code> for <code>task::Id</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7530">#7530</a>)</li> </ul> <h3>Changed</h3> <ul> <li>deps: bump windows-sys to version 0.61 (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7645">#7645</a>)</li> <li>fs: preserve <code>max_buf_size</code> when cloning a <code>File</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7593">#7593</a>)</li> <li>macros: suppress <code>clippy::unwrap_in_result</code> in <code>#[tokio::main]</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7651">#7651</a>)</li> <li>net: remove <code>PollEvented</code> noise from Debug formats (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7675">#7675</a>)</li> <li>process: upgrade <code>Command::spawn_with</code> to use <code>FnOnce</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7511">#7511</a>)</li> <li>sync: remove inner mutex in <code>SetOnce</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7554">#7554</a>)</li> <li>sync: use <code>UnsafeCell::get_mut</code> in <code>Mutex::get_mut</code> and <code>RwLock::get_mut</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7569">#7569</a>)</li> <li>time: reduce the generated code size of <code>Timeout<T>::poll</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7535">#7535</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>macros: fix hygiene issue in <code>join!</code> and <code>try_join!</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7638">#7638</a>)</li> <li>net: fix copy/paste errors in udp peek methods (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7604">#7604</a>)</li> <li>process: fix error when runtime is shut down on nightly-2025-10-12 (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7672">#7672</a>)</li> <li>runtime: use release ordering in <code>wake_by_ref()</code> even if already woken (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7622">#7622</a>)</li> <li>sync: close the <code>broadcast::Sender</code> in <code>broadcast::Sender::new()</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7629">#7629</a>)</li> <li>sync: fix implementation of unused <code>RwLock::try_*</code> methods (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7587">#7587</a>)</li> </ul> <h3>Unstable</h3> <ul> <li>tokio: use cargo features instead of <code>--cfg</code> flags for <code>taskdump</code> and <code>io_uring</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7655">#7655</a>, <a href="https://redirect.github.com/tokio-rs/tokio/issues/7621">#7621</a>)</li> <li>fs: support <code>io_uring</code> in <code>fs::write</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7567">#7567</a>)</li> <li>fs: support <code>io_uring</code> with <code>File::open()</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7617">#7617</a>)</li> <li>fs: support <code>io_uring</code> with <code>OpenOptions</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7321">#7321</a>)</li> <li>macros: add <code>local</code> runtime flavor (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7375">#7375</a>, <a href="https://redirect.github.com/tokio-rs/tokio/issues/7597">#7597</a>)</li> </ul> <h3>Documented</h3> <ul> <li>io: clarify the zero capacity case of <code>AsyncRead::poll_read</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7580">#7580</a>)</li> <li>io: fix typos in the docs of <code>AsyncFd</code> readiness guards (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7583">#7583</a>)</li> <li>net: clarify socket gets closed on drop (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7526">#7526</a>)</li> <li>net: clarify the behavior of <code>UCred::pid()</code> on Cygwin (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7611">#7611</a>)</li> <li>net: clarify the supported platform of <code>set_reuseport()</code> and <code>reuseport()</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7628">#7628</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
4313e0a710 |
chore(deps): bump tracing-subscriber from 0.3.20 to 0.3.22 in /codex-rs (#8596)
[//]: # (dependabot-start) ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.3.20 to 0.3.22. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tokio-rs/tracing/releases">tracing-subscriber's releases</a>.</em></p> <blockquote> <h2>tracing-subscriber 0.3.22</h2> <h4>Important</h4> <p>The previous release [0.3.21] was yanked as it depended explicitly on [tracing-0.1.42], which was yanked due to a breaking change (see <a href="https://redirect.github.com/tokio-rs/tracing/issues/3424">#3424</a> for details). This release contains all the changes from the previous release, plus an update to the newer version of <code>tracing</code>.</p> <h3>Changed</h3> <ul> <li><code>tracing</code>: updated to 0.1.43 (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3427">#3427</a>)</li> </ul> <p><a href="https://redirect.github.com/tokio-rs/tracing/issues/3424">#3424</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/3424">tokio-rs/tracing#3424</a> <a href="https://redirect.github.com/tokio-rs/tracing/issues/3427">#3427</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/3427">tokio-rs/tracing#3427</a> [0.3.21]: <a href="https://github.com/tokio-rs/tracing/releases/tag/tracing-subscriber-0.3.21">https://github.com/tokio-rs/tracing/releases/tag/tracing-subscriber-0.3.21</a> [tracing-0.1.42]: <a href="https://github.com/tokio-rs/tracing/releases/tag/tracing-0.1.42">https://github.com/tokio-rs/tracing/releases/tag/tracing-0.1.42</a></p> <h2>tracing-subscriber 0.3.21</h2> <h3>Fixed</h3> <ul> <li>Change registry exit to decrement local span ref only (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3331">#3331</a>)</li> <li>Make Layered propagate <code>on_register_dispatch</code> (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3379">#3379</a>)</li> </ul> <h3>Changed</h3> <ul> <li><code>tracing</code>: updated to 0.1.42 (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3418">#3418</a>)</li> </ul> <h3>Performance</h3> <ul> <li>Remove <code>clone_span</code> on enter (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3289">#3289</a>)</li> </ul> <h3>Documented</h3> <ul> <li>Fix a few small things in the format module (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3339">#3339</a>)</li> <li>Fix extra closing brace in layer docs (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3350">#3350</a>)</li> <li>Fix link in <code>FmtSpan</code> docs (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3411">#3411</a>)</li> </ul> <p><a href="https://redirect.github.com/tokio-rs/tracing/issues/3289">#3289</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/%5B#3289%5D(https://redirect.github.com/tokio-rs/tracing/issues/3289)">tokio-rs/tracing#3289</a> <a href="https://redirect.github.com/tokio-rs/tracing/issues/3331">#3331</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/%5B#3331%5D(https://redirect.github.com/tokio-rs/tracing/issues/3331)">tokio-rs/tracing#3331</a> <a href="https://redirect.github.com/tokio-rs/tracing/issues/3339">#3339</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/%5B#3339%5D(https://redirect.github.com/tokio-rs/tracing/issues/3339)">tokio-rs/tracing#3339</a> <a href="https://redirect.github.com/tokio-rs/tracing/issues/3350">#3350</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/%5B#3350%5D(https://redirect.github.com/tokio-rs/tracing/issues/3350)">tokio-rs/tracing#3350</a> <a href="https://redirect.github.com/tokio-rs/tracing/issues/3379">#3379</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/%5B#3379%5D(https://redirect.github.com/tokio-rs/tracing/issues/3379)">tokio-rs/tracing#3379</a> <a href="https://redirect.github.com/tokio-rs/tracing/issues/3411">#3411</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/%5B#3411%5D(https://redirect.github.com/tokio-rs/tracing/issues/3411)">tokio-rs/tracing#3411</a> <a href="https://redirect.github.com/tokio-rs/tracing/issues/3418">#3418</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/%5B#3418%5D(https://redirect.github.com/tokio-rs/tracing/issues/3418)">tokio-rs/tracing#3418</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
ce3ff29932 |
chore(deps): bump toml_edit from 0.23.7 to 0.24.0+spec-1.1.0 in /codex-rs (#8595)
Bumps [toml_edit](https://github.com/toml-rs/toml) from 0.23.7 to 0.24.0+spec-1.1.0. <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
810ebe0d2b |
fix: restrict windows-sys to Windows target (#8522)
I attempted to build codex on LoongArch Linux and encountered compilation errors. After investigation, the errors were traced to certain `windows-sys` features which rely on platform-specific cfgs that only support x86 and aarch64. With this change applied, the project now builds and runs successfully on my platform: - OS: AOSC OS (loongarch64) - Kernel: Linux 6.17 - CPU: Loongson-3A6000 Please let me know if this approach is reasonable, or if there is a better way to support additional platforms. |
||
|
|
bf732600ea |
[chore] add additional_details to StreamErrorEvent + wire through (#8307)
### What Builds on #8293. Add `additional_details`, which contains the upstream error message, to relevant structures used to pass along retryable `StreamError`s. Uses the new TUI status indicator's `details` field (shows under the status header) to display the `additional_details` error to the user on retryable `Reconnecting...` errors. This adds clarity for users for retryable errors. Will make corresponding change to VSCode extension to show `additional_details` as expandable from the `Reconnecting...` cell. Examples: <img width="1012" height="326" alt="image" src="https://github.com/user-attachments/assets/f35e7e6a-8f5e-4a2f-a764-358101776996" /> <img width="1526" height="358" alt="image" src="https://github.com/user-attachments/assets/0029cbc0-f062-4233-8650-cc216c7808f0" /> |
||
|
|
38de0a1de4 |
fix: declare test path relative to $CARGO_MANIFEST_DIR (#8498)
This is another fix to prepare for Buck2. See #8496 for related changes. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/openai/codex/pull/8498). * __->__ #8498 * #8496 |
||
|
|
e61bae12e3 |
feat: introduce codex-utils-cargo-bin as an alternative to assert_cmd::Command (#8496)
This PR introduces a `codex-utils-cargo-bin` utility crate that wraps/replaces our use of `assert_cmd::Command` and `escargot::CargoBuild`. As you can infer from the introduction of `buck_project_root()` in this PR, I am attempting to make it possible to build Codex under [Buck2](https://buck2.build) as well as `cargo`. With Buck2, I hope to achieve faster incremental local builds (largely due to Buck2's [dice](https://buck2.build/docs/insights_and_knowledge/modern_dice/) build strategy, as well as benefits from its local build daemon) as well as faster CI builds if we invest in remote execution and caching. See https://buck2.build/docs/getting_started/what_is_buck2/#why-use-buck2-key-advantages for more details about the performance advantages of Buck2. Buck2 enforces stronger requirements in terms of build and test isolation. It discourages assumptions about absolute paths (which is key to enabling remote execution). Because the `CARGO_BIN_EXE_*` environment variables that Cargo provides are absolute paths (which `assert_cmd::Command` reads), this is a problem for Buck2, which is why we need this `codex-utils-cargo-bin` utility. My WIP-Buck2 setup sets the `CARGO_BIN_EXE_*` environment variables passed to a `rust_test()` build rule as relative paths. `codex-utils-cargo-bin` will resolve these values to absolute paths, when necessary. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/openai/codex/pull/8496). * #8498 * __->__ #8496 |
||
|
|
96a65ff0ed |
perf(tui): cap redraw scheduling to 60fps (#8499)
Clamp frame draw notifications in the `FrameRequester` scheduler so we don't redraw more frequently than a user can perceive. This applies to both `codex-tui` and `codex-tui2`, and keeps the draw/dispatch loops simple by centralizing the rate limiting in a small helper module. - Add `FrameRateLimiter` (pure, unit-tested) to clamp draw deadlines - Apply the limiter in the scheduler before emitting `TuiEvent::Draw` - Use immediate redraw requests for scroll paths (scheduler now coalesces + clamps) - Add scheduler tests covering immediate/delayed interactions |
||
|
|
40de81e7af |
Remove reasoning format (#8484)
This isn't very useful parameter. logic: ``` if model puts `**` in their reasoning, trim it and visualize the header. if couldn't trim: don't render if model doesn't support: don't render ``` We can simplify to: ``` if could trim, visualize header. if not, don't render ``` |
||
|
|
972b5853a0 |
fix: fix test that was writing temp file to cwd instead of TMPDIR (#8493)
I am trying to support building with [Buck2](https://buck2.build), which reports which files have changed between invocations of `buck2 test` and `tmp_delete_example.txt` came up. This turned out to be the reason. |
||
|
|
fb24c47bea |
fix: limit output size for exec command in unified exec (#8460)
### Issue [Investigation thread](https://openai.slack.com/archives/C095U48JNL9/p1766426234975789) Github issue: [issue one](https://github.com/openai/codex/issues/8197), [issue two](https://github.com/openai/codex/issues/8358), [issue three](https://github.com/openai/codex/issues/7585) Commonality: working in monorepo and large projects. Multiple threads going and showing sluggishness ending with a crash and grey background. Potential high usage of context. How to reproduce: * Open the whole monorepo with cursor or VSC on the latest extension. * Run ls -R in current CWD. ### Change In unified exec, we do not have max output check to the delta we ouput for shell commands. This causes issue with our VSCE UI which take the delta and construct the shell output. |
||
|
|
0130a2fa40 |
feat(tui2): add multi-click transcript selection (#8471)
Support multi-click transcript selection using transcript/viewport coordinates (wrapped visual line index + content column), not terminal buffer positions. Gestures: - double click: select word-ish token under cursor - triple click: select entire wrapped line - quad click: select paragraph (contiguous non-empty wrapped lines) - quint+ click: select the entire history cell (all wrapped lines belonging to a single `HistoryCell`, including blank lines inside the cell) Selection expansion rebuilds the wrapped transcript view from `HistoryCell::display_lines(width)` so boundaries match on-screen wrapping during scroll/resize/streaming reflow. Click grouping is resilient to minor drag jitter (some terminals emit tiny Drag events during clicks) and becomes more tolerant as the sequence progresses so quad/quint clicks are practical. Tests cover expansion (word/line/paragraph/cell), sequence resets (timing, motion, line changes, real drags), drag jitter, and behavior on spacer lines between history cells (paragraph/cell selection prefers the cell above). |
||
|
|
53eb2e9f27 |
[tui] add optional details to TUI status header (#8293)
### What Add optional `details` field to TUI's status indicator header. `details` is shown under the header with text wrapping and a max height of 3 lines. Duplicated changes to `tui2`. ### Why Groundwork for displaying error details under `Reconnecting...` for clarity with retryable errors. Basic examples <img width="1012" height="326" alt="image" src="https://github.com/user-attachments/assets/dd751ceb-b179-4fb2-8fd1-e4784d6366fb" /> <img width="1526" height="358" alt="image" src="https://github.com/user-attachments/assets/bbe466fc-faff-4a78-af7f-3073ccdd8e34" /> Truncation example <img width="936" height="189" alt="image" src="https://github.com/user-attachments/assets/f3f1b5dd-9050-438b-bb07-bd833c03e889" /> ### Tests Tested locally, added tests for truncation. |
||
|
|
2828549323 |
fix(tui2): start transcript selection on drag (#8466)
Avoid distracting 1-cell highlights on simple click by tracking an anchor on mouse down and only creating a visible selection once the mouse is dragged (selection head set). When dragging while following the bottom during streaming, request a scroll lock so the viewport stops moving under the active selection. Move selection state transitions into transcript_selection helpers (returning change/lock outcomes for the caller) and add unit tests for the state machine. |
||
|
|
cbc5fb9acf |
chore: save more about turn context in rollout log file (#8458)
### Motivation - Persist richer per-turn configuration in rollouts so resumed/forked sessions and tooling can reason about the exact instruction inputs and output constraints used for a turn. ### Description - Extend `TurnContextItem` to include optional `base_instructions`, `user_instructions`, and `developer_instructions`. - Record the optional `final_output_json_schema` associated with a turn. - Add an optional `truncation_policy` to `TurnContextItem` and populate it when writing turn-context rollout items. - Introduce a protocol-level `TruncationPolicy` representation and convert from core truncation policy when recording. ### Testing - `cargo test -p codex-protocol` (pass) |
||
|
|
310f2114ae |
fix(tui2): fix screen corruption (#8463)
Summary
Fixes intermittent screen corruption in tui2 (random stale characters)
by
addressing two terminal state desyncs: nested alt-screen transitions and
the
first-draw viewport clear.
- Make alt-screen enter/leave re-entrant via a small nesting guard so
closing
- Ensure the first viewport draw clears after the viewport is sized,
preventing
old terminal contents from leaking through when diff-based rendering
skips
space cells.
- Add docs + a small unit test for the alt-screen nesting behavior.
Testing
- cargo test -p codex-tui2
- cargo clippy -p codex-tui2 --all-features --tests
- Manual:
- Opened the transcript overlay and dismissed it repeatedly; verified
the
normal view redraws cleanly with no leftover characters.
- Ran tui2 in a new folder with no trust settings (and also cleared the
trust setting from config to re-trigger the prompt); verified the
initial
trust/onboarding screen renders without artifacts.
|
||
|
|
e27d9bd88f |
feat: honor /etc/codex/config.toml (#8461)
This adds logic to load `/etc/codex/config.toml` and associate it with `ConfigLayerSource::System` on UNIX. I refactored the code so it shares logic with the creation of the `ConfigLayerSource::User` layer. |
||
|
|
414fbe0da9 |
feat(tui2): add copy selection shortcut + UI affordance (#8462)
- Detect Ctrl+Shift+C vs VS Code Ctrl+Y and surface in footer hints - Render clickable “⧉ copy” pill near transcript selection (hidden while dragging) - Handle copy hotkey + click to copy selection - Document updated copy UX VSCode: <img width="1095" height="413" alt="image" src="https://github.com/user-attachments/assets/84be0c82-4762-4c3e-80a4-c751c078bdaa" /> Ghosty: <img width="505" height="68" alt="image" src="https://github.com/user-attachments/assets/109cc1a1-f029-4f7e-a141-4c6ed2da7338" /> |
||
|
|
277babba79 |
feat: load ExecPolicyManager from ConfigLayerStack (#8453)
https://github.com/openai/codex/pull/8354 added support for in-repo `.config/` files, so this PR updates the logic for loading `*.rules` files to load `*.rules` files from all relevant layers. The main change to the business logic is `load_exec_policy()` in `codex-rs/core/src/exec_policy.rs`. Note this adds a `config_folder()` method to `ConfigLayerSource` that returns `Option<AbsolutePathBuf>` so that it is straightforward to iterate over the sources and get the associated config folder, if any. |
||
|
|
14dbd0610a |
chore: include User layer in ConfigLayerStack even if config.toml is empty (#8456)
This is necessary so that `$CODEX_HOME/skills` and `$CODEX_HOME/rules` still get loaded even if `$CODEX_HOME/config.toml` does not exist. See #8453. For now, it is possible to omit this layer when creating a dummy `ConfigLayerStack` in a test. We can revisit that later, if it turns out to be the right thing to do. |
||
|
|
f6275a5142 |
chore(tui): include tracing targets in file logs (#8418)
with_target(true) is the default for tracing-subscriber, but we previously disabled it for file output. Keep it enabled so we can selectively enable specific targets/events at runtime via RUST_LOG=..., and then grep by target/module in the log file during troubleshooting. before and after: <img width="629" height="194" alt="image" src="https://github.com/user-attachments/assets/33f7df3f-0c5d-4d3f-b7b7-80b03d4acd21" /> |
||
|
|
7d0c5c7bd5 |
fix(tui2): copy transcript selection outside viewport (#8449)
Copy now operates on the full logical selection range (anchor..head), not just the visible viewport, so selections that include offscreen lines copy the expected text. Selection extraction is factored into `transcript_selection` to make the logic easier to test and reason about. It reconstructs the wrapped visual transcript, renders each wrapped line into a 1-row offscreen Buffer, and reads the selected cells. This keeps clipboard text aligned with what is rendered (gutter, indentation, wrapping). Additional behavior: - Skip continuation cells for wide glyphs (e.g. CJK) so copied text does not include spurious spaces like "コ X". - Avoid copying right-margin padding spaces. Manual tested performed: - "tell me a story" a few times - scroll up, select text, scroll down, copy text - confirm copied text is what you expect |
||
|
|
4673090f73 |
feat: open prompt in configured external editor (#7606)
Add `ctrl+g` shortcut to enable opening current prompt in configured editor (`$VISUAL` or `$EDITOR`). - Prompt is updated with editor's content upon editor close. - Paste placeholders are automatically expanded when opening the external editor, and are not "recompressed" on close - They could be preserved in the editor, but it would be hard to prevent the user from modifying the placeholder text directly, which would drop the mapping to the `pending_paste` value - Image placeholders stay as-is - `ctrl+g` explanation added to shortcuts menu, snapshot tests updated https://github.com/user-attachments/assets/4ee05c81-fa49-4e99-8b07-fc9eef0bbfce |
||
|
|
8e900c210c |
chore: add ConfigLayerStack as a field of Config (#8448)
This should make it easier to load `.codex/skills/` and `.codex/rules/` properly throughout. |