Commit Graph
972 Commits
Author SHA1 Message Date
Roy Han cad99bc951 rebase 2026-03-26 15:41:38 -07:00
Roy Han c278d0ab61 rebase 2026-03-26 14:52:40 -07:00
Roy Han 5567bf4aed pivot to consuming from app-event stream 2026-03-26 10:56:26 -07:00
Roy Han e1f9d57bc8 schema cleanup 2026-03-26 00:41:48 -07:00
Roy Han af369f5beb rebase 2026-03-25 23:02:02 -07:00
Roy Han f9ce9ba6f1 rebase 2026-03-25 18:33:59 -07:00
Roy Han 71d88a63c2 strengthen naming 2026-03-25 18:10:36 -07:00
Roy Han 2ee91d994f rebase 2026-03-25 17:14:11 -07:00
Roy Han ff52cac307 test: wait for turn event 2026-03-25 16:56:37 -07:00
rhan-oai d55054761a Merge branch 'rhan/oob-turn-metadata' into rhan/oob-queue-data 2026-03-25 16:07:58 -07:00
Roy Han 4aec99194d [telemetry] queue data 2026-03-25 15:06:26 -07:00
rhan-oai 3ca5e1798f Merge branch 'rhan/oob-thread-metadata' into rhan/oob-turn-metadata 2026-03-25 15:00:32 -07:00
Roy Han f4790429c1 fix test 2026-03-25 14:54:33 -07:00
Roy Han 4a163ee2a9 remove turn context 2026-03-25 14:36:12 -07:00
Roy Han 6c6d49a49a lint 2026-03-25 14:24:15 -07:00
Roy Han 66e28bb728 rebase on thread branch 2026-03-25 14:06:55 -07:00
Roy Han 7daa98793d remove flaky test 2026-03-25 14:02:09 -07:00
Roy Han e25d698cb3 test cleanup 2026-03-25 13:43:17 -07:00
rhan-oai c6cc9de6e9 Merge branch 'main' into rhan/oob-thread-metadata 2026-03-25 13:39:37 -07:00
Matthew Zeng 91337399fe [apps][tool_suggest] Remove tool_suggest's dependency on tool search. (#14856)
- [x] Remove tool_suggest's dependency on tool search.
2026-03-25 12:26:02 -07:00
Roy Han c36438ca59 is first turn 2026-03-25 12:06:07 -07:00
Roy Han 94da6b2289 rebase 2026-03-25 11:43:43 -07:00
Roy Han 0f770257e5 test fix 2026-03-25 10:52:34 -07:00
Roy Han 5362886490 event rename and resume support 2026-03-25 10:27:05 -07:00
Roy Han 74b8b800c7 session source update 2026-03-25 09:59:56 -07:00
pakrym-oai 504aeb0e09 Use AbsolutePathBuf for cwd state (#15710)
Migrate `cwd` and related session/config state to `AbsolutePathBuf` so
downstream consumers consistently see absolute working directories.

Add test-only `.abs()` helpers for `Path`, `PathBuf`, and `TempDir`, and
update branch-local tests to use them instead of
`AbsolutePathBuf::try_from(...)`.

For the remaining TUI/app-server snapshot coverage that renders absolute
cwd values, keep the snapshots unchanged and skip the Windows-only cases
where the platform-specific absolute path layout differs.
2026-03-25 16:02:22 +00:00
jif-oaiandCodex 178c3b15b4 chore: remove grep_files handler (#15775)
# 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.

---------

Co-authored-by: Codex <noreply@openai.com>
2026-03-25 16:01:45 +00:00
Fouad Matinandcolby-oai 32c4993c8a fix(core): default approval behavior for mcp missing annotations (#15519)
- Changed `requires_mcp_tool_approval` to apply MCP spec defaults when
annotations are missing.
- Unannotated tools now default to:
  - `readOnlyHint = false`
  - `destructiveHint = true`
  - `openWorldHint = true`
- This means unannotated MCP tools now go through approval/ARC
monitoring instead of silently bypassing it.
- Explicitly read-only tools still skip approval unless they are also
explicitly marked destructive.

**Previous behavior**
Failed open for missing annotations, which was unsafe for custom MCP
tools that omitted or forgot annotations.

---------

Co-authored-by: colby-oai <228809017+colby-oai@users.noreply.github.com>
2026-03-25 07:55:41 -07:00
Matthew Zeng e590fad50b [plugins] Add a flag for tool search. (#15722)
- [x] Add a flag for tool search.
2026-03-25 07:00:25 +00:00
Charley CunninghamandCodex d72fa2a209 [codex] Defer fork context injection until first turn (#15699)
## Summary
- remove the fork-startup `build_initial_context` injection
- keep the reconstructed `reference_context_item` as the fork baseline
until the first real turn
- update fork-history tests and the request snapshot, and add a
`TODO(ccunningham)` for remaining nondiffable initial-context inputs

## Why
Fork startup was appending current-session initial context immediately
after reconstructing the parent rollout, then the first real turn could
emit context updates again. That duplicated model-visible context in the
child rollout.

## Impact
Forked sessions now behave like resume for context seeding: startup
reconstructs history and preserves the prior baseline, and the first
real turn handles any current-session context emission.

---------

Co-authored-by: Codex <noreply@openai.com>
2026-03-24 18:34:44 -07:00
Roy Han 3766590bee stale test 2026-03-24 18:28:46 -07:00
Roy Han 9e5874df07 test bug 2026-03-24 18:23:35 -07:00
Roy Han 7141347e82 variant tightening 2026-03-24 15:58:09 -07:00
Roy Han ed9e59ceb0 restructure history and source 2026-03-24 15:28:41 -07:00
Roy Han 039a64053c Revert "rebase"
This reverts commit 9ad5c1386f, reversing
changes made to 4b9e6f4383.
2026-03-24 15:21:52 -07:00
Roy Han 9ad5c1386f rebase 2026-03-24 15:16:50 -07:00
Roy Han 4b9e6f4383 clear churn 2026-03-24 15:12:14 -07:00
rhan-oai 66534ad1d4 Merge branch 'main' into rhan/oob-thread-metadata 2026-03-24 15:11:23 -07:00
Roy Han 92e529a8ec thread event start 2026-03-24 15:10:10 -07:00
Roy Han 086e3dcc50 steer cleanup 2026-03-24 14:56:59 -07:00
Roy Han 903559bd60 remove turn event type 2026-03-24 14:47:27 -07:00
Roy Han 5d7f0e0c83 protocol rename 2026-03-24 14:42:53 -07:00
Roy Han e7a4e25e83 renaming 2026-03-24 14:37:50 -07:00
Roy Han 1ab00f1609 update schema 2026-03-24 14:26:45 -07:00
rhan-oai bc0c69d5ec Merge branch 'main' into rhan/oob-turn-metadata 2026-03-24 14:21:48 -07:00
Roy Han 1d4cee82bf event definitions 2026-03-24 14:04:13 -07:00
Roy Han 2865b096f6 define events and support queueing 2026-03-24 14:03:39 -07:00
0f957a93cd Move git utilities into a dedicated crate (#15564)
- create `codex-git-utils` and move the shared git helpers into it with
file moves preserved for diff readability
- move the `GitInfo` helpers out of `core` so stacked rollout work can
depend on the shared crate without carrying its own git info module

---------

Co-authored-by: Ahmed Ibrahim <219906144+aibrahim-oai@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
2026-03-24 13:26:23 -07:00
Charley CunninghamandCodex 2d61357c76 Trim pre-turn context updates during rollback (#15577)
## Summary
- trim contiguous developer/contextual-user pre-turn updates when
rollback cuts back to a user turn
- add a focused history regression test for the trim behavior
- update the rollback request-boundary snapshots to show the fixed
non-duplicating context shape

---------

Co-authored-by: Codex <noreply@openai.com>
2026-03-24 12:43:53 -07:00
Celia ChenandEric Traut 88694e8417 chore: stop app-server auth refresh storms after permanent token failure (#15530)
built from #14256. PR description from @etraut-openai:

This PR addresses a hole in [PR
11802](https://github.com/openai/codex/pull/11802). The previous PR
assumed that app server clients would respond to token refresh failures
by presenting the user with an error ("you must log in again") and then
not making further attempts to call network endpoints using the expired
token. While they do present the user with this error, they don't
prevent further attempts to call network endpoints and can repeatedly
call `getAuthStatus(refreshToken=true)` resulting in many failed calls
to the token refresh endpoint.

There are three solutions I considered here:
1. Change the getAuthStatus app server call to return a null auth if the
caller specified "refreshToken" on input and the refresh attempt fails.
This will cause clients to immediately log out the user and return them
to the log in screen. This is a really bad user experience. It's also a
breaking change in the app server contract that could break third-party
clients.
2. Augment the getAuthStatus app server call to return an additional
field that indicates the state of "token could not be refreshed". This
is a non-breaking change to the app server API, but it requires
non-trivial changes for all clients to properly handle this new field
properly.
3. Change the getAuthStatus implementation to handle the case where a
token refresh fails by marking the AuthManager's in-memory access and
refresh tokens as "poisoned" so it they are no longer used. This is the
simplest fix that requires no client changes.

I chose option 3.

Here's Codex's explanation of this change:

When an app-server client asks `getAuthStatus(refreshToken=true)`, we
may try to refresh a stale ChatGPT access token. If that refresh fails
permanently (for example `refresh_token_reused`, expired, or revoked),
the old behavior was bad in two ways:

1. We kept the in-memory auth snapshot alive as if it were still usable.
2. Later auth checks could retry refresh again and again, creating a
storm of doomed `/oauth/token` requests and repeatedly surfacing the
same failure.

This is especially painful for app-server clients because they poll auth
status and can keep driving the refresh path without any real chance of
recovery.

This change makes permanent refresh failures terminal for the current
managed auth snapshot without changing the app-server API contract.

What changed:
- `AuthManager` now poisons the current managed auth snapshot in memory
after a permanent refresh failure, keyed to the unchanged `AuthDotJson`.
- Once poisoned, later refresh attempts for that same snapshot fail fast
locally without calling the auth service again.
- The poison is cleared automatically when auth materially changes, such
as a new login, logout, or reload of different auth state from storage.
- `getAuthStatus(includeToken=true)` now omits `authToken` after a
permanent refresh failure instead of handing out the stale cached bearer
token.

This keeps the current auth method visible to clients, avoids forcing an
immediate logout flow, and stops repeated refresh attempts for
credentials that cannot recover.

---------

Co-authored-by: Eric Traut <etraut@openai.com>
2026-03-24 12:39:58 -07:00