Commit Graph

9612 Commits

Author SHA1 Message Date
Michael Bolin
218d549e2d merge commit for archive created by Sapling 2026-03-13 20:59:15 -07:00
Michael Bolin
f9a06aafcc Apply argument comment lint across codex-rs 2026-03-13 20:59:03 -07:00
Michael Bolin
b0b343c01b Add argument-comment Dylint runner 2026-03-13 20:59:03 -07:00
Michael Bolin
b864c9ff14 merge commit for archive created by Sapling 2026-03-13 20:59:02 -07:00
Michael Bolin
29694ee84a refactor: route zsh-fork through unified exec 2026-03-13 20:58:52 -07:00
sayan-oai
d272f45058 move plugin/skill instructions into dev msg and reorder (#14609)
Move the general `Apps`, `Skills` and `Plugins` instructions blocks out
of `user_instructions` and into the developer message, with new `Apps ->
Skills -> Plugins` order for better clarity.

Also wrap those sections in stable XML-style instruction tags (like
other sections) and update prompt-layout tests/snapshots. This makes the
tests less brittle in snapshot output (we can parse the sections), and
it consolidates the capability instructions in one place.

#### Tests
Updated snapshots, added tests.

`<AGENTS_MD>` disappearing in snapshots is expected: before this change,
the wrapped user-instructions message was kept alive by `Skills`
content. Now that `Skills` and `Plugins` are in the developer message,
that wrapper only appears when there is real
project-doc/user-instructions content.

---------

Co-authored-by: Charley Cunningham <ccunningham@openai.com>
2026-03-13 20:51:01 -07:00
Michael Bolin
de0cf18933 Merge f98685f5b6 into sapling-pr-archive-bolinfest 2026-03-13 20:12:03 -07:00
Michael Bolin
f98685f5b6 Apply argument comment lint across codex-rs 2026-03-13 20:11:58 -07:00
viyatb-oai
7f571396c8 fix: sync split sandbox policies for spawned subagents (#14650)
## Summary
- reapply the live split filesystem and network sandbox policies when
building spawned subagent configs
- keep spawned child sessions aligned with the parent turn after
role-layer config reloads
- add regression coverage for both config construction and spawned
child-turn inheritance
2026-03-14 03:03:49 +00:00
Michael Bolin
5b71dee995 Merge 73a607bf3d into sapling-pr-archive-bolinfest 2026-03-13 19:57:55 -07:00
Michael Bolin
73a607bf3d Apply argument comment lint across codex-rs 2026-03-13 19:57:50 -07:00
viyatb-oai
6dc04df5e6 fix: persist future network host approvals across sessions (#14619)
## Summary
- apply persisted execpolicy network rules when booting the managed
network proxy
- pass the current execpolicy into managed proxy startup so host
approvals selected with "allow this host in the future" survive new
sessions
2026-03-14 02:46:10 +00:00
Michael Bolin
513b0fea68 Merge 0ec4a457c5 into sapling-pr-archive-bolinfest 2026-03-13 19:44:40 -07:00
Michael Bolin
0ec4a457c5 Apply argument comment lint across codex-rs 2026-03-13 19:44:33 -07:00
Charley Cunningham
bbd329a812 Fix turn context reconstruction after backtracking (#14616)
## Summary
- reuse rollout reconstruction when applying a backtrack rollback so
`reference_context_item` is restored from persisted rollout state
- build rollback replay from the flushed rollout items plus the rollback
marker, avoiding the extra reread/fallback path
- add regression coverage for rollback after compaction so turn-context
diffing stays aligned after backtracking

Co-authored-by: Codex <noreply@openai.com>
2026-03-13 19:28:31 -07:00
Michael Bolin
fe213e9ac5 merge commit for archive created by Sapling 2026-03-13 19:20:36 -07:00
Michael Bolin
7308616289 Apply argument comment lint across codex-rs 2026-03-13 19:20:03 -07:00
Michael Bolin
2a3f2fc52a Add argument-comment Dylint runner 2026-03-13 19:19:05 -07:00
Ahmed Ibrahim
69c8a1ef9e Fix Windows CI assertions for guardian and Smart Approvals (#14645)
- Normalize guardian assessment path serialization to use forward
slashes for cross-platform stability.
- Seed workspace-write defaults in the Smart Approvals
override-turn-context test so Windows and non-Windows selection flows
are consistent.

---------

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Charles Cunningham <ccunningham@openai.com>
2026-03-14 02:15:58 +00:00
Eric Traut
4b9d5c8c1b Add openai_base_url config override for built-in provider (#12031)
We regularly get bug reports from users who mistakenly have the
`OPENAI_BASE_URL` environment variable set. This PR deprecates this
environment variable in favor of a top-level config key
`openai_base_url` that is used for the same purpose. By making it a
config key, it will be more visible to users. It will also participate
in all of the infrastructure we've added for layered and managed
configs.

Summary
- introduce the `openai_base_url` top-level config key, update
schema/tests, and route the built-in openai provider through it while
- fall back to deprecated `OPENAI_BASE_URL` env var but warn user of
deprecation when no `openai_base_url` config key is present
- update CLI, SDK, and TUI code to prefer the new config path (with a
deprecated env-var fallback) and document the SDK behavior change
2026-03-13 20:12:25 -06:00
Michael Bolin
1a1ad09f5f Merge 7e41132334 into sapling-pr-archive-bolinfest 2026-03-13 19:06:46 -07:00
Michael Bolin
7e41132334 Apply argument comment lint across codex-rs 2026-03-13 19:06:41 -07:00
Michael Bolin
a10126b3ca merge commit for archive created by Sapling 2026-03-13 18:52:33 -07:00
Michael Bolin
cfc2e4783d Apply argument comment lint across codex-rs 2026-03-13 18:52:26 -07:00
Michael Bolin
d9b7e101cd merge commit for archive created by Sapling 2026-03-13 18:45:15 -07:00
Michael Bolin
2e751fd1d2 Apply argument comment lint across codex-rs 2026-03-13 18:45:09 -07:00
Michael Bolin
a27cd45cd7 merge commit for archive created by Sapling 2026-03-13 18:42:57 -07:00
Michael Bolin
5b505bb700 Apply argument comment lint across codex-rs 2026-03-13 18:42:41 -07:00
Michael Bolin
4e594bc93b Add argument-comment Dylint runner 2026-03-13 18:42:38 -07:00
Michael Bolin
a53b9ea7d7 merge commit for archive created by Sapling 2026-03-13 18:16:31 -07:00
Michael Bolin
e490e524ad refactor: route zsh-fork through unified exec 2026-03-13 18:15:44 -07:00
Michael Bolin
9c4f567834 merge commit for archive created by Sapling 2026-03-13 18:12:18 -07:00
Michael Bolin
07f8ccc31d Apply argument comment lint across codex-rs 2026-03-13 18:12:10 -07:00
Michael Bolin
b4aa9f15ef merge commit for archive created by Sapling 2026-03-13 18:05:13 -07:00
Michael Bolin
ce9a5a6ddb Add argument-comment Dylint runner 2026-03-13 18:05:02 -07:00
Michael Bolin
400fb6f635 Apply argument comment lint across codex-rs 2026-03-13 18:05:02 -07:00
Michael Bolin
14dc7e2972 merge commit for archive created by Sapling 2026-03-13 18:04:47 -07:00
Michael Bolin
d15901c0ca Apply argument comment lint across codex-rs 2026-03-13 18:04:19 -07:00
Michael Bolin
139eaf76ad Add argument-comment Dylint runner 2026-03-13 18:04:13 -07:00
Michael Bolin
6338722432 merge commit for archive created by Sapling 2026-03-13 17:50:25 -07:00
Michael Bolin
b25c9d75e8 Apply argument comment lint across codex-rs 2026-03-13 17:49:10 -07:00
Michael Bolin
f9165c43e8 Add argument-comment Dylint runner 2026-03-13 17:49:10 -07:00
Michael Bolin
e7d6b1a3ca merge commit for archive created by Sapling 2026-03-13 17:22:00 -07:00
Michael Bolin
47cb09b7c0 refactor: route zsh-fork through unified exec 2026-03-13 17:21:27 -07:00
Michael Bolin
b859a98e0f refactor: make unified-exec zsh-fork state explicit (#14633)
## Why

The unified-exec path was carrying zsh-fork state in a partially
flattened way.

First, the decision about whether zsh-fork was active came from feature
selection in `ToolsConfig`, while the real prerequisites lived in
session state. That left the handler and runtime defending against
partially configured cases later.

Second, once zsh-fork was active, its two runtime-only paths were
threaded through the runtime as separate arguments even though they form
one coherent piece of configuration.

This change keeps unified-exec on a single session-derived source of
truth and bundles the zsh-fork-specific paths into a named config type
so the runtime can pass them around as one unit.

In particular, this PR introduces this enum so the `ZshFork` variant can
carry the appropriate state with it:

```rust
#[derive(Debug, Clone, Eq, PartialEq)]
pub enum UnifiedExecShellMode {
    Direct,
    ZshFork(ZshForkConfig),
}

#[derive(Debug, Clone, Eq, PartialEq)]
pub struct ZshForkConfig {
    pub(crate) shell_zsh_path: AbsolutePathBuf,
    pub(crate) main_execve_wrapper_exe: AbsolutePathBuf,
}
```

This cleanup was done in preparation for
https://github.com/openai/codex/pull/13432.

## What Changed

- Replaced the feature-only `UnifiedExecBackendConfig` split with
`UnifiedExecShellMode` in `codex-rs/core/src/tools/spec.rs`.
- Derived the unified-exec mode from session-backed inputs when building
turn `ToolsConfig`, and preserved that mode across model switches and
review turns.
- Introduced `ZshForkConfig`, which stores the resolved zsh-fork
`AbsolutePathBuf` values for the configured `zsh` binary and `execve`
wrapper.
- Threaded `ZshForkConfig` through unified-exec command construction and
the zsh-fork preparation path so zsh-fork-specific runtime code consumes
a single config object instead of separate path arguments.
- Added focused tests for constructing zsh-fork mode only when session
prerequisites are available, and updated the zsh-fork expectations to be
target-platform aware.

## Testing

- `cargo test -p codex-core zsh_fork --lib`


---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/14633).
* #13432
* __->__ #14633
2026-03-13 17:20:01 -07:00
Michael Bolin
a345f4ce8c merge commit for archive created by Sapling 2026-03-13 16:33:45 -07:00
Michael Bolin
b9fb6ffd01 refactor: route zsh-fork through unified exec 2026-03-13 16:33:39 -07:00
Michael Bolin
3242cb3b58 merge commit for archive created by Sapling 2026-03-13 16:30:36 -07:00
Michael Bolin
4f10a55ec4 refactor: route zsh-fork through unified exec 2026-03-13 16:27:59 -07:00
Michael Bolin
bfc403a9a5 refactor: model unified-exec shell mode explicitly 2026-03-13 16:27:15 -07:00