Commit Graph
9048 Commits
Author SHA1 Message Date
Michael Bolin 7a6e39ff52 merge commit for archive created by Sapling 2026-02-23 08:32:48 -08:00
Michael Bolin 34186c37f6 feat: implement zsh shell tool via shell-escalation 2026-02-23 08:31:57 -08:00
Michael Bolin 0cf7134888 merge commit for archive created by Sapling 2026-02-23 08:30:25 -08:00
Michael Bolin 54dcb8ca56 feat: split core business logic from exec-server to shell-escalation 2026-02-23 08:16:11 -08:00
Michael Bolin 6b19abfecb Use Arc-based ToolCtx in tool runtimes 2026-02-23 08:16:11 -08:00
Michael Bolin 7ea0985a24 feat: implement zsh shell tool via shell-escalation 2026-02-23 08:16:11 -08:00
Michael Bolin 260247d53d Merge 67f3a7b649 into sapling-pr-archive-bolinfest 2026-02-23 08:13:46 -08:00
Michael Bolin 67f3a7b649 feat: implement zsh shell tool via shell-escalation 2026-02-23 08:13:35 -08:00
Michael Bolin b45b678915 Use Arc-based ToolCtx in tool runtimes 2026-02-23 08:13:35 -08:00
Michael Bolin 7ce4c0b1a2 feat: split core business logic from exec-server to shell-escalation 2026-02-23 08:13:35 -08:00
jif-oai 3b6c50d925 chore: better bazel test logs (#12576)
## Summary

Improve Bazel CI failure diagnostics by printing the tail of each failed
target’s test.log directly in the GitHub Actions output.

Today, when a large Bazel test target fails (for example tests of
`codex-core`), the workflow often only shows a target-level Exit 101
plus a path to Bazel’s test.log. That makes it hard to see the actual
failing Rust test and panic without digging into artifacts or
reproducing locally.

This change makes the workflow automatically surface that information
inline.

  ## What Changed

In .github/workflows/bazel.yml:

  - Capture Bazel console output via tee
  - Preserve the Bazel exit code when piping (PIPESTATUS[0])
  - On failure:
      - Parse failed Bazel test targets from FAIL: //... lines
      - Resolve Bazel test log directory via bazel info bazel-testlogs
      - Print tail -n 200 for each failed target’s test.log
      - Group each target’s output in GitHub Actions logs (::group::)

## Bonus
Disable `experimental_remote_repo_contents_cache` to prevent "Permission
Denied"
2026-02-23 08:13:29 -08:00
jif-oai eace7c6610 feat: land sqlite (#12141) 2026-02-23 16:12:23 +00:00
Michael Bolin 5a9e741696 merge commit for archive created by Sapling 2026-02-23 08:11:32 -08:00
Michael Bolin 7980a8f767 feat: implement zsh shell tool via shell-escalation 2026-02-23 08:10:38 -08:00
Michael Bolin b27bc46ee9 Use Arc-based ToolCtx in tool runtimes 2026-02-23 08:10:38 -08:00
Michael Bolin d11b22c00d feat: split core business logic from exec-server to shell-escalation 2026-02-23 08:10:38 -08:00
jif-oai 2119532a81 feat: role metrics multi-agent (#12579)
add metrics for agent role
2026-02-23 15:55:48 +00:00
Eric Traut 862a5b3eb3 Allow exec resume to parse output-last-message flag after command (#12541)
Summary
- mark `output-last-message` as a global exec flag so it can follow
subcommands like `resume`
- add regression tests in both `cli` and `exec` crates verifying the
flag order works when invoking `resume`

Fixes #12538
2026-02-23 07:55:37 -08:00
jif-oai e8709bc11a chore: rename memory feature flag (#12580)
`memory_tool` -> `memories`
2026-02-23 15:37:12 +00:00
jif-oai 764ac9449f feat: add uuid helper (#12500) 2026-02-23 14:14:36 +00:00
jif-oai cf0210bf22 feat: agent nick names to model (#12575) 2026-02-23 13:44:37 +00:00
jif-oai 829d1080f6 feat: keep dead agents in the agent picker (#12570) 2026-02-23 12:58:55 +00:00
jif-oai 9d826a20c6 fix: TUI constraint (#12571) 2026-02-23 12:49:54 +00:00
jif-oai 6fbf19ef5f chore: phase 2 name (#12568) 2026-02-23 11:04:55 +00:00
jif-oai 2b9d0c385f chore: add doc to memories (#12565)
]
2026-02-23 10:52:58 +00:00
jif-oai cfcbff4c48 chore: awaiter (#12562) 2026-02-23 10:28:24 +00:00
jif-oai 8e9312958d chore: nit name (#12559) 2026-02-23 08:49:41 +00:00
Michael Bolin 956f2f439e refactor: decouple MCP policy construction from escalate server (#12555)
## Why
The current escalate path in `codex-rs/exec-server` still had policy
creation coupled to MCP details, which makes it hard to reuse the shell
execution flow outside the MCP server. This change is part of a broader
goal to split MCP-specific behavior from shared escalation execution so
other handlers (for example a future `ShellCommandHandler`) can reuse it
without depending on MCP request context types.

## What changed
- Added a new `EscalationPolicyFactory` abstraction in `mcp.rs`:
  - `crate`-relative path: `codex-rs/exec-server/src/posix/mcp.rs`
-
https://github.com/openai/codex/blob/main/codex-rs/exec-server/src/posix/mcp.rs#L87-L107
- Made `run_escalate_server` in `mcp.rs` accept a policy factory instead
of constructing `McpEscalationPolicy` directly.
-
https://github.com/openai/codex/blob/main/codex-rs/exec-server/src/posix/mcp.rs#L178-L201
- Introduced `McpEscalationPolicyFactory` that stores MCP-only state
(`RequestContext`, `preserve_program_paths`) and implements the new
trait.
-
https://github.com/openai/codex/blob/main/codex-rs/exec-server/src/posix/mcp.rs#L100-L117
- Updated `shell()` to pass a `McpEscalationPolicyFactory` instance into
`run_escalate_server`, so the server remains the MCP-specific wiring
layer.
-
https://github.com/openai/codex/blob/main/codex-rs/exec-server/src/posix/mcp.rs#L163-L170

## Verification
- Build and test execution was not re-run in this pass; changes are
limited to `mcp.rs` and preserve the existing escalation flow semantics
by only extracting policy construction behind a factory.




---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/12555).
* #12556
* __->__ #12555
2026-02-23 00:31:29 -08:00
Michael Bolin 6c651f33f6 merge commit for archive created by Sapling 2026-02-23 00:26:00 -08:00
Michael Bolin c3df4f8b48 feat: split core business logic from exec-server to shell-escalation 2026-02-23 00:25:53 -08:00
Michael Bolin de87bc8a42 merge commit for archive created by Sapling 2026-02-23 00:25:44 -08:00
Michael Bolin 056ddb789b feat: split core business logic from exec-server to shell-escalation 2026-02-23 00:06:00 -08:00
Michael Bolin 2b9d728e90 merge commit for archive created by Sapling 2026-02-22 23:48:41 -08:00
Michael Bolin 7cbc2e024a feat: split core business logic from exec-server to shell-escalation 2026-02-22 23:48:36 -08:00
Michael Bolin ab26c80df3 merge commit for archive created by Sapling 2026-02-22 23:40:02 -08:00
Michael Bolin a8b8c82787 feat: split core business logic from exec-server to shell-escalation 2026-02-22 23:39:49 -08:00
Michael Bolin ef0dbe3a48 Merge 50b74d84eb into sapling-pr-archive-bolinfest 2026-02-22 23:17:51 -08:00
Michael Bolin 50b74d84eb feat: refactor logic in exec-server for general use 2026-02-22 23:17:37 -08:00
pakrym-oai 335a4e1cbc Return image content from view_image (#12553)
Responses API supports image content
2026-02-22 23:00:08 -08:00
Michael Bolin d1e6aba028 merge commit for archive created by Sapling 2026-02-22 20:01:11 -08:00
Michael Bolin 4cfc116d7f refactor: unify zsh fork shell tool with fd-based bridge 2026-02-22 20:01:03 -08:00
Michael Bolin e8949f4507 test: vendor zsh fork via DotSlash and stabilize zsh-fork tests (#12518)
## Why

The zsh integration tests were still brittle in two ways:

- they relied on `CODEX_TEST_ZSH_PATH` / environment-specific setup, so
they often did not exercise the patched zsh fork that `shell-tool-mcp`
ships
- once the tests consistently used the vendored zsh fork, they exposed
real Linux-specific zsh-fork issues in CI

In particular, the Linux failures were not just test noise:

- the zsh-fork launch path was dropping `ExecRequest.arg0`, so Linux
`codex-linux-sandbox` arg0 dispatch did not run and zsh wrapper-mode
could receive malformed arguments
- the
`turn_start_shell_zsh_fork_subcommand_decline_marks_parent_declined_v2`
test uses the zsh exec bridge (which talks to the parent over a Unix
socket), but Linux restricted sandbox seccomp denies `connect(2)`,
causing timeouts on `ubuntu-24.04` x86/arm

This PR makes the zsh tests consistently run against the intended
vendored zsh fork and fixes/hardens the zsh-fork path so the Linux CI
signal is meaningful.

## What Changed

- Added a single shared test-only DotSlash file for the patched zsh fork
at `codex-rs/exec-server/tests/suite/zsh` (analogous to the existing
`bash` test resource).
- Updated both app-server and exec-server zsh tests to use that shared
DotSlash zsh (no duplicate zsh DotSlash file, no `CODEX_TEST_ZSH_PATH`
dependency).
- Updated the app-server zsh-fork test helper to resolve the shared
DotSlash zsh and avoid silently falling back to host zsh.
- Kept the app-server zsh-fork tests configured via `config.toml`, using
a test wrapper path where needed to force `zsh -df` (and rewrite `-lc`
to `-c`) for the subcommand-decline test.
- Hardened the app-server subcommand-decline zsh-fork test for CI
variability:
  - tolerate an extra `/responses` POST with a no-op mock response
- tolerate non-target approval ordering while remaining strict on the
two `/usr/bin/true` approvals and decline behavior
- use `DangerFullAccess` on Linux for this one test because it validates
zsh approval flow, not Linux sandbox socket restrictions
- Fixed zsh-fork process launching on Linux by preserving `req.arg0` in
`ZshExecBridge::execute_shell_request(...)` so `codex-linux-sandbox`
arg0 dispatch continues to work.
- Moved `maybe_run_zsh_exec_wrapper_mode()` under
`arg0_dispatch_or_else(...)` in `app-server` and `cli` so wrapper-mode
handling coexists correctly with arg0-dispatched helper modes.
- Consolidated duplicated `dotslash -- fetch` resolution logic into
shared test support (`core/tests/common/lib.rs`).
- Updated `codex-rs/exec-server/tests/suite/accept_elicitation.rs` to
use DotSlash zsh and hardened the zsh elicitation test for Bazel/zsh
differences by:
  - resolving an absolute `git` path
  - running `git init --quiet .`
- asserting success / `.git` creation instead of relying on banner text

## Verification

- `cargo test -p codex-app-server turn_start_zsh_fork -- --nocapture`
- `cargo test -p codex-exec-server accept_elicitation -- --nocapture`
- `bazel test //codex-rs/exec-server:exec-server-all-test
--test_output=streamed --test_arg=--nocapture
--test_arg=accept_elicitation_for_prompt_rule_with_zsh`
- CI (`rust-ci`) on the final cleaned commit: `Tests — ubuntu-24.04 -
x86_64-unknown-linux-gnu` and `Tests — ubuntu-24.04-arm -
aarch64-unknown-linux-gnu` passed in [run
22291424358](https://github.com/openai/codex/actions/runs/22291424358)
2026-02-22 19:39:56 -08:00
Michael Bolin af4695422f merge commit for archive created by Sapling 2026-02-22 19:03:47 -08:00
Michael Bolin d158fc8e5a feat: use DotSlash to fetch zsh fork for tests 2026-02-22 19:03:36 -08:00
Michael Bolin 398556bf1a Merge c8e94229e6 into sapling-pr-archive-bolinfest 2026-02-22 18:49:37 -08:00
Michael Bolin c8e94229e6 feat: use DotSlash to fetch zsh fork for tests 2026-02-22 18:49:30 -08:00
Michael Bolin 5d7feebe6d Merge 1659e2b563 into sapling-pr-archive-bolinfest 2026-02-22 18:36:34 -08:00
Michael Bolin 1659e2b563 feat: use DotSlash to fetch zsh fork for tests 2026-02-22 18:36:28 -08:00
Michael Bolin ee998ba202 merge commit for archive created by Sapling 2026-02-22 18:25:17 -08:00
Michael Bolin 6eca037ca6 feat: use DotSlash to fetch zsh fork for tests 2026-02-22 18:25:06 -08:00