Commit Graph
6221 Commits
Author SHA1 Message Date
rhan-oai cfec218101 merge commit for archive created by Sapling 2026-04-20 16:02:06 -07:00
rhan-oai e109475b37 [codex-analytics] guardian review TTFT plumbing and emission 2026-04-20 15:42:23 -07:00
rhan-oai 9acfe11907 [codex-analytics] guardian review truncation 2026-04-20 15:42:23 -07:00
rhan-oai 52920f5f20 Merge 53e57804e4 into sapling-pr-archive-rhan-oai 2026-04-20 15:32:55 -07:00
rhan-oai 8508629f23 [codex-analytics] guardian review analytics events emission 2026-04-20 15:29:27 -07:00
rhan-oai 53e57804e4 [codex-analytics] guardian review TTFT plumbing and emission 2026-04-20 15:29:27 -07:00
rhan-oai 170d525e23 [codex-analytics] guardian review truncation 2026-04-20 15:29:27 -07:00
Felipe Coury cebe57b723 fix(tui): keep /copy aligned with rollback (#18739)
## Why

Fixes #18718.

After rewinding a thread, `/copy` could still copy the latest assistant
response from before the rewind. The transcript cells were rolled back,
but the copy source was a single `last_agent_markdown` cache that was
not synchronized with backtracking, so the visible conversation and
copied content could diverge.

## What changed

`ChatWidget` now keeps a bounded copy history for the most recent 32
assistant responses, keyed by the visible user-turn count. When local
rollback trims transcript cells, the copy cache is trimmed to the same
surviving user-turn count so `/copy` uses the latest visible assistant
response.

If the user rewinds past the retained copy window, `/copy` now reports:

```text
Cannot copy that response after rewinding. Only the most recent 32 responses are available to /copy.
```

The change also adds coverage for copying the latest surviving response
after rollback and for the over-limit rewind message.

## Verification

- Manually resumed a synthetic 35-turn session, rewound within the
retained window, and verified `/copy` copied the surviving response.
- Manually rewound past the retained window and verified `/copy` showed
the 32-response limit message.
- `cargo test -p codex-tui slash_copy`
- `just fix -p codex-tui`
- `cargo insta pending-snapshots`

Note: `cargo test -p codex-tui` currently fails on unrelated model
catalog and snapshot drift around the default model changing to
`gpt-5.4`; the focused `/copy` tests pass after fixing the new test
setup.
2026-04-20 19:24:10 -03:00
Tom 46e5814f77 Add experimental remote thread store config (#18714)
Add experimental config to use remote thread store rather than local
thread store implementation in app server
2026-04-20 22:20:39 +00:00
rhan-oai 4f0e6dc4a9 Merge d78b766fef into sapling-pr-archive-rhan-oai 2026-04-20 15:19:16 -07:00
rhan-oai d78b766fef [codex-analytics] guardian review TTFT plumbing and emission 2026-04-20 15:17:33 -07:00
rhan-oai 6c9a985ab3 [codex-analytics] guardian review truncation 2026-04-20 15:15:11 -07:00
rhan-oai 748a64f531 [codex-analytics] guardian review analytics events emission 2026-04-20 15:15:09 -07:00
Ahmed Ibrahim cc96a03f10 Fix stale model test fixtures (#18719)
Fixes stale test fixtures left after the active bundled model catalog
updates in #18586 and #18388. Those changes made `gpt-5.4` the current
default and removed several older hardcoded slugs, which left Windows
Bazel shards failing TUI and config tests.

What changed:
- Refresh TUI model migration, availability NUX, plan-mode, status, and
snapshot fixtures to use active bundled model slugs.
- Update the config edit test expectation for the TOML-quoted
`"gpt-5.2"` migration key.
- Move the model catalog tests into
`codex-rs/tui/src/app/tests/model_catalog.rs` so touching them does not
trip the blob-size policy for `app.rs`.

Verification:
- CI Bazel/lint checks are expected to cover the affected test shards.
2026-04-20 21:52:30 +00:00
rhan-oai b05a56c53c merge commit for archive created by Sapling 2026-04-20 14:51:21 -07:00
rhan-oai bfc16db7dd [codex-analytics] emit terminal tool review events 2026-04-20 14:50:57 -07:00
Eric Traut baa5dd7b29 Surface TUI skills refresh failures (#18627)
## Why

`skills/list` refreshes are best-effort metadata updates. If one fails
during startup or thread switching, the TUI should keep running and show
enough detail to diagnose the app-server failure instead of leaving the
user with only a log entry.

This addresses the recoverability and observability issue reported in
#16914.

## What Changed

- Preserve the full startup `skills/list` error chain before sending it
back through the app event queue.
- Surface failed skills refreshes as recoverable TUI error messages
while still logging the warning.

This is related to the recent bug fix from [PR
#18370](https://github.com/openai/codex/pull/18370).
2026-04-20 14:43:04 -07:00
rhan-oai e77a5235de Merge 0c8f41eab9 into sapling-pr-archive-rhan-oai 2026-04-20 14:26:38 -07:00
rhan-oai 0c8f41eab9 [codex-analytics] emit terminal tool review events 2026-04-20 14:26:06 -07:00
rhan-oai 604b32c7a4 [codex-analytics] add tool review event schema 2026-04-20 14:25:12 -07:00
rhan-oai 638386fbf5 Merge 6033f53637 into sapling-pr-archive-rhan-oai 2026-04-20 14:20:14 -07:00
rhan-oai 3c32c2e341 Merge 920fe99b80 into sapling-pr-archive-rhan-oai 2026-04-20 14:19:15 -07:00
rhan-oai 6033f53637 [codex-analytics] guardian review TTFT plumbing and emission 2026-04-20 14:16:39 -07:00
rhan-oai 444f0a3142 [codex-analytics] guardian review truncation 2026-04-20 14:15:16 -07:00
rhan-oai 920fe99b80 [codex-analytics] guardian review analytics events emission 2026-04-20 14:11:48 -07:00
guinness-oai 126bd6e7a8 Update realtime handoff transcript handling (#18597)
## Summary

This PR aims to improve integration between the realtime model and the
codex agent by sharing more context with each other. In particular, we
now share full realtime conversation transcript deltas in addition to
the delegation message.

realtime_conversation.rs now turns a handoff into:
```
<realtime_delegation>
  <input>...</input>
  <transcript_delta>...</transcript_delta>
</realtime_delegation>
```

## Implementation notes

The transcript is accumulated in the realtime websocket layer as parsed
realtime events arrive. When a background-agent handoff is requested,
the current transcript snapshot is copied onto the handoff event and
then serialized by `realtime_conversation.rs` into the hidden realtime
delegation envelope that Codex receives as user-turn context.

For Realtime V2, the session now explicitly enables input audio
transcription, and the parser handles the relevant input/output
transcript completion events so the snapshot includes both user speech
and realtime model responses. The delegation `<input>` remains the
actual handoff request, while `<transcript_delta>` carries the
surrounding conversation history for context.

Reviewers should note that the transcript payload is intended for Codex
context sharing, not UI rendering. The realtime delegation envelope
should stay hidden from the user-facing transcript surface, while still
being included in the background-agent turn so Codex can answer with the
same conversational context the realtime model had.
2026-04-20 14:04:09 -07:00
Dylan Hurd 14ebfbced9 chore(guardian) disable mcps and plugins (#18722)
## Summary
Disables apps, plugins, mcps for the guardian subagent thread

## Testing
- [x] Added unit tests
2026-04-20 13:43:50 -07:00
rhan-oai 945388bcb3 merge commit for archive created by Sapling 2026-04-20 13:37:29 -07:00
rhan-oai 35c9400828 [codex-analytics] emit tool item events from item lifecycle 2026-04-20 13:35:46 -07:00
rhan-oai ecd06cbee0 [codex-analytics] add tool item event schemas 2026-04-20 13:35:46 -07:00
rhan-oai 06a35d7811 Merge b4e5d584b2 into sapling-pr-archive-rhan-oai 2026-04-20 13:33:38 -07:00
rhan-oai b4e5d584b2 core: emit responses api call analytics 2026-04-20 13:31:41 -07:00
rhan-oai aea8f2a3d3 analytics: reduce responses api call facts 2026-04-20 13:31:40 -07:00
rhan-oai 391565ff57 [codex-analytics] ingest server requests and responses 2026-04-20 13:30:41 -07:00
rhan-oai be2c19672c analytics: add responses api call schema 2026-04-20 13:30:41 -07:00
rhan-oai 467c16184e merge commit for archive created by Sapling 2026-04-20 13:29:42 -07:00
rhan-oai 930b9c6996 merge commit for archive created by Sapling 2026-04-20 13:13:26 -07:00
rhan-oai d8dec91fd3 [codex-analytics] guardian review TTFT plumbing and emission 2026-04-20 13:11:54 -07:00
rhan-oai d7d92000d5 [codex-analytics] guardian review truncation 2026-04-20 13:11:53 -07:00
rhan-oai 68b51daa28 [codex-analytics] guardian review analytics events emission 2026-04-20 13:11:53 -07:00
rhan-oai 7f53e47250 [codex-analytics] guardian review analytics schema polishing (#17692)
## Why

Guardian review analytics needs a Rust event shape that matches the
backend schema while avoiding unnecessary PII exposure from reviewed
tool calls. This PR narrows the analytics payload to the fields we
intend to emit and keeps shared Guardian assessment enums in protocol
instead of duplicating equivalent analytics-only enums.

## What changed

- Uses protocol Guardian enums directly for `risk_level`,
`user_authorization`, `outcome`, and command source values.
- Removes high-risk reviewed-action fields from the analytics payload,
including raw commands, display strings, working directories, file
paths, network targets/hosts, justification text, retry reason, and
rationale text.
- Makes `target_item_id` and `tool_call_count` nullable so the Codex
event can represent cases where the app-server protocol or producer does
not have those values.
- Keeps lower-risk structured reviewed-action metadata such as sandbox
permissions, permission profile, `tty`, `execve` source/program, network
protocol/port, and MCP connector/tool labels.
- Adds an analytics reducer/client test covering `codex_guardian_review`
serialization with an optional `target_item_id` and absent removed
fields.

## Verification

- `cargo test -p codex-analytics
guardian_review_event_ingests_custom_fact_with_optional_target_item`
- `cargo fmt --check`

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/17692).
* #17696
* #17695
* #17693
* __->__ #17692
2026-04-20 13:08:17 -07:00
rhan-oai bf4d5d7bd6 merge commit for archive created by Sapling 2026-04-20 13:08:12 -07:00
rhan-oai d2746931a5 core: emit responses api call analytics 2026-04-20 13:07:50 -07:00
rhan-oai d245a57db3 Merge 888f26ae4b into sapling-pr-archive-rhan-oai 2026-04-20 13:07:38 -07:00
rhan-oai ff079effc8 [codex-analytics] emit tool item events from item lifecycle 2026-04-20 13:07:01 -07:00
rhan-oai 888f26ae4b [codex-analytics] add tool item event schemas 2026-04-20 13:07:01 -07:00
rhan-oai 0af69cf78b [codex-analytics] ingest server requests and responses 2026-04-20 12:28:18 -07:00
rhan-oai 83136ec535 Merge 063191c1a0 into sapling-pr-archive-rhan-oai 2026-04-20 12:24:47 -07:00
rhan-oai 4aa53418fb merge commit for archive created by Sapling 2026-04-20 12:22:20 -07:00
rhan-oai 063191c1a0 core: emit responses api call analytics 2026-04-20 12:21:52 -07:00