Commit Graph
14260 Commits
Author SHA1 Message Date
felixxia-oai 9938ffba35 Notify extensions when Guardian policy changes the approvals reviewer (#63995)
## Why

A Guardian policy refresh can switch a running thread from Auto Review
to user approvals. Without a config change notification, Guardian's
shadow reviewers can stay active after that switch.

## What changed

Notify config contributors with the previous and updated effective
configs when a policy refresh changes the approvals reviewer. Send the
notification after releasing the session locks, even if the refreshed
policy blocks the current model.

## Testing

Extend the Guardian shadow test to refresh policy on a root thread and
its child. Verify that both receive the reviewer change, that switching
to user approvals cancels their shadow reviewers, and that allowing
Auto Review again restores the requested reviewer.

GitOrigin-RevId: fd61acf7fb161be341a63a2e867582e6c308d0dc
2026-11-25 22:42:49 +00:00
Charlie Marsh 71cf244137 Avoid cloning thread metadata during rollout read repair (#63994)
When the stored rollout path matches, compare the normalized working
directory and computed archive timestamp with the stored values. Return
early if both match. Otherwise, reuse the existing metadata to build
the updated row.

GitOrigin-RevId: 2c5d3e98851f2c8f72414bd688ccc99b2219adeb
2026-11-25 22:42:11 +00:00
jif 06c718ae68 Remove the shadow skill ranking experiment (#63993)
## What changed

Remove the background ranking of skill candidates and the metrics that
compared those rankings with skills actually used. Drop the experiment's
per-thread state and metrics wiring.

Continue accepting `skill_search` in existing feature configurations as
an ignored compatibility key.

## Testing

Extend the feature configuration test to cover both `true` and `false`
values for `skill_search`.

GitOrigin-RevId: 9492533bdeea58d4976bc9fbcffb6b82036b7894
2026-11-25 22:41:36 +00:00
Eric Traut db360f8b00 Suppress Kitty graphics replies on every pet image chunk (#63992)
The first chunk of a Kitty pet image upload already requests quiet mode,
but continuation chunks omit that setting. Send `q=2` on every
continuation chunk, including the final one, to suppress terminal replies
throughout the upload.

## Testing

Extend the command snapshot test to check the headers of a three-chunk
upload, including the final `m=0,q=2` header.

GitOrigin-RevId: cd12c3e6f4c27320c4823f593657ab92824c83ff
2026-11-25 22:40:59 +00:00
Charlie Marsh a089ec6a93 Use lightweight settings for app-server thread metadata (#63990)
## Why

Enriching loaded thread results builds a full configuration snapshot,
including an execution permission profile, just to read display settings.

## What changed

Read the configured model, reasoning effort, environment selections, and
session source directly from the loaded thread when enriching results.
The environment data still includes the working directory and runtime
workspace roots.

## Testing

Extend the core test to verify that reading display settings matches the
configured snapshot's display fields without triggering a model lookup.
Extend the app-server test to verify that thread reads and lists return
explicit runtime workspace roots.

GitOrigin-RevId: f7053554fdb0f02bebb51b4cafda2ef39e6e81a5
2026-11-25 22:40:22 +00:00
Felipe Coury ceed625df9 Keep TUI tool groups independent when results arrive late (#63989)
## Why

When a command or tool finishes in a different transcript group from where it
started, both groups can share an identity. The later group can inherit the
original group's expanded state or steal its keyboard focus.

## What changed

Assign distinct identities to repeated tool activity in chronological order.
Keep those identities stable as the live transcript updates and results move
into history, so each group retains its own expansion state and focus.

## Testing

Add regression tests for a command that finishes after assistant commentary
and an MCP tool that returns an error in a later turn.

GitOrigin-RevId: ca69a68bb32746bdbe22ec7bc9633e4323f38347
2026-11-25 22:39:45 +00:00
felixxia-oai d800b00e88 Restart Guardian v3 shadow intake when Auto Review resumes (#63988)
## Why

Switching an enrolled thread to user approvals stops Guardian v3 shadow
intake. Previously, switching the same thread back to Auto Review left
intake stopped for subsequent turns.

## What changed

Restart intake in the background with a fresh evidence board after
checking that the thread still routes approvals to Auto Review. Start
at the end of persisted history so the new board only receives new
evidence. Existing child threads can attach to the new board on their
next turn.

## Testing

Add app-server coverage for routing later turns after Auto Review
resumes without replaying earlier turns. Extend the host test to cover
stale settings notifications, cancellation of a queued restart, and
creation of a fresh board and reviewer.

GitOrigin-RevId: 5201d7f7a7e3f2c045c69b9584b036467a5767d7
2026-11-25 22:39:08 +00:00
Dylan Hurd 1c1e383a7b Harden Guardian v2 hosted messaging tests (#63987)
## What changed

Wait for worker creation with its own timeout before waiting for MCP
delivery in the cached approval invalidation test. This gives a missing
worker a distinct failure from a delivery that never reaches the server.

Disable analytics in the Code Mode conversation history test so hosted
messaging only contacts the mock servers.

GitOrigin-RevId: 15887b9f37cc48b938fd67801a0dda9374027492
2026-11-25 22:38:31 +00:00
jif c6bbf8a413 Extract shared network policy types from the proxy crate (#63986)
## Why

The protocol and feature configuration crates depend on the network proxy
crate for data types. Give them a smaller dependency that contains the
shared definitions.

## What changed

Move environment network policies, domain and Unix socket permissions,
policy decisions and their sources, and credential provider definitions
into `codex-network-policy-types`. Use the new crate directly from
`codex-protocol` and `codex-features`.

Re-export the moved types from `codex-network-proxy` and keep environment
policy conversion and application, along with credential provider
validation, in the proxy crate.

GitOrigin-RevId: 8af684da746830bce45ac00135aed8052dba3824
2026-11-25 16:09:51 +00:00
felixxia-oai 06f334aa4b Add opt-in shadow intake for Guardian V3 (#63949)
## What changed

Add the default-off `features.guardianv3_shadow` flag and ignore it in
project config. When Guardian V2 handles Auto Review and Guardian V3
is disabled, enroll eligible new threads in background evidence intake
while Guardian V2 keeps making approval decisions.

Share an in-memory evidence board between the root and its child agents.
Keep shadow reviewer sessions ephemeral and suppress their events in
the parent thread. Retry failed intake startup on a later turn, and
stop shadow work when the root leaves Auto Review or shuts down.

## Testing

Cover enrollment for opted-in new threads, startup retry, child
attachment and cancellation, and the absence of an on-disk board.
Verify that project config cannot set the flag.

GitOrigin-RevId: 7c31c1d831498ba012193579123ac87779b76b85
2026-11-25 16:07:45 +00:00
felixxia-oai cc6e8a968d Use reset checks for attached Guardian V3 reviews (#63948)
## Why

Attached reviewers need to detect root history resets that can invalidate an approval. Preparing an attached review previously fetched root conversation evidence even though the reviewer did not use it for preparation.

## What changed

- Check the root history version before starting an attached review and while it runs. Local MultiAgent V2 workers resolve the currently loaded root thread, and hosted workers use the host's root snapshot.
- Skip root evidence capture when preparing or prewarming attached reviewers. Skip per-attempt evidence collection for attached observers and sessions without an evidence store. Live reviewers with an evidence store still record their verdicts.

## Testing

Add coverage for root history version changes on reset, version stability on append, root resolution after reload, and verdict recording when the first approval reuses a prewarmed reviewer.

GitOrigin-RevId: b3ff7e58883d5f72bea3d774e05ba2f678df45fc
2026-11-25 16:04:45 +00:00
felixxia-oai b144e0e239 Remove unused Guardian evidence write acknowledgments (#63942)
## Why

Guardian's public review path does not consume per-write acknowledgments. The session still needs to finish saving accepted evidence when a turn is canceled.

## What changed

Replace the acknowledgment tracker with a `PreserveReviewWrites` opt-in for Guardian root sessions. The session continues to save changed evidence across turn cancellation and waits for those writes during shutdown. Remove the append callback from `LiveThread`.

## Testing

Add a regression test that interrupts a turn while forwarded user instructions are still being saved, then checks that the instructions appear in persisted history.

GitOrigin-RevId: 01e8b2665034f46e766cb382ace99c416f29aab6
2026-11-25 15:38:14 +00:00
felixxia-oai d1e982d7eb Let Guardian V3 review actions while evidence routing is pending (#63941)
## Why

Guardian V3 approval reviews waited for the housekeeper to catch up on
conversation history before they could start. Slow evidence routing could
delay an action review, and a routing failure could prevent a verdict.

## What changed

Each review attempt, including retries, drains the reviewer's available
inbox when it reserves the reviewer. The housekeeper flushes and routes
history independently in response to thread activity.

## Testing

Cover reviews that start with an empty board or while evidence routing
resumes after a root thread reload. Verify that a revocation published
during an in-flight verdict is available to a subsequent review.

GitOrigin-RevId: f84f424b57538fa9562d8f4d47e38ce7a0a84dcd
2026-11-25 15:37:35 +00:00
felixxia-oai 34fcbc8caf Keep Guardian V3 verdicts valid across unrelated context updates (#63940)
## Why

An unrelated thread goal update could invalidate a pending Guardian V3
approval and trigger a second assessment even though the update never
reached the attached reviewer.

## What changed

Let attached Guardian V3 reviewers finish with the evidence admitted for
the current attempt. Later evidence can inform subsequent reviews. Keep
the cancellation, deadline, and root history checks for attached verdicts.

## Testing

Update the app-server regression test to change the thread goal while
an MCP approval is pending and verify that the original approval stands
after a single assessment.

GitOrigin-RevId: 6e7ffad243c7c59f0f97bdbe555886ff58531835
2026-11-25 15:36:14 +00:00
jif 44eb0838df Limit the sandbox’s codex-otel dependency to Windows (#63937)
GitOrigin-RevId: b169b2d687df0be2ca964c59083e4b25a71eba42
2026-11-25 15:19:27 +00:00
jif ecb223f525 Remove the connector dependency from codex-tools (#63929)
## What changed

Have core pass connector IDs, names, descriptions, and install URLs
through `DiscoverableConnectorInfo` for tool discovery and install
prompts. Move installation verification into the core handler, where it
checks accessibility using `AppInfo`.

Enable `serde_json`'s `arbitrary_precision` feature directly in
`codex-tools` to preserve large numbers in tool arguments and results.

## Testing

Cover install verification for accessible, inaccessible, and missing
connectors, including an accessible connector that is disabled.

GitOrigin-RevId: fd84e8e9b739d86658396e17e4dcd7b48a4b2fdd
2026-11-25 14:34:40 +00:00
jif d3ca5182df Present encrypted subagent replies as evidence in Guardian reviews (#63926)
## Why

Encrypted replies from subagents can provide evidence for a Guardian
decision. Reviewer compaction can drop those replies when it filters
descendant progress and completion messages.

## What changed

When native multi-agent history is enabled and the reviewer uses the
OpenAI provider, send encrypted replies from descendants to ancestors
as standalone `guardian.subagent_reply` tool outputs in Guardian review
and async scoring requests. Include the sender and recipient, preserve
the encrypted payload, and keep native message IDs in stored history
for deduplication.

Retain qualifying replies across reviewer compaction within the existing
per-message and shared token budgets.

## Testing

Extend regression coverage for incremental reviews, compaction recovery
with and without native agent review, and reply ID stability across
retained WebSocket scoring requests.

GitOrigin-RevId: bb46149426b1a60a6ed5cac6765283ec77682d23
2026-11-25 14:22:54 +00:00
Dylan Hurd e8fb104cd6 Make the context spill threshold configurable for MCP hooks (#63922)
## Why

MCP hooks could only use the default spill threshold. Hooks that return
larger context, such as a session-start memory hook, need a way to keep
more of that context inline.

## What changed

Allow `mcp_tool` hooks to set `additionalContextLimit` for events that
can emit `additionalContext`. Plaintext context spills to disk above
approximately 2,500 tokens by default. MCP hooks can set a threshold
from 1 to 10,000 tokens. A value of 0 or above 10,000 warns and uses
10,000. Hook trust hashes use the effective threshold.

Expose the setting in app-server configuration requirements and hook
list responses.

## Testing

Cover limit normalization, warnings, trust hashes, and app-server
reporting. Verify that a bundled memory hook with a higher threshold
injects its full context at startup and after compaction.

GitOrigin-RevId: 318704ac1532267b3eb2f138f130b6799863a5c0
2026-11-25 14:03:11 +00:00
jif 9f3cb25953 Drop the production dependency on codex-core from app-server transport (#63898)
## What changed

Use `codex-utils-home-dir` to locate Codex home and `codex-utils-path`
to write daemon recovery snapshots atomically. Keep `codex-core` as a
dev-dependency.

Enable `serde_json`'s `arbitrary_precision` feature directly to preserve
large numbers in JSON-RPC payloads and daemon recovery snapshots. Vendor
OpenSSL for standalone x86-64 and AArch64 Linux musl builds.

GitOrigin-RevId: f03116e49ca8f53acfa58922eeb3cbf260a12d35
2026-11-25 12:07:36 +00:00
jif f0f3d650b0 Move plugin skill namespace resolution into the skills loader (#63897)
## Why

The skills loader is the only consumer of the plugin namespace lookup
that uses the execution environment's filesystem. Keeping the lookup
there lets the shared plugin utilities drop their dependency on
`codex-exec-server`.

## What changed

Move the manifest name lookup into the skills loader. It still uses the
shared manifest search order and falls back to the plugin directory name
when the manifest name is missing or blank.

## Testing

Cover namespace resolution through the skills loader for Codex, Claude,
and Cursor manifests. Extend the local manifest lookup test to verify
that it falls back to the Cursor manifest after the other two are removed.

GitOrigin-RevId: 1f2cea60f660880377b0a39cb1e4f42034aded95
2026-11-25 12:06:53 +00:00
jif 1c69d01451 Publish process exit status and exit code together (#63896)
## Why

Separate reads and writes of the exit flag and exit code could let
unified exec observe a process as exited before seeing its exit code,
or return a live session ID alongside an exit code.

## What changed

Store the exit code in a shared `OnceLock` for pipe, PTY, and
driver-backed processes. Derive `has_exited()` from the presence of
that code. Unified exec reads the code when it retires the session,
after any pending output it needs to retain has been drained.

## Testing

Extend the pipe, PTY, and driver-backed tests to check that the
process handle exposes the exit code reported by the exit notification.
The driver-backed test also verifies that output arriving after the
notification is still collected.

GitOrigin-RevId: 6192e5ceb9c71c6321e76f750c531c0ea6554dca
2026-11-25 12:06:15 +00:00
Dylan Hurd 6cb4fd1d2d Drain stdout through closure in the PTY attachment test (#63894)
The exit status can arrive before the PTY reader delivers its final bytes.
Drain stdout to channel closure while awaiting the exit status so the test
compares complete output with and without file descriptor attachments.

GitOrigin-RevId: c695a1c1cd00c11071bd17523cfc2ca7effc697c
2026-11-25 12:04:48 +00:00
Dylan Hurd 077eab36fd Isolate Git discovery in remote apply_patch turn diff tests (#63889)
## Why

An ancestor's `.git` marker can change the repository root discovered by
the tests, which affects the paths in the emitted turn diffs. Manual
cleanup at the end of the shared-path test can also be skipped when the
test fails early.

## What changed

- Add `.git` markers to keep repository discovery within the fixtures.
- Reuse the executor's working-directory path on both filesystems and
  give the local directory a `TempDir` owner so both fixtures are cleaned
  up when the test exits early.

GitOrigin-RevId: 2534688ae1ed4aace16d47f6f58e461e546dc8ee
2026-11-25 11:50:50 +00:00
Eric Traut 590be70f75 Fix pasting packed bitmap images on Windows (#63888)
## Why

When a packed `CF_DIBV5` bitmap stores pixels immediately after its
header, the clipboard decoder skips the first three pixels as if they
were additional color masks. This can cause a short read or shift the
image when the clipboard buffer includes trailing padding.

## What changed

For supported 32-bit `CF_DIBV5` bitmaps, supply an explicit BMP pixel
offset and enforce the decoder's allocation limits. Keep PNG as the
preferred clipboard format and handle bitmaps that repeat the color masks
before the pixels.

## Testing

Add a regression test for packed, padded, and repeated-mask bitmaps that
checks decoded RGBA values and allocation limits. The test also covers
missing pixel data.

GitOrigin-RevId: 7bb47a180584633c8a3f47c909b0e291d0003020
2026-11-25 11:50:14 +00:00
Felipe Coury 600595d67c Wait for subagent transcripts before enabling sidebar selection (#63887)
## Why

The sidebar can learn about a subagent from live activity before it can
open the transcript. During that gap, the chooser can offer a row whose
transcript is still unavailable.

## What changed

- Start transcript discovery when the TUI observes subagent activity
  and retry when the chooser opens with disabled rows.
- Keep starting and unconfirmed subagents visible but skip their rows
  during keyboard and mouse selection. Show whether an unconfirmed
  transcript is loading or unavailable once the subagent leaves
  `Starting`.
- Resolve provisional status from discovered threads, including idle
  and unloaded ones, while preserving newer live outcomes. Open
  transcript links only after discovery confirms the subagent.

## Testing

Extend TUI coverage for discovery retries, status updates arriving
during discovery, disabled row navigation and clicks, and transcript
links that wait for a follow-up refresh.

GitOrigin-RevId: e4d3b992830884532531239507083e4bd2df6687
2026-11-25 11:49:41 +00:00
psachdeva-oai 16466d9e3a Carry prompt wellbeing results through answer moderation (#63886)
## What changed

Add optional `promptWellbeingResults` to answer moderation metadata.
Each result contains the scored input item's ID, labels, and numeric
scores. Preserve the results on live agent messages and when rebuilding
thread history, and expose them in the app-server v2 schemas and Python
SDK models.

Ignore malformed wellbeing results when reading stored moderation so
the moderation decision and its display instruction can still be applied.

## Testing

Cover serialization round trips with and without a display instruction,
and verify that older moderation records without wellbeing results
deserialize.

GitOrigin-RevId: b3ed41fb529e33638eb5486bf2a22ff8b926f82a
2026-11-25 11:48:12 +00:00
Eric Traut cec14d27b5 Show the quota plan in /status (#63877)
## Why

The ChatGPT plan shown in `/status` can differ from the plan reported alongside the rate limits. Refreshing the limits could leave the card showing the old plan.

## What changed

Use the cached quota plan for new status cards when available. If a rate-limit refresh changes the plan label, update the existing card in place, including when `/status` runs before a thread starts.

## Testing

Cover a rate-limit response that changes the label from Plus to Pro 200 in terminal scrollback, copied status output, and subsequent `/status` cards.

GitOrigin-RevId: c8def774ac2b344a2bb14b5eb834dec1d07d0099
2026-11-25 10:30:05 +00:00
Eric Traut ebd0765aaf Render bidirectional text in full-screen transcripts (#63845)
## Why

The terminal's bidirectional layout was already used for scrollback, but
full-screen transcripts could still show mixed right-to-left and left-to-right
text in source order.

## What changed

Use the terminal's bidirectional layout setting in the live transcript,
history pager, and resume picker previews. Reorder each wrapped row for
display and map its screen columns back to the source graphemes. This keeps
hyperlink hit targets and search highlights aligned with the displayed text.
Mouse selection follows the displayed glyphs, while copying preserves source
order.

## Testing

Add regression coverage for mixed Arabic, Hebrew, and Latin text across
terminal widths, including link hit targets, highlights, and logical text
order. Exercise mouse and keyboard selection and verify right-to-left
rendering in the resume picker preview.

GitOrigin-RevId: ea0518ea8791d0fcc031dd0ebf306775918f373b
2026-11-25 06:40:44 +00:00
Eric Traut f0c0f0a14d Render bidirectional transcript text on terminals without native ordering (#63844)
## Why

Terminals that leave bidirectional ordering to the application can display
Arabic and Hebrew transcript text in the wrong order, especially when it
includes URLs, numbers, or inline code.

## What changed

Use the terminal's bidirectional mode report when available on a direct
connection, with a fallback for Windows Terminal, Ghostty, and Alacritty.

Resolve direction before wrapping and reorder graphemes for display in the
live transcript and scrollback. Preserve styling, hyperlink destinations,
and logical text for copying. Keep URLs and inline literals left to right,
and skip reordering for code blocks, tables, and lines with shell syntax
that could be misrepresented.

Measure hyperlink columns by painted graphemes so Arabic ligatures do not
shift clickable ranges in the transcript or composer.

## Testing

Cover agreement between streaming and finalized scrollback, preservation
of shell command boundaries, startup probe reply handling, and wrapped
composer links following Arabic text.

GitOrigin-RevId: 9ffa0f491a93c78fef423acfc6a951cb037abd4d
2026-11-25 06:40:04 +00:00
pakrym-oai ba4e278273 Raise the per-value additional context limit to 10,000 tokens (#63843)
## What changed

Increase the truncation threshold from 1,000 to 10,000 tokens so more
of each additional context value reaches the model. Add a 40 KiB bucket
boundary to the `codex.additional_context.value_bytes` histogram.

## Testing

Update the integration tests to check middle truncation and size metrics
at the new limit, verify that an application context value at the limit
survives compaction, and check that representative truncated values
fit in the new histogram bucket.

GitOrigin-RevId: 260dae5c01816e2383c10d81ddb90b8e937fd8c0
2026-11-25 06:38:46 +00:00
Eric Traut 1698314bb3 Scope TUI rate limits to the active thread's provider (#63838)
## Why

A resumed thread can use a different provider from the server default.
A successful account quota read can then show warnings and banners for
quota the thread does not use.

## What changed

Apply account quota reads and prefetch quota only when the active
provider uses account quota. Preserve remote provider definitions when
reloading local preferences, refresh custom provider definitions on
remote resume, and clear cached quota when the provider or its
definition changes.

For providers with independent quota, use turn updates for warnings and
composer notices. Keep omitted windows from sparse updates, clear the
notice when reported usage falls below the warning threshold, and omit
the `/status` hint. Limit the model-switch prompt to the built-in OpenAI
provider.

## Testing

Extend coverage for starting and resuming sessions across providers,
including an authentication change under the same provider ID. Verify
that custom-provider turn updates can show and clear a quota notice
without triggering a model-switch prompt.

GitOrigin-RevId: 4e6c95efe46ec420cee7b09d5f5a94862307530c
2026-11-25 06:20:31 +00:00
Eddie Chen 1ed2a3f22d Record root turn IDs in Guardian review analytics (#63837)
## Why

The review's `turn_id` alone can't identify the root turn of the action
being reviewed. For example, a background terminal can request network
access during a later turn.

## What changed

Add an optional `root_turn_id` to `codex_guardian_review` events. When
a verified execution tag ties a network request to a registered tool
call, use the root turn ID captured when the call started. Leave the
field unset when the reviewed action's root turn is unknown.

## Testing

Extend the MCP approval test to check the reported root turn ID. Cover
untagged network requests and verify that a cross-turn network review
reports the active turn's `turn_id` alongside the issuing turn's
`root_turn_id`.

GitOrigin-RevId: f0ae40ec4fc441891b4d843912f823a2385fa36f
2026-11-25 06:19:21 +00:00
Charlie Marsh c265acf3b1 Reduce n-gram allocations in dynamic skill selection (#63834)
## Why

Skill selection allocated strings for candidate n-grams that never
contribute to scoring because they are absent from the query.

## What changed

Deduplicate n-grams as borrowed UTF-8 slices and retain owned strings
for candidate n-grams only when they match the query. Count all
distinct n-grams toward the existing limit so filtering preserves
which n-grams are eligible for scoring.

## Testing

Add a regression test that verifies unmatched ASCII n-grams consume
the limit and that the first matching Japanese n-gram is retained.

GitOrigin-RevId: 05ec72b4f66b8a0befb5e86a077b1c9fbaac704d
2026-11-25 05:49:37 +00:00
Charlie Marsh 62f3c95af4 Skip shadow skill selection without a metrics client (#63832)
## Why

Shadow skill selection can rank skills even when no metrics client is
available to record the results.

## What changed

Create the shadow selection experiment only when a metrics client is
installed, and run it only when `shadow_selection_enabled` is also set.

## Testing

Add a regression test that enables shadow selection without a metrics
client and verifies that turns create no shadow selection state.

GitOrigin-RevId: 7913c039cb7b8135a4e7a776f47142e853dcf966
2026-11-25 05:48:26 +00:00
Charlie Marsh 3f65e9f131 Enable fixed launch directories for shared MCP REPL servers (#63821)
## What changed

Mark `mcp_shared_repl_cwd` stable and enable it by default. When
`mcp_connection_sharing` is enabled, eligible servers use the app server's
fixed launch directories.

## Testing

Update the runtime config test to assert the enabled default and verify
that disabling and re-enabling the feature removes and restores the
launch directory overrides.

GitOrigin-RevId: 37910a41bb2daee3efad8e59f214b96d61d5fd39
2026-11-25 04:07:29 +00:00
Charlie Marsh 87de5e932d Update packaged ripgrep to 16.0.0 (#63811)
GitOrigin-RevId: 96a94840b0bc00560bb52cb949de68c9a2fa9e30
2026-11-25 02:45:25 +00:00
Jackson Moody e2c31f625a Use ChatGPT account preferences for Codex voice chat (#63810)
## Why

Codex stored voice selections in `realtime.voice` and supplied voice overrides when starting realtime sessions. Reading and saving the ChatGPT account preference lets Codex use the same voice selection as ChatGPT.

## What changed

- Add experimental `account/voiceSettings/read` and `account/voiceSettings/write` methods. The terminal voice picker shows the selected voice and available display names, then saves the chosen voice ID to the connected app server's ChatGPT account, including when the server is remote.
- Require ChatGPT sign-in for terminal voice chat and create its WebRTC calls through the ChatGPT backend.
- Remove voice overrides from realtime session startup. Existing `realtime.voice` entries still parse but are ignored.

## Testing

Cover voice picker loading and saving, remote catalog failures, the ChatGPT sign-in requirement for local calls, and omission of voice overrides from realtime call payloads.

GitOrigin-RevId: 9e6f30b8020c47701d3c1604075063924f191685
2026-11-25 02:31:54 +00:00
jamy-OAI 986a6b3b11 Preserve the saved Daybreak choice across live goal continuations (#63809)
## Why

Automatic goal continuations could lose the thread's saved Daybreak
choice, even when the thread was enrolled in Daybreak propagation.

## What changed

Capture the saved choice when an externally created live goal first
becomes active. For goals created by a tool, carry forward the
originating turn's choice and preserve explicit access program
overrides.

Keep the captured choice in memory for the life of the goal and check
it against the current account and model on continuation. Changing
the thread's Daybreak setting takes effect for new goals.

## Testing

Add coverage for enrolled and opted-out threads, including blocking
a goal when the model lacks Daybreak support and starting a new goal
after turning Daybreak off. Also cover account changes and isolation
from foreground turns.

GitOrigin-RevId: 0baf08f06baf267595cb5a2b3b1fe033db52ad06
2026-11-25 02:31:14 +00:00
cooper-oai 19e95b9be8 Fix API workload identity authentication at startup and refresh (#63808)
## Why

Installing workload identity credentials at startup can revoke the network
policy already configured for them. The managed model provider also expects
a ChatGPT account identity, which API workload identity credentials lack.

## What changed

- Preserve the configured network policy while installing the initial
  credentials. Later changes in credential ownership still revoke the policy.
- Bind managed API authentication to its initial credential owner so requests
  can use renewed workload identity tokens for the same service account,
  organization, and project.

## Testing

Add regression tests for preserving network restrictions and existing permits
at startup, revoking permits when the owner changes, and rejecting header
generation and unauthorized recovery after an API key owner change, even if
the original key is selected again.

GitOrigin-RevId: 25b748863064334e622097c04d74e1fbee4b8a0b
2026-11-25 02:30:37 +00:00
smurching-oai 07963a34f2 Discover model catalogs from HTTPS gateways (#63807)
## Why

A custom gateway can serve a Codex model catalog at its existing
`/models` route. Requiring a separate `model_catalog_url` leaves that
catalog undiscovered when only `base_url` is configured.

## What changed

Probe `/models` automatically for custom providers with a query-free
HTTPS base URL and no explicit catalog URL. Use a valid Codex catalog
as the model picker inventory. If discovery fails, keep the picker
usable with an available catalog or the bundled models. Gateway login
and token refresh errors still propagate.

## Testing

Add HTTPS app-server tests that verify the authenticated
`/v1/models` request, picker population from a Codex catalog, and
fallback to bundled models for a generic OpenAI model list or a
`403` response.

GitOrigin-RevId: 654095be1c221d79d932acde8b7289bc4cad0437
2026-11-25 02:29:04 +00:00
viyatb-oai e5c2440d5e Harden SSH host checks for plugin marketplaces (#63806)
## Why

Git and SSH can interpret ambiguous remote URLs differently from the URL parser
used by the marketplace allowlist. A host pattern can therefore match a
different host from the one Git would contact.

## What changed

Validate the SSH authority and repository path before matching a
`host_pattern`. Reject ambiguous host syntax and unsafe usernames in
`ssh://` URLs, and check the host and path in scp-style `git@host:path`
remotes.

## Testing

Add regression cases that reject ambiguous remotes during marketplace add
and verify that host patterns still accept supported SSH usernames,
bracketed IPv6 addresses, and scp-style remotes.

GitOrigin-RevId: 0b7c040c0db2f2f7a802373aeb073969f48cbcd2
2026-11-25 02:14:25 +00:00
Eric Traut cb491754f6 Centralize terminal capability checks in the TUI (#63802)
## What changed

Use `terminal_capabilities` to select notification protocols, apply
Ghostty's 255-byte notification limit, and provide the focused-window
notice for notification tests. Reuse the shared tmux passthrough encoder
for OSC notifications.

Move program-status support checks and startup telemetry labels into the
same module.

## Testing

Extend the OSC 9 capability test to verify the notification body limit
for each supported terminal.

GitOrigin-RevId: ef3c9806dfafceba77cce3714073472224f1d173
2026-11-25 02:00:08 +00:00
Eric Traut 21fdf0f834 Centralize TUI image capability checks (#63801)
## What changed

Reuse shared terminal session detection and tmux passthrough escaping for
image commands. Drive image rendering with explicit checks for fullscreen
virtual placement, pixel data retention after placement removal, and
whether a protocol's images survive history insertion.

## Testing

Extend the automatic pet image protocol test to check that either `TMUX`
or `TMUX_PANE` alone requires virtual placement.

GitOrigin-RevId: 5d85e09bd9d1dcdfd01588adc8c2f0f4c6019ea1
2026-11-25 01:59:00 +00:00
Eric Traut bede3b5df8 Centralize TUI clipboard decisions in terminal capabilities (#63797)
## Why

Terminal checks for clipboard behavior are spread across the clipboard
worker, local settings, and right-click paste handling.

## What changed

Use `terminal_capabilities` to determine whether the terminal forwards
copy shortcuts or handles paste itself, whether X11 primary selection is
available, and how to send OSC 52 through tmux or GNU Screen. Have TUI
callers use the same SSH and WSL session checks.

Keep the automatic copy-on-select decision in settings and base it on
whether the terminal forwards the copy shortcut. Route tmux clipboard
copies through the client buffer with OSC 52 as a fallback.

GitOrigin-RevId: 623599783b70d66a06c52458fc82305a422cf507
2026-11-25 01:42:33 +00:00
Eric Traut 8603da0718 Centralize terminal compatibility policy in the TUI (#63793)
## What changed

Have startup and screen code consume capability decisions for inline mode,
Kitty graphics, mouse capture, session polling, and pointer reset. Keep
terminal and multiplexer detection behind the capability helpers for these
decisions.

Share stdout color detection between the CLI and standalone TUI exit
messages, and use the TUI's terminal warning helper for the CLI startup
confirmation.

## Testing

Exercise mouse-capture cleanup in separate Kitty and Ghostty test processes
and verify that each emits its expected OSC 22 reset sequence.

GitOrigin-RevId: 15cb972034397e521a97c2813628533b71539530
2026-11-25 01:27:56 +00:00
Eric Traut ebb1ff0e8b Centralize TUI terminal capability decisions (#63790)
## Why

Terminal-specific checks are spread across rendering and scrollback code.
Independent capability queries let callers share those checks without
starting unrelated terminal probes or caching live settings together.

## What changed

Move scrollback strategy, title encoding, and Markdown link display
decisions into `terminal_capabilities`. Route color detection and resize
reflow limits through the same module. Rendering and scrollback code
apply the selected modes.

GitOrigin-RevId: 6803e4b50ff5d3517efb5c07474d9ce17690e12d
2026-11-25 01:14:25 +00:00
Eric Traut 6e32b34f27 Consolidate terminal capabilities in the TUI (#63789)
## What changed

Group terminal probing and identity, keyboard modes, resize reflow, and
tmux settings and clipboard forwarding under `terminal_capabilities`.

Move pet image protocol detection and its tests into the same module
tree.

GitOrigin-RevId: 6d77b980982f6ea160b6d947760f04749352d94e
2026-11-25 01:13:41 +00:00
Eric Traut da973317bb Collapse turn details by default in the full-screen transcript (#63788)
## What changed

Summarize tool calls and collapse completed turns when
`tui.collapse_turn_details` is unset, including when the entire `[tui]`
table is absent. Set `tui.collapse_turn_details = false` to opt out.

Keep patches out of tool-call summaries so their inline diffs stay
available for review during approval. Record the configured setting at
startup with the `codex.tui.collapse_turn_details` counter.

## Testing

Update configuration tests to cover the new default and an explicit
opt-out.

GitOrigin-RevId: 8a1de12bd2a26f445bbc1eee68f31fe93fe4925a
2026-11-25 01:13:00 +00:00
Eric Traut 1ace17a02e Show a resize cursor on the TUI workspace divider (#63786)
## Why

The divider between the command center and the conversation pane is
draggable, but it lacks the resize cursor that signals this on the
sidebar divider.

## What changed

Show the resize cursor when the pointer is over the workspace divider
and keep it visible while dragging. Use the same hit test for hover and
drag start, and track sidebar divider highlighting separately from the
cursor shape. Clear workspace drag state when focus is lost or tmux
mouse support is disabled.

## Testing

Extend the workspace navigation test to cover cursor changes on hover,
press, drag, release, and focus loss, and verify that dragging moves
the divider.

GitOrigin-RevId: f63db5196bb73d28df3f341646f767394982b357
2026-11-25 00:58:35 +00:00
Eric Traut c7f0d3da0c Preserve multiline pastes without bracketed paste markers (#63785)
## Why

When a terminal sends pasted text as individual keystrokes, the TUI can
mistake a pasted newline for a submit key. This can happen after a short
Unicode prefix or after a redraw has already displayed a pasted line.

## What changed

Keep the paste detection window open after buffered text becomes visible.
Treat plain Enter within that window as a pasted newline and buffer any
following indentation with it. A single IME character still allows Enter
to submit in the regular composer.

Apply the same paste timing to startup drafts so Enter can confirm the
draft once the paste window expires. Keep newline-and-tab-only pastes
literal inside blockquotes.

## Testing

Cover multiline pastes with Unicode prefixes, tabs after pasted newlines,
and Enter handling before and after the paste window expires.

GitOrigin-RevId: e8f63dfead0cc97d44001000e961a6f6d05d4900
2026-11-25 00:57:54 +00:00