Commit Graph

10377 Commits

Author SHA1 Message Date
Michael Bolin
2f8f47d1d6 merge commit for archive created by Sapling 2026-03-27 16:16:12 -07:00
Michael Bolin
983cfac0ac fix: stabilize SDK CI codex setup 2026-03-27 16:16:03 -07:00
Michael Bolin
a2cbf3ca9c merge commit for archive created by Sapling 2026-03-27 16:14:41 -07:00
Michael Bolin
a4fa041e7f chore: enforce argument-comment lint across all targets 2026-03-27 16:14:21 -07:00
Michael Bolin
d3d62c9949 merge commit for archive created by Sapling 2026-03-27 16:12:35 -07:00
Michael Bolin
663b70848c fix: stabilize SDK CI codex setup 2026-03-27 16:12:14 -07:00
Michael Bolin
57be029551 Merge 475d54fdd1 into sapling-pr-archive-bolinfest 2026-03-27 16:09:09 -07:00
Michael Bolin
475d54fdd1 fix: stabilize SDK CI codex setup 2026-03-27 16:09:01 -07:00
Michael Bolin
b98ab1d3e4 merge commit for archive created by Sapling 2026-03-27 16:07:46 -07:00
Michael Bolin
f0b75c2560 wip: experiment with windows bazel v8 build 2026-03-27 16:07:31 -07:00
Michael Bolin
80d10cb8e0 merge commit for archive created by Sapling 2026-03-27 16:02:57 -07:00
Michael Bolin
895404b2fb wip: experiment with windows bazel v8 build 2026-03-27 16:02:45 -07:00
Drew Hintz
f4f6eca871 [codex] Pin GitHub Actions workflow references (#15828)
Pin floating external GitHub Actions workflow refs to immutable SHAs.

Why are we doing this? Please see the rationale doc:
https://docs.google.com/document/d/1qOURCNx2zszQ0uWx7Fj5ERu4jpiYjxLVWBWgKa2wTsA/edit?tab=t.0

Did this break you? Please roll back and let hintz@ know
2026-03-27 23:00:05 +00:00
Michael Bolin
d6eb030adf Merge 576ee3cb8b into sapling-pr-archive-bolinfest 2026-03-27 15:57:34 -07:00
Michael Bolin
576ee3cb8b fix: stabilize SDK CI codex setup 2026-03-27 15:57:30 -07:00
Eric Traut
d65deec617 Remove the legacy TUI split (#15922)
This is the part 1 of 2 PRs that will delete the `tui` /
`tui_app_server` split. This part simply deletes the existing `tui`
directory and marks the `tui_app_server` feature flag as removed. I left
the `tui_app_server` feature flag in place for now so its presence
doesn't result in an error. It is simply ignored.

Part 2 will rename the `tui_app_server` directory `tui`. I did this as
two parts to reduce visible code churn.
2026-03-27 22:56:44 +00:00
Michael Bolin
13c039cff4 Merge 71a5905914 into sapling-pr-archive-bolinfest 2026-03-27 15:49:18 -07:00
Michael Bolin
71a5905914 wip: experiment with windows bazel v8 build 2026-03-27 15:49:10 -07:00
Michael Bolin
b9da88bc5b merge commit for archive created by Sapling 2026-03-27 15:48:57 -07:00
Michael Bolin
aaffe47501 wip: experiment with windows bazel v8 build 2026-03-27 15:48:43 -07:00
Michael Bolin
3da9d1d3a1 merge commit for archive created by Sapling 2026-03-27 15:46:56 -07:00
Michael Bolin
55fdf0a3b5 fix: stabilize SDK CI codex setup 2026-03-27 15:46:49 -07:00
iceweasel-oai
307e427a9b don't include redundant write roots in apply_patch (#16030)
apply_patch sometimes provides additional parent dir as a writable root
when it is already writable. This is mostly a no-op on Mac/Linux but
causes actual ACL churn on Windows that is best avoided. We are also
seeing some actual failures with these ACLs in the wild, which I haven't
fully tracked down, but it's safe/best to avoid doing it altogether.
2026-03-27 15:41:51 -07:00
Michael Bolin
0d2f67d4c6 merge commit for archive created by Sapling 2026-03-27 15:41:21 -07:00
Michael Bolin
e7c455cb34 fix: stabilize SDK CI codex setup 2026-03-27 15:41:09 -07:00
Michael Bolin
1e6cf2940b merge commit for archive created by Sapling 2026-03-27 15:36:11 -07:00
Michael Bolin
e800aa2d84 fix: stabilize SDK CI codex setup 2026-03-27 15:36:01 -07:00
Michael Bolin
df1d6f3928 Merge 8370066556 into sapling-pr-archive-bolinfest 2026-03-27 15:31:37 -07:00
Michael Bolin
8370066556 fix: stabilize SDK CI codex setup 2026-03-27 15:31:09 -07:00
Matthew Zeng
5b71e5104f [mcp] Bypass read-only tool checks. (#16044)
- [x] Auto / unspecified approval mode: read-only tools now skip before
guardian routing.
- [x] Approve / always-allow mode: read-only tools still skip, now via
the shared early return.
- [x] Prompt mode: read-only tools no longer skip; they continue to
approval.
2026-03-27 15:22:04 -07:00
Eric Traut
465897dd0f Fix /copy regression in tui_app_server turn completion (#16021)
Addresses #16019

`tui_app_server` renders completed assistant messages from item
notifications, but it only updated `/copy` state from `turn/completed`.
After the app-server migration, turn completion no longer repeats the
final assistant text, so `/copy` could stay unavailable even after the
first normal response.

This PR track the last completed final-answer agent message during an
active app-server turn and promote it into the `/copy` cache when the
turn completes. This restores the pre-migration behavior without
changing rollback handling.
2026-03-27 16:00:24 -06:00
Michael Bolin
9f8475683b Merge d06ae316d6 into sapling-pr-archive-bolinfest 2026-03-27 14:55:28 -07:00
Michael Bolin
d06ae316d6 codex-tools: extract tool spec models 2026-03-27 14:47:30 -07:00
Michael Bolin
19fc3dacf1 Merge 4172ee10c7 into sapling-pr-archive-bolinfest 2026-03-27 14:34:35 -07:00
Michael Bolin
4172ee10c7 fix: stabilize SDK CI codex setup 2026-03-27 14:34:29 -07:00
Eric Traut
c5778dfca2 Fix tui_app_server hook notification rendering and replay (#16013)
Addresses #15984

HookStarted/HookCompleted notifications were being translated through a
fragile JSON bridge, so hook status/output never reached the renderer.
Early hook notifications could also be dropped during session refresh
before replay.

This PR fixes `tui_app_server` by mapping app-server hook notifications
into TUI hook events explicitly and preserving buffered hook
notifications across refresh, so cold-start and resumed sessions render
the same hook UI as the legacy TUI.
2026-03-27 15:33:51 -06:00
Michael Bolin
16d4ea9ca8 codex-tools: extract responses API tool models (#16031)
## Why

The previous extraction steps moved shared tool-schema parsing into
`codex-tools`, but `codex-core` still owned the generic Responses API
tool models and the last adapter layer that turned parsed tool
definitions into `ResponsesApiTool` values.

That left `core/src/tools/spec.rs` and `core/src/client_common.rs`
holding a chunk of tool-shaping code that does not need session state,
runtime plumbing, or any other `codex-core`-specific dependency. As a
result, `codex-tools` owned the parsed tool definition, but `codex-core`
still owned the generic wire model that those definitions are converted
into.

This change moves that boundary one step further. `codex-tools` now owns
the reusable Responses/tool wire structs and the shared conversion
helpers for dynamic tools, MCP tools, and deferred MCP aliases.
`codex-core` continues to own `ToolSpec` orchestration and the remaining
web-search-specific request shapes.

## What changed

- added `tools/src/responses_api.rs` to own `ResponsesApiTool`,
`FreeformTool`, `ToolSearchOutputTool`, namespace output types, and the
shared `ToolDefinition -> ResponsesApiTool` adapter helpers
- added `tools/src/responses_api_tests.rs` for deferred-loading
behavior, adapter coverage, and namespace serialization coverage
- rewired `core/src/tools/spec.rs` to use the extracted dynamic/MCP
adapter helpers instead of defining those conversions locally
- rewired `core/src/tools/handlers/tool_search.rs` to use the extracted
deferred MCP adapter and namespace output types directly
- slimmed `core/src/client_common.rs` so it now keeps `ToolSpec` and the
web-search-specific wire types, while reusing the extracted tool models
from `codex-tools`
- moved the extracted seam tests out of `core` and updated
`codex-rs/tools/README.md` plus `tools/src/lib.rs` to reflect the
expanded `codex-tools` boundary

## Test plan

- `cargo test -p codex-tools`
- `cargo test -p codex-core --lib tools::spec::`
- `cargo test -p codex-core --lib tools::handlers::tool_search::`
- `just fix -p codex-tools -p codex-core`
- `just argument-comment-lint`

## References

- [#15923](https://github.com/openai/codex/pull/15923) `codex-tools:
extract shared tool schema parsing`
- [#15928](https://github.com/openai/codex/pull/15928) `codex-tools:
extract MCP schema adapters`
- [#15944](https://github.com/openai/codex/pull/15944) `codex-tools:
extract dynamic tool adapters`
- [#15953](https://github.com/openai/codex/pull/15953) `codex-tools:
introduce named tool definitions`
2026-03-27 14:26:54 -07:00
bwanner-oai
82e8031338 Add usage-based business plan types (#15934)
## Summary
- add `self_serve_business_usage_based` and `enterprise_cbp_usage_based`
to the public/internal plan enums and regenerate the app-server + Python
SDK artifacts
- map both plans through JWT login and backend rate-limit payloads, then
bucket them with the existing Team/Business entitlement behavior in
cloud requirements, usage-limit copy, tooltips, and status display
- keep the earlier display-label remap commit on this branch so the new
Team-like and Business-like plans render consistently in the UI

## Testing
- `just write-app-server-schema`
- `uv run --project sdk/python python
sdk/python/scripts/update_sdk_artifacts.py generate-types`
- `just fix -p codex-protocol -p codex-login -p codex-core -p
codex-backend-client -p codex-cloud-requirements -p codex-tui -p
codex-tui-app-server -p codex-backend-openapi-models`
- `just fmt`
- `just argument-comment-lint`
- `cargo test -p codex-protocol
usage_based_plan_types_use_expected_wire_names`
- `cargo test -p codex-login usage_based`
- `cargo test -p codex-backend-client usage_based`
- `cargo test -p codex-cloud-requirements usage_based`
- `cargo test -p codex-core usage_limit_reached_error_formats_`
- `cargo test -p codex-tui plan_type_display_name_remaps_display_labels`
- `cargo test -p codex-tui remapped`
- `cargo test -p codex-tui-app-server
plan_type_display_name_remaps_display_labels`
- `cargo test -p codex-tui-app-server remapped`
- `cargo test -p codex-tui-app-server
preserves_usage_based_plan_type_wire_name`

## Notes
- a broader multi-crate `cargo test` run still hits unrelated existing
guardian-approval config failures in
`codex-rs/core/src/config/config_tests.rs`
2026-03-27 14:25:13 -07:00
xl-openai
81abb44f68 plugins: Clean up stale curated plugin sync temp dirs and add sync metrics (#16035)
1. Keep curated plugin staging directories under TempDir ownership until
activation succeeds, so failed git/HTTP sync attempts do not leak
plugins-clone-*.
2. Best-effort clean up stale plugins-clone-* directories before
creating a new staged repo, using a conservative age threshold.
3. Emit OTEL counters for curated plugin startup sync transport attempts
and final outcome across git and HTTP paths.
2026-03-27 14:21:18 -07:00
pakrym-oai
8002594ee3 Normalize /mcp tool grouping for hyphenated server names (#15946)
Fix display for servers with special characters.
2026-03-27 14:58:29 -06:00
Michael Bolin
95845cf6ce fix: disable plugins in SDK integration tests (#16036)
## Why

The TypeScript SDK tests create a fresh `CODEX_HOME` for each Jest case
and delete it during teardown. That cleanup has been flaking because the
real `codex` binary can still be doing background curated-plugin startup
sync under `.tmp/plugins-clone-*`, which races the test harness's
recursive delete and leaves `ENOTEMPTY` failures behind.

This path is unrelated to what the SDK tests are exercising, so letting
plugin startup run during these tests only adds nondeterministic
filesystem activity. This showed up recently in the `sdk` CI lane for
[#16031](https://github.com/openai/codex/pull/16031).

## What Changed

- updated `sdk/typescript/tests/testCodex.ts` to merge test config
through a single helper
- disabled `features.plugins` unconditionally for SDK integration tests
so the CLI does not start curated-plugin sync in the temporary
`CODEX_HOME`
- preserved other explicit feature overrides from individual tests while
forcing `plugins` back to `false`
- kept the existing mock-provider override behavior intact for
SSE-backed tests

## Verification

- `pnpm test --runInBand`
- `pnpm lint`
2026-03-27 13:04:34 -07:00
Michael Bolin
588d412589 merge commit for archive created by Sapling 2026-03-27 12:57:12 -07:00
Michael Bolin
f783181a1a fix: disable plugins in SDK integration tests 2026-03-27 12:57:00 -07:00
Michael Bolin
dfd7419b7d Merge 717f401772 into sapling-pr-archive-bolinfest 2026-03-27 12:48:56 -07:00
Michael Bolin
717f401772 fix: disable plugins in SDK integration tests 2026-03-27 12:48:43 -07:00
Michael Bolin
7e50531cf5 merge commit for archive created by Sapling 2026-03-27 12:43:42 -07:00
Michael Bolin
737ab29b1e codex-tools: extract responses API tool models 2026-03-27 12:43:30 -07:00
Michael Bolin
4f6b0fcec4 Merge e9de2c12db into sapling-pr-archive-bolinfest 2026-03-27 12:28:45 -07:00
Michael Bolin
e9de2c12db codex-tools: extract responses API tool models 2026-03-27 12:27:50 -07:00
Michael Bolin
d48bd2df2f merge commit for archive created by Sapling 2026-03-27 12:13:41 -07:00