Commit Graph

12164 Commits

Author SHA1 Message Date
Michael Bolin
0a0736268c merge commit for archive created by Sapling 2026-04-21 07:46:24 -07:00
Michael Bolin
3176a0bdc5 core: make test-log a dev dependency
test-log is only used by codex-core tests, so it does not need to be part of
the normal codex-core dependency graph. Keeping it in dev-dependencies removes
it from normal builds and keeps the production dependency set a little smaller.

Verification:

- `cargo tree -p codex-core --edges normal --invert test-log`
- `cargo check -p codex-core --lib`
- `cargo test -p codex-core --lib`
2026-04-21 07:46:06 -07:00
Michael Bolin
a5f0b1a50a build: reduce Rust dev debuginfo
The slow codex-core rebuilds are dominated by debug-info codegen, not parsing
or type checking. On a warm-dependency package rebuild, the baseline
codex-core compile was about 39.5s wall / 38.9s rustc total, with
codegen_crate around 14.0s and LLVM_passes around 13.4s. Setting codex-core
to line-tables-only debug info brought that to about 27.2s wall / 26.7s rustc
total, with codegen_crate around 3.1s and LLVM_passes around 2.8s.

I also sampled other first-party crates instead of keeping a codex-core-only
package override. codex-app-server showed the same pattern: rustc total
dropped from 15.85s to 10.48s, while codegen_crate plus LLVM_passes dropped
from about 13.47s to 3.23s. codex-app-server-protocol had a smaller but still
real improvement, 16.05s to 14.58s total, and smaller crates showed modest
wins. That points to a workspace dev-profile policy rather than a
hand-maintained list of large crates.

Use `[profile.dev] debug = 1` so local dev builds keep line tables and useful
backtraces while avoiding full variable debug info. This can cause a one-time
rebuild because the Cargo dev profile hash changes, but subsequent rebuilds
avoid the expensive debug-info work.

Bazel does not read Cargo profiles for this setting. rules_rust derives
debuginfo from Bazel toolchain/compilation-mode settings and the current
fastbuild action already emitted `--codegen=debuginfo=0`. This change makes
the CI choice explicit for both target and exec-configuration Rust actions
with `-Cdebuginfo=0`.

Verification:

- `just bazel-lock-update`
- `just bazel-lock-check`
- `cargo check -p codex-core --lib`
- `cargo test -p codex-core --lib`
- Bazel `aquery --config=ci-linux` confirmed `--codegen=debuginfo=0` and
  `-Cdebuginfo=0` for `//codex-rs/core:core`
2026-04-21 07:46:06 -07:00
Michael Bolin
7e1ef5fe5d Merge 94ad17bae5 into sapling-pr-archive-bolinfest 2026-04-21 07:37:50 -07:00
Michael Bolin
94ad17bae5 core: make test-log a dev dependency
test-log is only used by codex-core tests, so it does not need to be part of
the normal codex-core dependency graph. Keeping it in dev-dependencies removes
it from normal builds and keeps the production dependency set a little smaller.

Verification:

- `cargo tree -p codex-core --edges normal --invert test-log`
- `cargo check -p codex-core --lib`
- `cargo test -p codex-core --lib`
2026-04-21 07:37:38 -07:00
Michael Bolin
29c4dd96ae merge commit for archive created by Sapling 2026-04-21 07:37:22 -07:00
Michael Bolin
f7d034ca9f build: reduce Rust dev debuginfo
The slow codex-core rebuilds are dominated by debug-info codegen, not parsing
or type checking. On a warm-dependency package rebuild, the baseline
codex-core compile was about 39.5s wall / 38.9s rustc total, with
codegen_crate around 14.0s and LLVM_passes around 13.4s. Setting codex-core
to line-tables-only debug info brought that to about 27.2s wall / 26.7s rustc
total, with codegen_crate around 3.1s and LLVM_passes around 2.8s.

I also sampled other first-party crates instead of keeping a codex-core-only
package override. codex-app-server showed the same pattern: rustc total
dropped from 15.85s to 10.48s, while codegen_crate plus LLVM_passes dropped
from about 13.47s to 3.23s. codex-app-server-protocol had a smaller but still
real improvement, 16.05s to 14.58s total, and smaller crates showed modest
wins. That points to a workspace dev-profile policy rather than a
hand-maintained list of large crates.

Use `[profile.dev] debug = 1` so local dev builds keep line tables and useful
backtraces while avoiding full variable debug info. This can cause a one-time
rebuild because the Cargo dev profile hash changes, but subsequent rebuilds
avoid the expensive debug-info work.

