Commit Graph

8709 Commits

Author SHA1 Message Date
Michael Bolin
3cc66c8be6 Merge efc5556781 into sapling-pr-archive-bolinfest 2026-02-28 09:40:11 -08:00
Michael Bolin
efc5556781 core: add host_executable integration coverage 2026-02-28 09:40:00 -08:00
Michael Bolin
c3a2260dc1 Merge 19008e0d56 into sapling-pr-archive-bolinfest 2026-02-28 09:25:46 -08:00
Leo Shimonaka
19008e0d56 fix: MacOSAutomationPermission::BundleIDs should allow communicating with launchservicesd 2026-02-28 09:25:35 -08:00
Michael Bolin
6a3b65c172 Merge 2ab139d57b into sapling-pr-archive-bolinfest 2026-02-28 09:01:16 -08:00
Michael Bolin
ddfdb2f6f3 Merge f38077e765 into sapling-pr-archive-bolinfest 2026-02-28 09:01:15 -08:00
Michael Bolin
2ab139d57b fix: merge skill permissions into escalated sandbox by default 2026-02-28 09:01:07 -08:00
Michael Bolin
f38077e765 core: resolve host_executable() rules during preflight 2026-02-28 09:01:03 -08:00
jif-oai
74e5150b1e fix: package models.json for Bazel tests (#13129) 2026-02-28 17:21:02 +01:00
jif-oai
84b662e74f nit: disable on windows (#13127) 2026-02-28 14:55:16 +01:00
daveaitel-openai
eec3b1e235 Speed up subagent startup (#12935)
## Summary
- skip online model refresh for subagent sessions
- avoid rollout flushes during subagent startup
- keep /models refresh for non-subagent sessions

## Testing
- cargo test -p codex-core --test all
suite::models_etag_responses::refresh_models_on_models_etag_mismatch_and_avoid_duplicate_models_fetch
- cargo test -p codex-core --test all
suite::remote_models::remote_models_long_model_slug_is_sent_with_high_reasoning
- cargo test -p codex-core --test all
suite::model_switching::model_switch_to_smaller_model_updates_token_context_window
- cargo test -p codex-core --test all
suite::compact::pre_sampling_compact_runs_on_switch_to_smaller_context_model
- cargo test -p codex-core --test all
suite::compact::pre_sampling_compact_runs_after_resume_and_switch_to_smaller_model
- cargo test -p codex-core --test all
suite::personality::remote_model_friendly_personality_instructions_with_feature

---------

Co-authored-by: Codex <noreply@openai.com>
2026-02-28 14:54:08 +01:00
jif-oai
3bfee6fcb5 nit: ignore `resume_startup_does_not_consume_model_availability_nux_c… (#13128) 2026-02-28 14:50:41 +01:00
Andi Liu
5f7c38baa9 Tune memory read-path for stale facts (#13088)
## Why
- tighten Codex memory-read behavior around stale facts and conflicting
memory
- encode the risk-of-drift vs verification-effort decision rule directly
in the read-path prompt
- make partial stale-detail updates explicit so correcting only the
answer is not treated as sufficient

## What changed
- update `codex-rs/core/templates/memories/read_path.md`
- add guidance for when to verify cheap local facts vs when to answer
from older memory with visible provenance
- strengthen same-turn `MEMORY.md` updates when stored concrete details
are stale

## Notes
- this is based on some staleness eval work
2026-02-28 14:48:47 +01:00
jif-oai
bee93ca2f3 chore: change mem default (#13125) 2026-02-28 14:45:27 +01:00
jif-oai
d33f4b54ac feat: skill disable respect config layer (#13027) 2026-02-28 14:17:05 +01:00
jif-oai
2b38b4e03b feat: approval for sub-agent in the TUI (#12995)
<img width="766" height="290" alt="Screenshot 2026-02-27 at 10 50 48"
src="https://github.com/user-attachments/assets/3bc96cd9-ed2c-4d67-a317-8f7b60abbbb1"
/>
2026-02-28 14:07:07 +01:00
Michael Bolin
0dc066dfc4 Merge 8da75ba0ed into sapling-pr-archive-bolinfest 2026-02-27 21:52:50 -08:00
Michael Bolin
8da75ba0ed core: resolve host_executable() rules during preflight 2026-02-27 21:52:43 -08:00
Michael Bolin
da4f28980b merge commit for archive created by Sapling 2026-02-27 21:49:08 -08:00
Michael Bolin
adc1788332 fix: merge skill permissions into escalated sandbox by default 2026-02-27 21:48:57 -08:00
Michael Bolin
d33e8e3581 Merge 55dfa3cf21 into sapling-pr-archive-bolinfest 2026-02-27 21:36:00 -08:00
Michael Bolin
55dfa3cf21 core: resolve host_executable() rules during preflight 2026-02-27 21:35:48 -08:00
Eric Traut
83177ed7a8 Enable analytics in codex exec and codex mcp-server (#13083)
Addresses #12913

`codex exec` was not correctly defaulting to Otel metrics to enabled 
`codex mcp-server` completely lacked an Otel collector

Summary:
- default to enabling analytics when `codex exec` initializes
OpenTelemetry so the CLI actually reports metrics again
- add a regression test that proves the flag remains enabled by default
- added Otel collector to `codex mcp-server`
2026-02-27 19:22:54 -07:00
alexsong-oai
e2fef7a3d2 Make cloud_requirements fail close (#13063)
Make it fail-close only for CLI for now
Will extend this for app-server later
2026-02-27 18:22:05 -08:00
Eric Traut
e6032eb0b7 Fix CLI feedback link (#13086)
Addresses #12967

About a month ago, I updated the Github bug report templates to
accommodate the (at the time) new Codex app. The `/feedback` code path
in the CLI was referencing one of the old templates, and I didn't
realize it at the time. This PR updates the link so users don't get an
empty bug template when using `/feedback`.
2026-02-27 19:02:40 -07:00
Michael Bolin
8caf978d0e Merge 615da1b670 into sapling-pr-archive-bolinfest 2026-02-27 17:58:13 -08:00
Michael Bolin
615da1b670 fix: merge skill permissions into escalated sandbox by default 2026-02-27 17:54:38 -08:00
sayan-oai
033ef9cb9d feat: add debug clear-memories command to hard-wipe memories state (#13085)
#### what
adds a `codex debug clear-memories` command to help with clearing all
memories state from disk, sqlite db, and marking threads as
`memory_mode=disabled` so they don't get resummarized when the
`memories` feature is re-enabled.

#### tests
add tests
2026-02-27 17:45:55 -08:00
Ruslan Nigmatullin
8c1e3f3e64 app-server: Add ephemeral field to Thread object (#13084)
Currently there is no alternative way to know that thread is ephemeral,
only client which did create it has the knowledge.
2026-02-27 17:42:25 -08:00
Michael Bolin
9c0185ebb8 Merge b26c6ce567 into sapling-pr-archive-bolinfest 2026-02-27 17:41:59 -08:00
Michael Bolin
b26c6ce567 fix: merge skill permissions into escalated sandbox by default 2026-02-27 17:41:47 -08:00
Michael Bolin
df0111ae85 Merge 719e20d779 into sapling-pr-archive-bolinfest 2026-02-27 17:41:43 -08:00
Michael Bolin
719e20d779 core: resolve host_executable() rules during preflight 2026-02-27 17:41:32 -08:00
Michael Bolin
1a8d930267 core: adopt host_executable() rules in zsh-fork (#13046)
## Why

[#12964](https://github.com/openai/codex/pull/12964) added
`host_executable()` support to `codex-execpolicy`, but the zsh-fork
interception path in `unix_escalation.rs` was still evaluating commands
with the default exact-token matcher.

That meant an intercepted absolute executable such as `/usr/bin/git
status` could still miss basename rules like `prefix_rule(pattern =
["git", "status"])`, even when the policy also defined a matching
`host_executable(name = "git", ...)` entry.

This PR adopts the new matching behavior in the zsh-fork runtime only.
That keeps the rollout intentionally narrow: zsh-fork already requires
explicit user opt-in, so it is a safer first caller to exercise the new
`host_executable()` scheme before expanding it to other execpolicy call
sites.

It also brings zsh-fork back in line with the current `prefix_rule()`
execution model. Until prefix rules can carry their own permission
profiles, a matched `prefix_rule()` is expected to rerun the intercepted
command unsandboxed on `allow`, or after the user accepts `prompt`,
instead of merely continuing inside the inherited shell sandbox.

## What Changed

- added `evaluate_intercepted_exec_policy()` in
`core/src/tools/runtimes/shell/unix_escalation.rs` to centralize
execpolicy evaluation for intercepted commands
- switched intercepted direct execs in the zsh-fork path to
`check_multiple_with_options(...)` with `MatchOptions {
resolve_host_executables: true }`
- added `commands_for_intercepted_exec_policy()` so zsh-fork policy
evaluation works from intercepted `(program, argv)` data instead of
reconstructing a synthetic command before matching
- left shell-wrapper parsing intentionally disabled by default behind
`ENABLE_INTERCEPTED_EXEC_POLICY_SHELL_WRAPPER_PARSING`, so
path-sensitive matching relies on later direct exec interception rather
than shell-script parsing
- made matched `prefix_rule()` decisions rerun intercepted commands with
`EscalationExecution::Unsandboxed`, while unmatched-command fallback
keeps the existing sandbox-preserving behavior
- extracted the zsh-fork test harness into
`core/tests/common/zsh_fork.rs` so both the skill-focused and
approval-focused integration suites can exercise the same runtime setup
- limited this change to the intercepted zsh-fork path rather than
changing every execpolicy caller at once
- added runtime coverage in
`core/src/tools/runtimes/shell/unix_escalation_tests.rs` for allowed and
disallowed `host_executable()` mappings and the wrapper-parsing modes
- added integration coverage in `core/tests/suite/approvals.rs` to
verify a saved `prefix_rule(pattern=["touch"], decision="allow")` reruns
under zsh-fork outside a restrictive `WorkspaceWrite` sandbox

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/13046).
* #13065
* __->__ #13046
2026-02-28 01:41:23 +00:00
Owen Lin
8fa792868c fix(app-server): make thread/start non-blocking (#13033)
Stop `thread/start` from blocking other app-server requests.

Before this change, `thread/start ran` inline on the request loop, so
slow startup paths like MCP auth checks could hold up unrelated requests
on the same connection, including `thread/loaded/list`. This moves
`thread/start` into a background task.

While doing so, it revealed an issue where we were doing nested locking
(and there were some race conditions possible that could introduce a
"phantom listener"). This PR also refactors the listener/subscription
bookkeeping - listener/subscription state is now centralized in
`ThreadStateManager` instead of being split across multiple lock
domains. That makes late auto-attach on `thread/start` race-safe and
avoids reintroducing disconnected clients as phantom subscribers.
2026-02-28 01:40:08 +00:00
Eric Traut
6604608bad Suppress duplicate assistant output on stdout in interactive sessions (#13082)
Addresses #12566

Summary
- stop printing the final assistant message on stdout when the process
is running in a terminal so interactive users only see it once
- add a helper that gates the stdout emission and cover it with unit
tests
2026-02-27 18:31:17 -07:00
Ruslan Nigmatullin
70ed6cbc71 app-server: Add an ability to watch events in the test client (#13080)
Add a `watch` subcommand to `codex-app-server-test-client` binary to
help in manual testing of events flow.
2026-02-27 17:19:53 -08:00
Ahmed Ibrahim
ec6f6aacbf Add model availability NUX tooltips (#13021)
- override startup tooltips with model availability NUX and persist
per-model show counts in config
- stop showing each model after four exposures and fall back to normal
tooltips
2026-02-27 17:14:06 -08:00
Michael Bolin
fd0722f69f Merge 4516726e36 into sapling-pr-archive-bolinfest 2026-02-27 17:09:09 -08:00
Michael Bolin
4516726e36 core: resolve host_executable() rules during preflight 2026-02-27 17:06:00 -08:00
Michael Bolin
ac119a12b8 core: adopt host_executable() rules in zsh-fork 2026-02-27 17:06:00 -08:00
Michael Bolin
2c382c3aea Merge 73f846a2d5 into sapling-pr-archive-bolinfest 2026-02-27 16:55:43 -08:00
Michael Bolin
73f846a2d5 core: resolve host_executable() rules during preflight 2026-02-27 16:55:37 -08:00
Michael Bolin
72e67da3b9 core: adopt host_executable() rules in zsh-fork 2026-02-27 16:55:37 -08:00
Eric Traut
ff5cbfd7d4 Handle missing plan info for ChatGPT accounts (#13072)
Addresses https://github.com/openai/codex/issues/13007 and
https://github.com/openai/codex/issues/12170

There are situations where the ChatGPT auth backend might return a JWT
that contains no plan information. Most code paths already handle this
case well, but the internal implementation of the "account/read" app
server call was failing in this case (returning an error rather than
properly returning None for the plan).

This resulted in a situation where users needed to log in every time the
extension or app started even if they successfully logged in the last
time.

Summary
- allow ChatGPT-authenticated accounts to fall back to
`AccountPlanType::Unknown` when the token omits the plan claim
- add regression coverage in `app-server/tests/suite/v2/account.rs` to
confirm `account/read` returns `plan_type: Unknown` when the claim is
absent
- ensure the Rust auth helpers and fixtures treat missing plan claims as
Optional and default to `Unknown`
2026-02-27 17:51:21 -07:00
Michael Bolin
56f663a0e2 Merge 93f803fd66 into sapling-pr-archive-bolinfest 2026-02-27 16:45:17 -08:00
Michael Bolin
93f803fd66 core: resolve host_executable() rules during preflight 2026-02-27 16:45:06 -08:00
Michael Bolin
4369a27938 core: adopt host_executable() rules in zsh-fork 2026-02-27 16:45:06 -08:00
Michael Bolin
df5f8f8833 Merge 8cbe3c28d6 into sapling-pr-archive-bolinfest 2026-02-27 16:27:17 -08:00
Michael Bolin
9a84a7c5be merge commit for archive created by Sapling 2026-02-27 16:21:02 -08:00