Commit Graph

11364 Commits

Author SHA1 Message Date
Eric Traut
38e648ca67 Fix tui_app_server ghost subagent entries in /agent (#16110)
Fixes #16092

The app-server-backed TUI could accumulate ghost subagent entries in
`/agent` after resume/backfill flows. Some of those rows were no longer
live according to the backend, but still appeared selectable in the
picker and could open as blank threads.

*Cause*
Unlike the legacy tui behavior, tui_app_server was creating local
picker/replay state for subagents discovered through metadata refresh
and loaded-thread backfill, even when no real local session or
transcript had been attached. That let stale ids survive in the picker
as if they were replayable threads.

*Fix*
Stop creating empty local thread channels during subagent metadata
hydration and loaded-thread backfill.
When opening /agent, prune metadata-only entries that thread/read
reports as terminally unavailable.
When selecting a discovered subagent that is still live but not yet
locally attached, materialize a real local session on demand from
thread/read instead of falling back to an empty replay state.
2026-03-29 12:19:34 -06:00
Eric Traut
54d3ad1ede Fix app-server TUI MCP startup warnings regression (#16041)
This addresses #16038

The default `tui_app_server` path stopped surfacing MCP startup failures
during cold start, even though the legacy TUI still showed warnings like
`MCP startup incomplete (...)`. The app-server bridge emitted per-server
startup status notifications, but `tui_app_server` ignored them, so
failed MCP handshakes could look like a clean startup.

This change teaches `tui_app_server` to consume MCP startup status
notifications, preserve the immediate per-server failure warning, and
synthesize the same aggregate startup warning the legacy TUI shows once
startup settles.
2026-03-29 11:57:00 -06:00
Michael Bolin
1acdbc1a59 merge commit for archive created by Sapling 2026-03-29 07:52:06 -07:00
Michael Bolin
81eb51f6fd codex-tools: extract utility tool specs 2026-03-29 07:52:00 -07:00
Michael Bolin
24cd3076ad merge commit for archive created by Sapling 2026-03-28 21:00:25 -07:00
Michael Bolin
9eb22f69cf codex-tools: extract utility tool specs 2026-03-28 21:00:03 -07:00
Michael Bolin
7880414a27 codex-tools: extract collaboration tool specs (#16141)
## Why

The recent `codex-tools` migration steps have moved shared tool models
and low-coupling spec helpers out of `codex-core`, but
`core/src/tools/spec.rs` still owned a large block of pure
collaboration-tool spec construction. Those builders do not need session
state or runtime behavior; they only need a small amount of core-owned
configuration injected at the seam.

Moving that cohesive slice into `codex-tools` makes the crate boundary
more honest and removes a substantial amount of passive tool-spec logic
from `codex-core` without trying to move the runtime-coupled multi-agent
handlers at the same time.

## What changed

- added `agent_tool.rs`, `request_user_input_tool.rs`, and
`agent_job_tool.rs` to `codex-tools`, with sibling `*_tests.rs` coverage
and an exports-only `lib.rs`
- moved the pure `ToolSpec` builders for:
- collaboration tools such as `spawn_agent`, `send_input`,
`send_message`, `assign_task`, `resume_agent`, `wait_agent`,
`list_agents`, and `close_agent`
  - `request_user_input`
  - agent-job specs `spawn_agents_on_csv` and `report_agent_job_result`
- rewired `core/src/tools/spec.rs` to call the extracted builders while
still supplying the core-owned inputs, such as spawn-agent role
descriptions and wait timeout bounds
- updated the `core/src/tools/spec.rs` seam tests to build expected
collaboration specs through `codex-tools`
- updated `codex-rs/tools/README.md` so the crate documentation reflects
the broader collaboration-tool boundary

## Test plan

- `CARGO_TARGET_DIR=/tmp/codex-tools-collab-specs cargo test -p
codex-tools`
- `CARGO_TARGET_DIR=/tmp/codex-core-collab-specs cargo test -p
codex-core --lib tools::spec::`
- `just fix -p codex-tools -p codex-core`
- `just argument-comment-lint`

## References

- #15923
- #15928
- #15944
- #15953
- #16031
- #16047
- #16129
- #16132
- #16138
2026-03-28 20:39:47 -07:00
Matthew Zeng
3807807f91 [mcp] Increase MCP startup timeout. (#16080)
- [x] Increase MCP startup timeout to 30s, as the current 10s causes a
lot of local MCPs to timeout.
2026-03-28 19:58:00 -07:00
Michael Bolin
79c6f1c1ed Merge e922224c58 into sapling-pr-archive-bolinfest 2026-03-28 19:32:33 -07:00
Michael Bolin
e922224c58 ci: run Windows argument-comment-lint via native Bazel 2026-03-28 19:32:07 -07:00
Eric Traut
3bbc1ce003 Remove TUI voice transcription feature (#16114)
Removes the partially-completed TUI composer voice transcription flow,
including its feature flag, app events, and hold-to-talk state machine.
2026-03-29 00:20:25 +00:00
Michael Bolin
ccea4f697a merge commit for archive created by Sapling 2026-03-28 17:04:50 -07:00
Michael Bolin
09cc0984e6 codex-tools: extract collaboration tool specs 2026-03-28 17:04:07 -07:00
Michael Bolin
4e119a3b38 codex-tools: extract local host tool specs (#16138)
## Why

`core/src/tools/spec.rs` still bundled a set of pure local-host tool
builders with the orchestration that actually decides when those tools
are exposed and which handlers back them. That made `codex-core`
responsible for JSON/tool-shape construction that does not depend on
session state, and it kept the `codex-tools` migration from taking a
meaningfully larger bite out of `spec.rs`.

This PR moves that reusable spec-building layer into `codex-tools` while
leaving feature gating, handler registration, and runtime-coupled
descriptions in `codex-core`.

## What changed

- added `codex-rs/tools/src/local_tool.rs` for the pure builders for
`exec_command`, `write_stdin`, `shell`, `shell_command`, and
`request_permissions`
- added `codex-rs/tools/src/view_image.rs` for the `view_image` tool
spec and output schema so the extracted modules stay right-sized
- rewired `codex-rs/core/src/tools/spec.rs` to call those extracted
builders instead of constructing these specs inline
- kept the `request_permissions` description source in `codex-core`,
with `codex-tools` taking the description as input so the crate boundary
does not grow a dependency on handler/runtime code
- moved the direct constructor coverage for this slice from
`codex-rs/core/src/tools/spec_tests.rs` into
`codex-rs/tools/src/local_tool_tests.rs` and
`codex-rs/tools/src/view_image_tests.rs`
- updated `codex-rs/tools/README.md` to reflect that `codex-tools` now
owns this local-host spec layer

## Test plan

- `CARGO_TARGET_DIR=/tmp/codex-tools-local-host cargo test -p
codex-tools`
- `CARGO_TARGET_DIR=/tmp/codex-core-local-tools cargo test -p codex-core
--lib tools::spec::`
- `just argument-comment-lint`

## References

- #15923
- #15928
- #15944
- #15953
- #16031
- #16047
- #16129
- #16132
2026-03-28 16:33:58 -07:00
Michael Bolin
c8590d9f72 Merge a8719ac1d6 into sapling-pr-archive-bolinfest 2026-03-28 16:27:48 -07:00
Michael Bolin
a8719ac1d6 ci: tune just bazel helpers for remote iteration 2026-03-28 16:27:41 -07:00
Eric Traut
46b653e73c Fix skills picker scrolling in tui app server (#16109)
Fixes #16091.

The app-server TUI was truncating the filtered mention candidate list to
`MAX_POPUP_ROWS`, so the `$` skills picker only exposed the first 8
matches. That made it look like many skills were missing and prevented
keyboard navigation beyond the first page, even though direct
`$skill-name` insertion still worked.

Testing: I manually verified the regression and confirmed the fix.
2026-03-28 17:22:25 -06:00
Michael Bolin
4610be4eb7 merge commit for archive created by Sapling 2026-03-28 16:17:20 -07:00
Michael Bolin
828c61adf1 codex-tools: extract local host tool specs 2026-03-28 16:15:35 -07:00
Michael Bolin
22aed73f32 merge commit for archive created by Sapling 2026-03-28 16:06:06 -07:00
Michael Bolin
4282fc4d9a ci: tune just bazel helpers for remote iteration 2026-03-28 16:05:54 -07:00
Michael Bolin
f7ef9599ed exec: make review-policy tests hermetic (#16137)
## Why

`thread_start_params_from_config()` is supposed to forward the effective
`approvals_reviewer` into the app-server request, but these tests were
constructing that config through `ConfigBuilder::build()`, which also
loads ambient system and managed config layers. On machines with an
admin or host-level reviewer override, the manual-only case could
inherit `guardian_subagent` and fail even though the exec-side mapping
was correct.

## What changed

- Set `approvals_reviewer` explicitly via `harness_overrides` in the two
`thread_start_params_*review_policy*` tests in
`codex-rs/exec/src/lib.rs`.
- Removed the dependence on default config resolution and temp
`config.toml` writes so the tests exercise only the reviewer-to-request
mapping in `codex-exec`.

## Testing

- `cargo test -p codex-exec`
2026-03-28 23:01:04 +00:00
Michael Bolin
55a0e644f7 Merge 4a15695ea0 into sapling-pr-archive-bolinfest 2026-03-28 15:56:31 -07:00
Michael Bolin
4a15695ea0 permissions: start using PermissionProfile as the canonical runtime model 2026-03-28 15:56:27 -07:00
Michael Bolin
858dbd00ad merge commit for archive created by Sapling 2026-03-28 15:54:05 -07:00
Michael Bolin
3997146eaa ci: run Windows argument-comment-lint via native Bazel 2026-03-28 15:53:45 -07:00
Michael Bolin
2a85786231 merge commit for archive created by Sapling 2026-03-28 15:52:02 -07:00
Michael Bolin
6d747d97fc ci: align just bazel helpers with workflow behavior 2026-03-28 15:51:51 -07:00
Michael Bolin
3438ad2875 merge commit for archive created by Sapling 2026-03-28 15:50:19 -07:00
Michael Bolin
6ccd6f357b ci: run Windows argument-comment-lint via native Bazel 2026-03-28 15:50:14 -07:00
Michael Bolin
c4b3daccb6 Merge 12e0755902 into sapling-pr-archive-bolinfest 2026-03-28 15:49:55 -07:00
Michael Bolin
12e0755902 exec: make review-policy tests hermetic 2026-03-28 15:49:45 -07:00
Michael Bolin
58de9e613e merge commit for archive created by Sapling 2026-03-28 15:39:50 -07:00
Michael Bolin
1bb20d3658 ci: run Windows argument-comment-lint via native Bazel 2026-03-28 15:39:44 -07:00
Michael Bolin
a16a9109d7 ci: use BuildBuddy for rust-ci-full non-Windows argument-comment-lint (#16136)
## Why

PR #16130 fixed the Windows `argument-comment-lint` regression in
`rust-ci-full`, but the next `main` runs still left the Linux and macOS
lint legs timing out.

In [run
23695263729](https://github.com/openai/codex/actions/runs/23695263729),
both non-Windows `argument-comment-lint` jobs were cancelled almost
exactly 30 minutes after they started. The remaining workflow difference
versus `rust-ci.yml` was that `rust-ci-full` did not pass
`BUILDBUDDY_API_KEY` into the non-Windows Bazel lint step, so
`run-bazel-ci.sh` fell back to local Bazel configuration instead of
using the faster remote-backed path available on `main`.

## What changed

- passed `BUILDBUDDY_API_KEY` to the non-Windows `rust-ci-full`
`argument-comment-lint` Bazel step
- left the Windows packaged-wrapper path from #16130 unchanged
- kept the change scoped to `rust-ci-full.yml`

## Test plan

- loaded `.github/workflows/rust-ci-full.yml` and
`.github/workflows/rust-ci.yml` with `python3` + `yaml.safe_load(...)`
- inspected run `23695263729` and confirmed `Argument comment lint -
Linux` and `Argument comment lint - macOS` were cancelled about 30
minutes after start
- verified the updated `rust-ci-full` step now matches the non-Windows
secret wiring already present in `rust-ci.yml`

## References

- #16130
- #16106
2026-03-28 15:36:01 -07:00
Michael Bolin
b340e166a8 Merge b577927d2f into sapling-pr-archive-bolinfest 2026-03-28 15:35:23 -07:00
Michael Bolin
b577927d2f permissions: start using PermissionProfile as the canonical runtime model 2026-03-28 15:35:20 -07:00
Michael Bolin
47f080e045 Merge cd0ea98f7b into sapling-pr-archive-bolinfest 2026-03-28 15:34:33 -07:00
Michael Bolin
cd0ea98f7b ci: use BuildBuddy for rust-ci-full argument-comment-lint 2026-03-28 15:34:20 -07:00
Michael Bolin
2238c16a91 codex-tools: extract code mode tool spec adapters (#16132)
## Why

The longer-term `codex-tools` migration is to move pure tool-definition
and tool-spec plumbing out of `codex-core` while leaving session- and
runtime-coupled orchestration behind.

The remaining code-mode adapter layer in
`core/src/tools/code_mode_description.rs` was a good next extraction
seam because it only transformed `ToolSpec` values for code mode and
already delegated the low-level description rendering to
`codex-code-mode`.

## What Changed

- added `codex-rs/tools/src/code_mode.rs` with
`augment_tool_spec_for_code_mode()` and
`tool_spec_to_code_mode_tool_definition()`
- added focused unit coverage in `codex-rs/tools/src/code_mode_tests.rs`
- rewired `core/src/tools/spec.rs` and `core/src/tools/code_mode/mod.rs`
to use the extracted adapters from `codex-tools`
- removed the old `core/src/tools/code_mode_description.rs` shim and its
test file from `codex-core`
- added the `codex-code-mode` dependency to `codex-tools`, updated
`Cargo.lock`, and refreshed the `codex-tools` README to reflect the
expanded boundary

## Test Plan

- `cargo test -p codex-tools`
- `CARGO_TARGET_DIR=/tmp/codex-core-code-mode-adapters cargo test -p
codex-core --lib tools::spec::`
- `CARGO_TARGET_DIR=/tmp/codex-core-code-mode-adapters cargo test -p
codex-core --lib tools::code_mode::`
- `just bazel-lock-update`
- `just bazel-lock-check`
- `just argument-comment-lint`

## References

- #15923
- #15928
- #15944
- #15953
- #16031
- #16047
- #16129
2026-03-28 15:32:35 -07:00
Michael Bolin
9405ea4f46 merge commit for archive created by Sapling 2026-03-28 15:28:49 -07:00
Michael Bolin
b803333093 ci: run Windows argument-comment-lint via native Bazel 2026-03-28 15:28:38 -07:00
Michael Bolin
684adf7723 Merge 166cd5fb44 into sapling-pr-archive-bolinfest 2026-03-28 15:17:35 -07:00
Michael Bolin
166cd5fb44 ci: run Windows argument-comment-lint via native Bazel 2026-03-28 15:17:17 -07:00
Michael Bolin
c4ad836343 Merge 5323bbab8a into sapling-pr-archive-bolinfest 2026-03-28 15:14:39 -07:00
Michael Bolin
5323bbab8a ci: align just bazel helpers with workflow behavior 2026-03-28 15:14:31 -07:00
Michael Bolin
06ec95588c Merge 24dfe15aca into sapling-pr-archive-bolinfest 2026-03-28 15:12:06 -07:00
Michael Bolin
a56d6f8db9 merge commit for archive created by Sapling 2026-03-28 15:11:43 -07:00
Michael Bolin
7217a9c71f Merge f727c17712 into sapling-pr-archive-bolinfest 2026-03-28 15:11:17 -07:00
Michael Bolin
f727c17712 ci: align just bazel test helpers with Bazel workflow behavior 2026-03-28 15:11:09 -07:00