Bazel does not read Cargo profiles for this setting. rules_rust derives
debuginfo from Bazel toolchain/compilation-mode settings and the current
fastbuild action already emitted `--codegen=debuginfo=0`. This change makes
the CI choice explicit for both target and exec-configuration Rust actions
with `-Cdebuginfo=0`.

Verification:

- `just bazel-lock-update`
- `just bazel-lock-check`
- `cargo check -p codex-core --lib`
- `cargo test -p codex-core --lib`
- Bazel `aquery --config=ci-linux` confirmed `--codegen=debuginfo=0` and
  `-Cdebuginfo=0` for `//codex-rs/core:core`
2026-04-21 07:35:29 -07:00
Felipe Coury
1101dec9ae fix(tui): disable enhanced keys for VS Code WSL (#18741)
Fixes https://github.com/openai/codex/issues/13638

## Why

VS Code's integrated terminal can run a Linux shell through WSL without
exposing `TERM_PROGRAM` to the Linux process, and with crossterm
keyboard enhancement flags enabled that environment can turn dead-key
composition into malformed key events instead of composed Unicode input.
Codex already handles composed Unicode correctly, so the fix is to avoid
enabling the terminal mode that breaks this path for the affected
terminal combination.

## What Changed

- Automatically skip crossterm keyboard enhancement flags when Codex
detects WSL plus VS Code, including a Windows-side `TERM_PROGRAM` probe
through WSL interop.
- Add `CODEX_TUI_DISABLE_KEYBOARD_ENHANCEMENT` so users can
force-disable or force-enable the keyboard enhancement policy for
diagnosis.

## Verification

- Added unit coverage for env parsing, VS Code detection, and the WSL/VS
Code auto-disable policy.
- `cargo check -p codex-tui` passed.
- `./tools/argument-comment-lint/run.py -p codex-tui -- --tests` passed.
- `cargo test -p codex-tui` was attempted locally, but the checkout
failed during linking before tests executed because V8 symbols from
`codex-code-mode` were unresolved for `arm64`.
2026-04-21 09:57:51 -03:00
Abhinav
ef071cf816 show bash mode in the TUI (#18271)
## What

- Explicitly show our "bash mode" by changing the color and adding a
callout similar to how we do for `Plan mode (shift + tab to cycle)`
- Also replace our `›` composer prefix with a bang `!`


![](https://github.com/user-attachments/assets/f5549c75-3a03-433d-aa57-e4c6d0682c49)

## Why

- It was unclear that we had a Bash mode
- This feels more responsive
- It looks cool!

---------

Co-authored-by: Codex <noreply@openai.com>
2026-04-21 00:15:49 -07:00
pakrym-oai
a3ed5068c1 [codex] Tighten code review skill wording (#18818)
## Summary

This updates the code review orchestrator skill wording so the
instruction explicitly requires returning every issue from every
subagent.

## Impact

The change is limited to `.codex/skills/code-review/SKILL.md` and
clarifies review aggregation behavior for future Codex-driven reviews.

## Validation

No tests were run because this is a markdown-only skill wording change.
2026-04-21 00:04:04 -07:00
Michael Bolin
4259a0df98 Merge dc9c6dc8c9 into sapling-pr-archive-bolinfest 2026-04-20 23:18:35 -07:00
Michael Bolin
63faf33300 merge commit for archive created by Sapling 2026-04-20 23:17:19 -07:00
Michael Bolin
dc9c6dc8c9 tests: isolate approval fixtures from host rules 2026-04-20 23:16:54 -07:00
Michael Bolin
c1cbd7a6fe shell-escalation: carry resolved permission profiles 2026-04-20 23:16:54 -07:00
Michael Bolin
bbb84c437c mcp: include permission profiles in sandbox state 2026-04-20 23:16:54 -07:00
Michael Bolin
3bdedd091b tui: carry permission profiles on user turns 2026-04-20 23:16:54 -07:00
Michael Bolin
fe05ed6838 tui: sync session permission profiles 2026-04-20 23:16:54 -07:00
Michael Bolin
a673f976a1 app-server: accept command permission profiles 2026-04-20 23:16:54 -07:00
Michael Bolin
f4b6873f50 protocol: report session permission profiles 2026-04-20 23:16:54 -07:00
Michael Bolin
072750e046 rollout: persist turn permission profiles 2026-04-20 23:16:54 -07:00
Michael Bolin
ab0e270801 clients: send permission profiles to app-server 2026-04-20 23:16:54 -07:00
Michael Bolin
9d354ba7d9 app-server: accept permission profile overrides 2026-04-20 23:16:54 -07:00
Michael Bolin
40397502d5 app-server: expose thread permission profiles 2026-04-20 23:16:54 -07:00
Michael Bolin
8618f6482f core: derive active permission profiles 2026-04-20 23:16:54 -07:00
Michael Bolin
7ed53a50c3 exec-server: carry filesystem sandbox profiles 2026-04-20 23:16:54 -07:00
Michael Bolin
cf9f1ea320 sandboxing: intersect permission profiles semantically 2026-04-20 23:16:53 -07:00
pash-openai
dc1a8f2190 [tool search] support namespaced deferred dynamic tools (#18413)
Deferred dynamic tools need to round-trip a namespace so a tool returned
by `tool_search` can be called through the same registry key that core
uses for dispatch.

This change adds namespace support for dynamic tool specs/calls,
persists it through app-server thread state, and routes dynamic tool
calls by full `ToolName` while still sending the app the leaf tool name.
Deferred dynamic tools must provide a namespace; non-deferred dynamic
tools may remain top-level.

It also introduces `LoadableToolSpec` as the shared
function-or-namespace Responses shape used by both `tool_search` output
and dynamic tool registration, so dynamic tools use the same wrapping
logic in both paths.

Validation:
- `cargo test -p codex-tools`
- `cargo test -p codex-core tool_search`

---------

Co-authored-by: Sayan Sisodiya <sayan@openai.com>
2026-04-21 14:13:08 +08:00
Michael Bolin
8a7d1a1db8 Merge 9a309e592e into sapling-pr-archive-bolinfest 2026-04-20 23:10:47 -07:00
Michael Bolin
9a309e592e tests: isolate approval fixtures from host rules 2026-04-20 23:09:48 -07:00
Michael Bolin
055fda9df9 shell-escalation: carry resolved permission profiles 2026-04-20 23:09:48 -07:00
Michael Bolin
d776838702 mcp: include permission profiles in sandbox state 2026-04-20 23:09:48 -07:00
Michael Bolin
3b69ad41e6 tui: carry permission profiles on user turns 2026-04-20 23:09:48 -07:00
Michael Bolin
e6e68b3b0d tui: sync session permission profiles 2026-04-20 23:09:48 -07:00
Michael Bolin
f64a036721 app-server: accept command permission profiles 2026-04-20 23:09:48 -07:00
Michael Bolin
e17a9a2f91 protocol: report session permission profiles 2026-04-20 23:09:48 -07:00
Michael Bolin
b235e21b1a rollout: persist turn permission profiles 2026-04-20 23:09:48 -07:00
Michael Bolin
ea8eb64bf7 clients: send permission profiles to app-server 2026-04-20 23:09:48 -07:00
Michael Bolin
1a9b5dc389 app-server: accept permission profile overrides 2026-04-20 23:09:48 -07:00
Michael Bolin
89da5a0825 app-server: expose thread permission profiles 2026-04-20 23:09:48 -07:00
Michael Bolin
5ae72d87dc core: derive active permission profiles 2026-04-20 23:09:48 -07:00
Michael Bolin
668e164a0d exec-server: carry filesystem sandbox profiles 2026-04-20 23:09:48 -07:00
Michael Bolin
5bc0ac8294 sandboxing: intersect permission profiles semantically 2026-04-20 23:09:48 -07:00
Michael Bolin
1dcea729d3 chore: enable await-holding clippy lints (#18698)
Follow-up to https://github.com/openai/codex/pull/18178, where we said
the await-holding clippy rule would be enabled separately.

Enable `await_holding_lock` and `await_holding_invalid_type` after the
preceding commits fixed or explicitly documented the current offenders.
2026-04-21 06:06:05 +00:00
Michael Bolin
04de961d22 merge commit for archive created by Sapling 2026-04-20 22:55:03 -07:00
Michael Bolin
0614e9f1ab tests: isolate approval fixtures from host rules 2026-04-20 22:54:43 -07:00
Michael Bolin
5454243057 shell-escalation: carry resolved permission profiles 2026-04-20 22:54:43 -07:00
Michael Bolin
df803281cf mcp: include permission profiles in sandbox state 2026-04-20 22:54:43 -07:00
Michael Bolin
e0554ee748 tui: carry permission profiles on user turns 2026-04-20 22:54:43 -07:00
Michael Bolin
ff5026da6c tui: sync session permission profiles 2026-04-20 22:54:43 -07:00
Michael Bolin
906e02007c app-server: accept command permission profiles 2026-04-20 22:54:43 -07:00