Commit Graph
2714 Commits
Author SHA1 Message Date
Eric Traut df296d0f9d codex: remove unrelated guardian test change 2026-04-12 14:00:22 -07:00
Eric Traut 7a08d53b2d codex: address PR review feedback (#17380) 2026-04-12 14:00:06 -07:00
Eric Traut c3582c8d9d Simplify injected message envelopes 2026-04-12 14:00:06 -07:00
Eric Traut d0fa8a1292 Document cross-instance timer delivery claims 2026-04-12 14:00:06 -07:00
Eric Traut 056135fa05 codex: fix CI failure on PR #17380 2026-04-12 14:00:06 -07:00
Eric Traut c2b92ccf40 Harden timer integration test waits 2026-04-12 14:00:05 -07:00
Eric Traut bb13e4a0d1 codex: enforce timer db cap in core (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 517cfb769e codex: use literal windows timer ignore reason (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 8211c56154 codex: stabilize queued mail pending input test (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 667d2a2d95 codex: keep timer runtime on delete failure (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut b6ab1b1e5f codex: avoid windows timer integration timeout (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut fc6dd9bb00 codex: stabilize timer integration tests (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 520e3b091e codex: stabilize resume timer history regression (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 6fe44104f3 codex: restore timers after resume history replay (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 108679a91f codex: respect ephemeral timer storage mode (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 548b035edc codex: stabilize queued message timer tests (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 4f33051313 codex: address recurring timer message starvation (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut dfb83d6a4c codex: address recurring timer restart review (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut 529b855d60 codex: fix overdue one-shot timer claim on restart (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut 9976a36c39 codex: stabilize queued message timer test (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut 70edc61fde codex: fix timer runtime clippy lint (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut b4f738def9 codex: stabilize queued message timer ordering (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut b19709c649 codex: preserve exhausted schedule restore state (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut 0d00ec0f8d codex: delete exhausted recurring timers (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut 08554a2378 codex: address queue and timer race feedback (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut 6e0ba130a7 codex: prevent idle timer message starvation (#17380) 2026-04-12 14:00:03 -07:00
Eric Traut 77a7287eeb codex: fix core timer test lint (#17380) 2026-04-12 14:00:03 -07:00
Eric Traut e03b0f8214 codex: address PR review feedback (#17380) 2026-04-12 14:00:03 -07:00
Eric Traut cbe466866c Split timer and queued message flags 2026-04-12 14:00:03 -07:00
Eric Traut 05e49afbcf Remove unrelated branch churn 2026-04-12 13:59:43 -07:00
Eric Traut b60311ab2a Remove queue message tool 2026-04-12 13:59:42 -07:00
Eric Traut 919e68003f Refine queued message delivery 2026-04-12 13:59:42 -07:00
Eric Traut 54f5a4b0fa Add thread message delivery 2026-04-12 13:59:42 -07:00
Francis Chalissery 720932ca3d [codex] Support flattened deferred MCP tool calls (#17556)
## Summary
- register flattened handler aliases for deferred MCP tools
- cover the node_repl-shaped deferred MCP call path in tool registry
tests

## Root Cause
Deferred MCP tools were registered only under their namespaced handler
key, e.g. `mcp__node_repl__:js`. If the model/bridge emitted the
flattened qualified name `mcp__node_repl__js`, core parsed it as an MCP
payload but dispatch looked up the flattened handler key and returned
`unsupported call` before reaching the MCP handler.

## Validation
- `just fmt`
- `cargo test -p codex-tools
search_tool_registers_deferred_mcp_flattened_handlers`
- `cargo test -p codex-core
search_tool_registers_namespaced_mcp_tool_aliases`
- `git diff --check`
2026-04-12 13:19:36 -07:00
Ahmed Ibrahim 4db60d5d8b Budget realtime current thread context (#17519)
Select Current Thread startup context by budget from newest turns, cap
each rendered turn at 300 approximate tokens, and add formatter plus
integration snapshot coverage.
2026-04-12 11:59:09 -07:00
Won Park 3895ddd6b1 Clarify guardian timeout guidance (#17521)
## Summary
- update the guardian timeout guidance to say permission approval review
timed out
- simplify the retry guidance to say retry once or ask the user for
guidance or explicit approval

## Testing
- cargo test -p codex-core
guardian_timeout_message_distinguishes_timeout_from_policy_denial
- cargo test -p codex-core
guardian_review_decision_maps_to_mcp_tool_decision
2026-04-12 02:03:53 -07:00
Won Park ba839c23f3 changing decision semantics after guardian timeout (#17486)
**Summary**

This PR treats Guardian timeouts as distinct from explicit denials in
the core approval paths.
Timeouts now return timeout-specific guidance instead of Guardian
policy-rejection messaging.
It updates the command, shell, network, and MCP approval flows and adds
focused test coverage.
2026-04-12 00:00:50 -07:00
sayan-oai 1325bcd3f6 chore: refactor name and namespace to single type (#17402)
avoid passing them both around, unify on a type. this now also keys
`ToolRegistry`.

tests pass
2026-04-11 23:06:22 +00:00
Ahmed Ibrahim 163ae7d3e6 fix (#17493)
# External (non-OpenAI) Pull Request Requirements

Before opening this Pull Request, please read the dedicated
"Contributing" markdown file or your PR may be closed:
https://github.com/openai/codex/blob/main/docs/contributing.md

If your PR conforms to our contribution guidelines, replace this text
with a detailed and high quality description of your changes.

Include a link to a bug report or enhancement request.
2026-04-11 13:52:17 -07:00
Adrian 39cc85310f Add use_agent_identity feature flag (#17385) 2026-04-11 09:52:06 -07:00
Eric Traut e9e7ef3d36 Fix thread/list cwd filtering for Windows verbatim paths (#17414)
Addresses #17302

Problem: `thread/list` compared cwd filters with raw path equality, so
`resume --last` could miss Windows sessions when the saved cwd used a
verbatim path form and the current cwd did not.

Solution: Normalize cwd comparisons through the existing path comparison
utilities before falling back to direct equality, and add Windows
regression coverage for verbatim paths. I made this a general utility
function and replaced all of the duplicated instance of it across the
code base.
2026-04-10 23:08:02 -07:00
Matthew Zeng b7139a7e8f [mcp] Support MCP Apps part 3 - Add mcp tool call support. (#17364)
- [x] Add a new app-server method so that MCP Apps can call their own
MCP server directly.
2026-04-11 04:39:19 +00:00
Won Park 37aac89a6d representing guardian review timeouts in protocol types (#17381)
## Summary

- Add `TimedOut` to Guardian/review carrier types:
  - `ReviewDecision::TimedOut`
  - `GuardianAssessmentStatus::TimedOut`
  - app-server v2 `GuardianApprovalReviewStatus::TimedOut`
- Regenerate app-server JSON/TypeScript schemas for the new wire shape.
- Wire the new status through core/app-server/TUI mappings with
conservative fail-closed handling.
- Keep `TimedOut` non-user-selectable in the approval UI.

**Does not change runtime behavior yet; emitting `TimeOut` and
parent-model timeout messaging will come in followup PRs**
2026-04-10 20:02:33 -07:00
xli-oai f9a8d1870f Add marketplace command (#17087)
Added a new top-level `codex marketplace add` command for installing
plugin marketplaces into Codex’s local marketplace cache.

This change adds source parsing for local directories, GitHub shorthand,
and git URLs, supports optional `--ref` and git-only `--sparse` checkout
paths, stages the source in a temp directory, validates the marketplace
manifest, and installs it under
`$CODEX_HOME/marketplaces/<marketplace-name>`

Included tests cover local install behavior in the CLI and marketplace
discovery from installed roots in core. Scoped formatting and fix passes
were run, and targeted CLI/core tests passed.
2026-04-10 19:18:37 -07:00
Owen Lin 58933237cd feat(analytics): add guardian review event schema (#17055)
Just the analytics schema definition for guardian evaluations. No wiring
done yet.
2026-04-10 17:33:58 -07:00
viyatb-oaiandCodex b114781495 fix(permissions): fix symlinked writable roots in sandbox permissions (#15981)
## Summary
- preserve logical symlink paths during permission normalization and
config cwd handling
- bind real targets for symlinked readable/writable roots in bwrap and
remap carveouts and unreadable roots there
- add regressions for symlinked carveouts and nested symlink escape
masking

## Root cause
Permission normalization canonicalized symlinked writable roots and cwd
to their real targets too early. That drifted policy checks away from
the logical paths the sandboxed process can actually address, while
bwrap still needed the real targets for mounts. The mismatch caused
shell and apply_patch failures on symlinked writable roots.

## Impact
Fixes #15781.

Also fixes #17079:
- #17079 is the protected symlinked carveout side: bwrap now binds the
real symlinked writable-root target and remaps carveouts before masking.

Related to #15157:
- #15157 is the broader permission-check side of this path-identity
problem. This PR addresses the shared logical-vs-canonical normalization
issue, but the reported Darwin prompt behavior should be validated
separately before auto-closing it.

This should also fix #14672, #14694, #14715, and #15725:
- #14672, #14694, and #14715 are the same Linux
symlinked-writable-root/bwrap family as #15781.
- #15725 is the protected symlinked workspace path variant; the PR
preserves the protected logical path in policy space while bwrap applies
read-only or unreadable treatment to the resolved target so
file-vs-directory bind mismatches do not abort sandbox setup.

## Notes
- Added Linux-only regressions for symlinked writable ancestors and
protected symlinked directory targets, including nested symlink escape
masking without rebinding the escape target writable.

---------

Co-authored-by: Codex <noreply@openai.com>
2026-04-10 17:00:58 -07:00
Shijie Rao 930e5adb7e Revert "Option to Notify Workspace Owner When Usage Limit is Reached" (#17391)
Reverts openai/codex#16969

#sev3-2026-04-10-accountscheckversion-500s-for-openai-workspace-7300
2026-04-10 23:33:13 +00:00
Owen Lin a3be74143a fix(guardian, app-server): introduce guardian review ids (#17298)
## Description

This PR introduces `review_id` as the stable identifier for guardian
reviews and exposes it in app-server `item/autoApprovalReview/started`
and `item/autoApprovalReview/completed` events.

Internally, guardian rejection state is now keyed by `review_id` instead
of the reviewed tool item ID. `target_item_id` is still included when a
review maps to a concrete thread item, but it is no longer overloaded as
the review lifecycle identifier.

## Motivation

We'd like to give users the ability to preempt a guardian review while
it's running (approve or decline).

However, we can't implement the API that allows the user to override a
running guardian review because we didn't have a unique `review_id` per
guardian review. Using `target_item_id` is not correct since:
- with execve reviews, there can be multiple execve calls (and therefore
guardian reviews) per shell command
- with network policy reviews, there is no target item ID

The PR that actually implements user overrides will use `review_id` as
the stable identifier.
2026-04-10 16:21:02 -07:00
Abhinav 7999b0f60f Support clear SessionStart source (#17073)
## Motivation

The `SessionStart` hook already receives `startup` and `resume` sources,
but sessions created from `/clear` previously looked like normal startup
sessions. This makes it impossible for hook authors to distinguish
between these with the matcher.

## Summary

- Add `InitialHistory::Cleared` so `/clear`-created sessions can be
distinguished from ordinary startup sessions.
- Add `SessionStartSource::Clear` and wire it through core, app-server
thread start params, and TUI clear-session flow.
- Update app-server protocol schemas, generated TypeScript, docs, and
related tests.


https://github.com/user-attachments/assets/9cae3cb4-41c7-4d06-b34f-966252442e5c
2026-04-10 16:05:21 -07:00
Won Park 147cb84112 add parent-id to guardian context (#17194)
adding parent codex session id to guardian prompt
2026-04-10 13:57:56 -07:00