Commit Graph
9062 Commits
Author SHA1 Message Date
Michael Bolin e0676d4311 merge commit for archive created by Sapling 2026-03-06 11:05:02 -08:00
Michael Bolin 7f7a180110 merge commit for archive created by Sapling 2026-03-06 11:02:37 -08:00
Michael Bolin a05ed06409 fix: move unit tests in codex-rs/core/src/config/mod.rs into their own file 2026-03-06 11:02:29 -08:00
Michael Bolin f05a0a3210 linux-sandbox: honor split filesystem policies in bwrap 2026-03-06 10:54:33 -08:00
Michael Bolin d3e5080d04 protocol: keep root carveouts sandboxed 2026-03-06 10:54:33 -08:00
Michael Bolin a86cbebf52 sandboxing: preserve denied paths when widening permissions 2026-03-06 10:54:33 -08:00
Michael Bolin 5b731acf15 merge commit for archive created by Sapling 2026-03-06 10:53:16 -08:00
Michael Bolin c88ee7f2eb fix: move unit tests in codex-rs/core/src/config/mod.rs into their own file 2026-03-06 10:53:10 -08:00
Michael Bolin 3db879892d linux-sandbox: plumb split sandbox policies through helper 2026-03-06 10:52:42 -08:00
Michael Bolin 3e354add15 seatbelt: honor split filesystem sandbox policies 2026-03-06 10:51:14 -08:00
Michael Bolin a6a9651774 safety: honor filesystem policy carveouts in apply_patch 2026-03-06 10:51:14 -08:00
Michael Bolin a7c157b38d protocol: derive effective file access from filesystem policies 2026-03-06 10:51:14 -08:00
Michael Bolin 5d339bdf3d sandboxing: plumb split sandbox policies through runtime 2026-03-06 10:51:13 -08:00
Michael Bolin 1ad84c7c00 merge commit for archive created by Sapling 2026-03-06 10:49:41 -08:00
Michael Bolin 6a12780b85 fix: move unit tests in codex-rs/core/src/config/mod.rs into their own file 2026-03-06 10:49:30 -08:00
Michael Bolin 856bce7c28 config: add v3 filesystem permission profiles 2026-03-06 10:41:39 -08:00
Ruslan Nigmatullin 51fcdc760d app-server: Emit thread/name/updated event globally (#13674) 2026-03-06 10:25:18 -08:00
Owen Lin 3449e00bc9 feat(otel, core): record turn TTFT and TTFM metrics in codex-core (#13630)
### Summary
This adds turn-level latency metrics for the first model output and the
first completed agent message.
- `codex.turn.ttft.duration_ms` starts at turn start and records on the
first output signal we see from the model. That includes normal
assistant text, reasoning deltas, and non-text outputs like tool-call
items.
- `codex.turn.ttfm.duration_ms` also starts at turn start, but it
records when the first agent message finishes streaming rather than when
its first delta arrives.

### Implementation notes
The timing is tracked in codex-core, not app-server, so the definition
stays consistent across CLI, TUI, and app-server clients.

I reused the existing turn lifecycle boundary that already drives
`codex.turn.e2e_duration_ms`, stored the turn start timestamp in turn
state, and record each metric once per turn.

I also wired the new metric names into the OTEL runtime metrics summary
so they show up in the same in-memory/debug snapshot path as the
existing timing metrics.
2026-03-06 10:23:48 -08:00
Michael Bolin eb253a40b0 merge commit for archive created by Sapling 2026-03-06 10:12:26 -08:00
Owen Lin 6c98a59dbd fix(app-server): fix turn_start_shell_zsh_fork_executes_command_v2 flake (#13770)
This fixes a flaky `turn_start_shell_zsh_fork_executes_command_v2` test.

The interrupt path can race with the follow-up `/responses` request that
reports the aborted tool call, so the test now allows that extra no-op
response instead of assuming there will only ever be one request. The
assertions still stay focused on the behavior the test actually cares
about: starting the zsh-forked command correctly.

Testing:
- `just fmt`
- `cargo test -p codex-app-server --test all
suite::v2::turn_start_zsh_fork::turn_start_shell_zsh_fork_executes_command_v2
-- --exact --nocapture`
2026-03-06 10:10:16 -08:00
Charley CunninghamandCodex cb1a182bbe Clarify sandbox permission override helper semantics (#13703)
## Summary
Today `SandboxPermissions::requires_additional_permissions()` does not
actually mean "is `WithAdditionalPermissions`". It returns `true` for
any non-default sandbox override, including `RequireEscalated`. That
broad behavior is relied on in multiple `main` callsites.

The naming is security-sensitive because `SandboxPermissions` is used on
shell-like tool calls to tell the executor how a single command should
relate to the turn sandbox:
- `UseDefault`: run with the turn sandbox unchanged
- `RequireEscalated`: request execution outside the sandbox
- `WithAdditionalPermissions`: stay sandboxed but widen permissions for
that command only

## Problem
The old helper name reads as if it only applies to the
`WithAdditionalPermissions` variant. In practice it means "this command
requested any explicit sandbox override."

That ambiguity made it easy to read production checks incorrectly and
made the guardian change look like a standalone `main` fix when it is
not.

On `main` today:
- `shell` and `unified_exec` intentionally reject any explicit
`sandbox_permissions` request unless approval policy is `OnRequest`
- `exec_policy` intentionally treats any explicit sandbox override as
prompt-worthy in restricted sandboxes
- tests intentionally serialize both `RequireEscalated` and
`WithAdditionalPermissions` as explicit sandbox override requests

So changing those callsites from the broad helper to a narrow
`WithAdditionalPermissions` check would be a behavior change, not a pure
cleanup.

## What This PR Does
- documents `SandboxPermissions` as a per-command sandbox override, not
a generic permissions bag
- adds `requests_sandbox_override()` for the broad meaning: anything
except `UseDefault`
- adds `uses_additional_permissions()` for the narrow meaning: only
`WithAdditionalPermissions`
- keeps `requires_additional_permissions()` as a compatibility alias to
the broad meaning for now
- updates the current broad callsites to use the accurately named broad
helper
- adds unit coverage that locks in the semantics of all three helpers

## What This PR Does Not Do
This PR does not change runtime behavior. That is intentional.

---------

Co-authored-by: Codex <noreply@openai.com>
2026-03-06 09:57:48 -08:00
jif-oai c8f4b5bc1e feat: limit number of rows per log (#13763)
avoid DB explosion. This is a temp solution
2026-03-06 18:51:42 +01:00
jif-oai f891f516a5 feat: drop discrepency metrics (#13753) 2026-03-06 18:32:25 +01:00
Michael Bolin 99e9bc1705 merge commit for archive created by Sapling 2026-03-06 09:28:35 -08:00
Michael Bolin 9979e72a09 refactor: route zsh-fork through unified exec 2026-03-06 09:28:31 -08:00
Michael Bolin 9b7549970d linux-sandbox: honor split filesystem policies in bwrap 2026-03-06 09:26:32 -08:00
Michael Bolin 444942a6eb protocol: keep root carveouts sandboxed 2026-03-06 09:26:32 -08:00
Michael Bolin 1b9ccbd0a1 sandboxing: preserve denied paths when widening permissions 2026-03-06 09:26:32 -08:00
Michael Bolin 47bf763e8a linux-sandbox: plumb split sandbox policies through helper 2026-03-06 09:26:32 -08:00
Michael Bolin ab133b0a82 seatbelt: honor split filesystem sandbox policies 2026-03-06 09:26:32 -08:00
Michael Bolin 0e95cf56b7 safety: honor filesystem policy carveouts in apply_patch 2026-03-06 09:26:32 -08:00
Michael Bolin c83a867232 protocol: derive effective file access from filesystem policies 2026-03-06 09:26:32 -08:00
Michael Bolin 2e0a782f76 sandboxing: plumb split sandbox policies through runtime 2026-03-06 09:26:32 -08:00
Michael Bolin 3ac5f40a5f config: add v3 filesystem permission profiles 2026-03-06 09:25:57 -08:00
Michael Bolin c1f325d5e9 merge commit for archive created by Sapling 2026-03-06 09:24:37 -08:00
Michael Bolin 37444e2f65 refactor: route zsh-fork through unified exec 2026-03-06 09:24:25 -08:00
Michael Bolin 541ee41211 fix: preserve zsh-fork escalation fds in unified-exec PTYs 2026-03-06 09:12:19 -08:00
jif-oai fa16c26908 feat: drop sqlite db feature flag (#13750) 2026-03-06 17:57:52 +01:00
Michael Bolin 8be4608940 merge commit for archive created by Sapling 2026-03-06 08:48:14 -08:00
Michael Bolin ca05f7ebe8 refactor: route zsh-fork through unified exec 2026-03-06 08:47:55 -08:00
Casey Chow b3765a07e8 [rmcp-client] Recover from streamable HTTP 404 sessions (#13514)
## Summary
- add one-time session recovery in `RmcpClient` for streamable HTTP MCP
`404` session expiry
- rebuild the transport and retry the failed operation once after
reinitializing the client state
- extend the test server and integration coverage for `404`, `401`,
single-retry, and non-session failure scenarios

## Testing
- just fmt
- cargo test -p codex-rmcp-client (the post-rebase run lost its final
summary in the terminal; the suite had passed earlier before the rebase)
- just fix -p codex-rmcp-client
2026-03-06 10:02:42 -05:00
jif-oai 5d4303510c fix: windows normalization (#13742) 2026-03-06 15:50:44 +01:00
Eric Traut b5f475ed16 Add timestamps to feedback log lines (#13688)
`/feedback` uploads can include `codex-logs.log` from the in-memory
feedback logger path. That logger was emitting level + message without a
timestamp, which made some uploaded logs much harder to inspect. This
change makes the feedback logger use an explicit timer so
feedback-captured log lines include timestamps consistently.

This is not Windows-specific code. The bug showed up in Windows reports
because those uploads were hitting the feedback-buffer path more often,
while Linux/macOS reports were typically coming from the SQLite feedback
export, which already prefixes timestamps.

Here's an example of a log that is missing the timestamps:

```
TRACE app-server request: getAuthStatus
TRACE app-server request: model/list
 INFO models cache: evaluating cache eligibility
 INFO models cache: attempting load_fresh
 INFO models cache: loaded cache file
 INFO models cache: cache version mismatch
 INFO models cache: no usable cache entry
DEBUG 
 INFO models cache: cache miss, fetching remote models
TRACE windows::current_platform is called
TRACE Returning Info { os_type: Windows, version: Semantic(10, 0, 26200), edition: Some("Windows 11 Professional"), codename: None, bitness: X64, architecture: Some("x86_64") }
```
2026-03-06 07:34:59 -07:00
jif-oai 8ad768eb76 feat: prune old memories in DB (#13734)
To save memory
2026-03-06 15:10:49 +01:00
jif-oai b6d43ec8eb feat: status line with real data (#13619) 2026-03-06 11:01:40 +01:00
Matthew Zeng 98dca99db7 [elicitations] Switch to use MCP style elicitation payload for mcp tool approvals. (#13621)
- [x] Switch to use MCP style elicitation payload for mcp tool
approvals.
- [ ] TODO: Update the UI to support the full spec.
2026-03-06 01:50:26 -08:00
Won Park ee1a20258a Enabling CWD Saving for Image-Gen (#13607)
Codex now saves the generated image on to your current working
directory.
2026-03-06 00:47:21 -08:00
Michael Bolin c3efafe52a merge commit for archive created by Sapling 2026-03-05 23:48:08 -08:00
Michael Bolin d1b3a60650 refactor: route zsh-fork through unified exec 2026-03-05 23:48:00 -08:00
Michael Bolin 7f11b1ec30 merge commit for archive created by Sapling 2026-03-05 23:32:44 -08:00