Commit Graph

9438 Commits

Author SHA1 Message Date
Ahmed Ibrahim
025a88adbd Update Python SDK runtime to 0.147.0 python-v0.147.0 2026-08-18 06:08:40 +00:00
Ahmed Ibrahim
095a07a3e1 Update PyPI publisher for metadata 2.5 2026-08-18 06:03:31 +00:00
Shijie Rao
bc7a487039 Centralize persisted resume settings lookup (#39147)
## What changed

- Add a shared helper for recovering the latest persisted approvals reviewer from turn context and thread settings history.
- Use the helper when resuming and forking threads while continuing to honor explicit request overrides.
- Fall back to an older persisted reviewer when the latest turn context omits the field.

## Testing

- Add unit coverage for settings snapshot precedence, turn context precedence, and fallback to an older reviewer.

GitOrigin-RevId: dfc0332b0f1410a4c9a550236eb32624f5133baa
2026-08-18 06:00:00 +00:00
Shijie Rao
230791fd1f Persist active permission profiles in turn context (#39145)
## What changed

- Add the optional `active_permission_profile` field to `TurnContextItem` to record the built-in or named profile that produced the effective permission profile.
- Populate the field when serializing a turn context while preserving compatibility with records where it is absent.

## Testing

- Add coverage verifying that turn-context serialization stores the active permission profile.

GitOrigin-RevId: d69142ab1b26595ab406235f89818ef41370e963
2026-08-18 05:46:08 +00:00
Matthew Zeng
de7bbb0481 Hydrate recommended plugin metadata on selection (#39143)
## What changed

- Fetch recommendations from the Codex-specific `/ps/plugins/suggested/codex` endpoint and parse its compact response shape.
- Fetch the selected plugin's details before presenting an install request, using them to verify availability and populate connector metadata.
- Skip install elicitation when the selected recommendation is no longer available, and return a retryable response when its metadata cannot be verified.

## Testing

- Cover the new recommendation route and response shape.
- Cover metadata hydration for available plugins and rejection of unavailable plugins.

GitOrigin-RevId: 2b0e2d70572aae2b7cd8e458b42e9dd14be3dbaf
2026-08-18 05:42:39 +00:00
Eric Traut
f47f77ada6 Add configurable shortcuts for the agents dashboard (#39142)
## What changed

- Add `tui.keymap.global.open_agents`, defaulting to `alt-a`, to open the shared agents overview.
- Add an `agents` keymap context for search, new task, rename, stop, and grouping actions.
- Expose the new actions in the keymap picker and render dashboard hints from the resolved bindings.
- Preserve existing custom `alt-a` bindings by disabling the new default when it would conflict.

## Testing

- Cover remapping, reserved keys, conflicts, and compatibility with existing bindings.
- Verify that configured dashboard shortcuts act on the selected filtered task.

GitOrigin-RevId: 98c48a332e06cb96dbf0e59647ce7959d45b9988
2026-08-18 05:30:11 +00:00
Adam Perry @ OpenAI
9a254ba1fa Redact auth tokens from app-server response logs (#39141)
## Why

App-server response diagnostics can include access tokens returned by the ChatGPT auth refresh flow.

## What changed

- Log successfully parsed server responses instead of raw JSON-RPC response payloads.
- Redact `access_token` from the `Debug` representation of `ChatgptAuthTokensRefreshResponse`.
- Avoid formatting callback send errors that can retain the original response payload.

GitOrigin-RevId: fd47485b38ed89527b25937c759b3273581f6ae6
2026-08-18 05:25:22 +00:00
xl-openai
5ee6baee2f Validate identifiers in plugin creator workflows (#39131)
## Why

Plugin and marketplace names can flow into generated install commands, so the
plugin creator must reject names outside the supported identifier syntax before
using them or changing files.

## What changed

- Centralize validation for plugin names, including dotted names, and marketplace
  names.
- Apply validation when reading marketplaces, validating manifests, updating
  cachebusters, and scaffolding plugins.
- Validate existing marketplace state before scaffold writes so invalid or
  duplicate entries leave plugin and marketplace files unchanged.

## Testing

Add regression tests for accepted identifiers, unsafe and malformed names,
dotted plugin names, and failure paths that must not modify files.

GitOrigin-RevId: 9db68c2313a1539c5ab44d777966e33b460ceb71
2026-08-18 03:31:06 +00:00
Charlie Marsh
f97e775693 Fail closed on deeply nested command wrappers (#39122)
## Why

Dangerous-command inspection has a bounded wrapper depth. Returning no match
after that limit could let a nested dangerous payload escape policy detection.

## What changed

- Classify commands beyond the wrapper-depth limit as dangerous.
- Cover the boundary and overflow cases in the command-safety unit tests.
- Verify that exec policy rejects a deeply `env`-wrapped forced `rm` before it
  can delete a sentinel file when approvals are disabled.

GitOrigin-RevId: a6cdbbb7bdc6274a62745f668189fabaaf46745f
2026-08-18 02:23:57 +00:00
Eric Traut
ede5247893 Reject lossy legacy permission projections (#39117)
## Why

Some managed filesystem permission profiles cannot be represented by the
legacy app-server sandbox policy without changing which paths are accessible.

## What changed

- Require legacy sandbox conversion to preserve the filesystem policy's
  semantics, and reject unsupported profiles with an actionable error.
- Keep queued follow-up messages and safety-buffered retries intact when
  permissions are rejected, resuming queued input only after a compatible
  profile is selected.
- Cover compatible profiles, lossy restrictions and write roots, turn-start
  handling, and safety-buffered retries with regression tests.

GitOrigin-RevId: 345cc2a839206b2b1997e8981feb59f91b6975cc
2026-08-18 01:00:48 +00:00
Eric Traut
ca08a58ab4 Remove the experimental thread config endpoint (#39115)
## What changed

- Remove `experimental_thread_config_endpoint` from the configuration model and schema.
- Stop app-server and the in-process client from constructing a remote thread config loader from local configuration.
- Keep the thread config loader supplied at app-server startup fixed for the lifetime of the config manager.

GitOrigin-RevId: e7907fee2d631e7ecf89ec6bac8f22bc2c221350
2026-08-18 00:45:00 +00:00
Eric Traut
fd5018e044 Add a dedicated codex agents dashboard command (#39114)
## What changed

- Add `codex agents` to open the shared agents overview without creating a new session.
- Start the local background app server automatically on Unix, or connect to a server supplied with `--remote`.
- Reject invocation-specific session overrides that cannot apply to shared sessions.
- When the overview is opened from an embedded session, offer to start the background server without moving or interrupting the current session.

## Testing

- Cover command-line parsing and rejection of incompatible overrides.
- Snapshot the embedded-session background-server prompt.

GitOrigin-RevId: 60845dfebc48d820dc4ff090626d30452127f062
2026-08-18 00:31:51 +00:00
guinness-oai
13dfaab446 Surface interactive requests in realtime conversations (#39113)
## What changed

- Mirror execution, permission, and patch approval requests into active realtime conversations with a prompt to review them in the app.
- Mirror user-input and elicitation requests with a prompt to respond in the app.
- Include the serialized request event so the realtime handoff retains the request details.

GitOrigin-RevId: 56fefa70b9ecaaad2fcf83592f20e8b4514a004a
2026-08-17 23:54:51 +00:00
Eric Traut
319b2f72b1 Make the agents overview an interactive task dashboard (#39112)
## What changed

- Let users start tasks, open root sessions, rename tasks, and stop active work directly from the agents overview.
- Show details for the selected task on wide terminals and limit the overview to root sessions while still reflecting background activity.
- Preserve draft input and pending server requests when switching sessions so running roots and their subagents can continue in the background.
- Apply the selected project's working directory when dispatching from project grouping, including remote workspaces.

## Testing

- Expand overview rendering and interaction coverage for root filtering, dispatch, search, selection, renaming, and responsive input.
- Cover switching away from roots with running subagents and retaining background server requests.

GitOrigin-RevId: b7b0d33b7ecc077498efb756a0ad2fd425158b17
2026-08-17 23:47:55 +00:00
Eric Traut
632420e67a Drop capabilities from Linux sandbox processes (#39103)
## What changed

- Pass `--cap-drop ALL` in both bubblewrap launch modes.
- Verify in the inner sandbox stage that the effective and permitted Linux
  capability sets are empty, and abort before executing the command otherwise.
- Cover the generated bubblewrap arguments, capability state of sandboxed
  commands, and rejection of a capability-bearing inner-stage process.

GitOrigin-RevId: 9dbd651d306d92327e36c9b3f308619db7d80a67
2026-08-17 23:21:28 +00:00
Celia Chen
2eee483e49 Raise the GPT-5.6 maximum context window (#39102)
## What changed

- Allow `gpt-5.6-sol`, `gpt-5.6-terra`, and `gpt-5.6-luna` context-window overrides up to 872,000 tokens.
- Build the corresponding Amazon Bedrock entries from each bundled model's metadata while preserving Bedrock-specific identifiers, availability, tool, reasoning, and service-tier settings.

## Testing

- Cover long-context override clamping for bundled and Amazon Bedrock GPT-5.6 models.
- Verify the normalized Amazon Bedrock catalog metadata and context limits.

GitOrigin-RevId: 9f530dee501222a4d280bb31bbcdc2dacbe35d7d
2026-08-17 23:08:26 +00:00
thomas
7500ab4c8d Update rmcp to 3.1.2 (#39101)
## What changed

- Upgrade `rmcp` from 3.0.0 to 3.1.2.
- Use `rmcp`'s native JSON-RPC decoding and remove the local compatibility layer for multi-round-trip tool results.
- Preserve response metadata on `input_required` SSE results.
- Support OAuth protected-resource metadata discovery and include the discovered resource audience when refreshing tokens.

## Testing

- Add coverage for metadata preservation on modern SSE `input_required` responses.
- Add an OAuth startup scenario that discovers protected-resource metadata and verifies the refresh-token resource audience.

GitOrigin-RevId: 689f009b4a33552b640304111b74585b4009eeb8
2026-08-17 23:04:09 +00:00
Tamir Duberstein
050aa077b5 Avoid redundant terminal size queries during history insertion (#39100)
## What changed

- Pass the screen size already available to TUI draw and history-tail paths into history insertion.
- Use the terminal's cached screen size for direct history insertion calls instead of querying the backend again.
- Extend the terminal size-query regression test to cover history insertion.

GitOrigin-RevId: 44c7a0f0bc5bc365d8d0c72d7e26587ed17a4821
2026-08-17 22:58:25 +00:00
Ben Romano
fd34ad7297 Trace exec-server requests from receipt through completion (#39098)
## What changed

- Start inbound exec-server request spans when messages enter the connection queue and carry them through dispatch and response handling.
- Record request outcomes for client-handled network policy callbacks, including errors and disconnections.
- Add the `exec_server_request_queue_duration_seconds` histogram, labeled by bounded route name, while excluding synchronous route setup time.

## Testing

- Cover span lifetime and trace-parent propagation across server and client queues.
- Verify queue-duration telemetry and outcome recording for completed, rejected, and cancelled requests.

GitOrigin-RevId: ed67fe5305048bdf283a26ec874337d549e3324f
2026-08-17 22:53:55 +00:00
Eric Traut
4617d4d21d Add an agents overview dashboard to the TUI (#39094)
## What changed

- Add `/agents` to open a full-screen dashboard of loaded root sessions from the shared app server, with subagent status reflected in each root session.
- Support search, navigation, and grouping sessions by project or status.
- Refresh the dashboard when relevant thread notifications arrive, while preserving its selection and view preferences.
- Show a clear message when the dashboard is unavailable with the embedded app server.

## Testing

- Add coverage for dashboard rendering, status grouping, persisted view state, and restoring the conversation viewport after closing the dashboard.
- Cover `/agents` command discovery and dispatch from parent-owned threads.

GitOrigin-RevId: 6651f4c47358116e1809da3ac8844a5842026a95
2026-08-17 22:50:25 +00:00
Eric Traut
83d015375e Add a command to queue messages for existing sessions (#39092)
## What changed

- Add `codex queue --thread <THREAD> --message <TEXT>` to submit a text message through the `thread/queue/add` app-server API.
- Resolve active sessions by UUID or exact name across interactive, exec, and custom sources, and reject ambiguous names.
- Support local and explicit remote app servers while reporting incompatible servers and configuration overrides instead of silently changing the target.
- Reject empty messages and image attachments.

## Testing

- Add CLI coverage for remote submission, validation, unsupported servers, and local-daemon routing.
- Add session lookup and queue tests for stale, non-interactive, custom, and duplicate session names.

GitOrigin-RevId: 44c233f752b63a85c85b92fa6da303336e4ddeca
2026-08-17 22:44:37 +00:00
Eric Traut
31f23b6022 Clarify the external contribution policy (#39089)
## Why

Community expertise is most useful when shared through detailed issue reports, reproduction steps, logs, analysis, and design discussion. Reviewing external code changes requires broader architectural and roadmap context and can divert maintainers from higher-priority work.

## What changed

- State that external code contributions and pull requests are not accepted.
- Replace invited-contributor workflow and CLA guidance with instructions for reporting bugs and requesting features through the issue tracker.
- Remove the pull request template and align the ChatGPT crate guidance with the repository-wide policy.
- Direct vulnerability reports to the security policy.

GitOrigin-RevId: 736c0cb181e07cc751bc46f4fefc53c6964e3dab
2026-08-17 22:37:14 +00:00
Eric Traut
0c14c73471 Harden TUI subagent navigation (#39088)
## What changed

- Use `/subagents` consistently for the subagent picker and status UI, removing the `/agent` alias.
- Rejoin already-loaded subagent threads without overriding their existing settings.
- Route notifications and approval requests only to the active thread or its known subagents, discard unrelated startup events, and avoid replaying resolved approvals.

## Testing

- Add coverage for filtering buffered startup events, dropping resolved approvals, preserving owned subagent approvals, and resuming threads without setting overrides.

GitOrigin-RevId: b4e597f7cd4756faccf31d8b964e7a172f5ab0eb
2026-08-17 22:31:13 +00:00
willwang-openai
fc6268ad38 Read plugin authentication state from AuthManager (#39087)
## What changed

- Give `PluginsManager` a shared `AuthManager` instead of a separately mutable authentication-mode snapshot.
- Read the current authentication mode and credentials from that shared manager for plugin discovery, startup tasks, CLI commands, MCP setup, and external-agent migration.
- Update test helpers and coverage to exercise plugin projections and curated marketplace selection as authentication changes.

GitOrigin-RevId: 600c94de5130eda2da5727e1a0b4d39083fefc56
2026-08-17 22:26:27 +00:00
iceweasel-oai
2013e04354 Preserve filesystem permission path conventions (#39084)
## Why

Filesystem permission paths can use a convention that differs from the host
running Codex. Converting them immediately to native absolute paths can change
the meaning of ambiguous paths such as `/C:/secret` or Windows UNC paths.

## What changed

- Store literal filesystem permission paths as `PathUri` values through the
  runtime policy and execution protocol.
- Keep legacy string-based serialization at explicit protocol boundaries and
  reject conversions that cannot be represented losslessly.
- Encode native paths as opaque URIs when a normal file URI would imply the
  wrong path convention.

## Testing

Added coverage for cross-platform and ambiguous path round trips, UNC path
variants, permission-profile serialization, and deny-policy enforcement.

GitOrigin-RevId: 5247713796d1f2bb4e02f94eb9fc82d4698060f0
2026-08-17 21:49:30 +00:00
iceweasel-oai
a4f37a5b7f Harden Windows sandbox provisioning against reparse points (#39083)
## Why

Elevated provisioning can apply ACLs beneath a user-supplied `CODEX_HOME`.
Following a directory junction or another reparse point could apply those ACLs
to a different directory than the one provisioning intended to secure.

## What changed

- Require provisioning paths to be absolute paths on a local Windows disk.
- In provision-only mode, open or create sandbox directories with
  `OBJ_DONT_REPARSE` and keep the resulting handle open while applying ACLs
  with `SetSecurityInfo`.
- Reject reparse points in both the final directory and its ancestors while
  preserving the existing path-based behavior for full setup.

## Testing

Add Windows tests covering plain directory creation and rejection of junctions
at both the leaf and ancestor levels.

GitOrigin-RevId: d165b8b3685c89bc171e4d58c63c739fa9fb2cf9
2026-08-17 21:10:58 +00:00
Eric Traut
34e4823a1d Prompt for project trust in remote TUI workspaces (#39082)
## What changed

- Query the remote app server for project config layers before starting a thread and show the trust prompt when the project has no existing decision.
- Resolve relative remote working directories and repository-root trust targets, then persist accepted trust through `config/batchWrite` on the remote server.
- Preserve existing trusted and untrusted decisions, including an untrusted repository that contains the requested working directory.
- Exit when the remote trust prompt is declined and ignore repeated key events in the trust selector.

## Testing

- Add coverage for remote trust detection, persistence, thread startup, existing decisions, nested untrusted projects, and rendering a remote Git subdirectory.

GitOrigin-RevId: e5fba2ea23bad1fb28f01df522cadbe05fcbb942
2026-08-17 21:06:34 +00:00
Tamir Duberstein
9c099e94a2 Bound TUI thread replay buffers by delta size (#39081)
## Why

The per-thread replay buffer limited its event count, but streamed agent-message
deltas could still retain an unbounded amount of text while a thread was
inactive.

## What changed

- Coalesce adjacent deltas for the same thread, turn, and item into chunks of up
  to 4 KiB.
- Limit buffered agent-message deltas to 256 KiB, discard a single delta larger
  than that limit, and evict the oldest events when either buffer limit is
  exceeded.
- Keep pending input and approval state in sync when eviction removes the
  corresponding request, including clearing side-thread status indicators.

## Testing

Added coverage for delta coalescing, byte-based eviction, oversized deltas,
replaying only retained text, and side-thread status updates after eviction.

GitOrigin-RevId: 88d85353a124467d467822d2fd9854312b68d547
2026-08-17 21:03:06 +00:00
jif
8ef139667f Apply user MCP policy to selected executor plugins (#39079)
## What changed

- Resolve MCP server policy directly from the effective user configuration for selected executor-plugin roots.
- Apply server enablement, tool allow/deny lists, and default and per-tool approval modes while preserving stricter plugin-declared restrictions.
- Cover policy merging and opaque selected-root IDs in the executor-plugin MCP integration tests.

GitOrigin-RevId: dce3021969ba71e642de52312449cab6277515c3
2026-08-17 20:55:04 +00:00
Ben Romano
911335eed3 Preserve tracing context for environment resolution (#39078)
## What changed

- Add spans for environment resolution, readiness waits, and environment info,
  including fields for the selected environment and resolution state.
- Propagate the active span and tracing subscriber into spawned resolution,
  startup, and shell-snapshot tasks.
- Verify that blocking snapshots retain the expected nested environment spans.

GitOrigin-RevId: 3c47e9ec1ebf45dbe1250b9ff76e2983d2a8df2a
2026-08-17 20:51:38 +00:00
Benjamin Carlsson
e92627bf7e Build filesystem JSON params only for remote TUI sessions (#39077)
## Why

In-process app-server filesystem requests use typed protocol requests and do
not need JSON-RPC parameters.

## What changed

Pass remote filesystem parameters to `request_fs_path` as closures and
evaluate them only when the session uses a remote request handle.

GitOrigin-RevId: 623c8733542553d73e2c0e4c4a60d40258bc91c1
2026-08-17 20:46:43 +00:00
Tamir Duberstein
37efa18be2 Avoid redundant terminal row clears (#39075)
## Why

The custom TUI buffer diff emitted `ClearToEnd` for unchanged trailing blank
regions, producing unnecessary terminal output.

## What changed

- Clear a row tail only when its cached contents changed or a wide glyph overlaps
  the clear boundary.
- Keep blank cells marked `AlwaysUpdate` in the drawable region so viewport
  invalidation still forces them to repaint.
- Preserve Ratatui's native cell diff behavior for the remaining updates.

## Testing

Add coverage for unchanged row tails, forced blank-cell updates, and shrinking
wide graphemes, including half-width katakana with combining marks.

GitOrigin-RevId: a9cac06f5624032a2b8c80a66c651cf3e85ec7fb
2026-08-17 20:43:12 +00:00
chess
d65d315939 Add desktop update diagnostics to codex doctor (#39074)
## What changed

- Probe the installed desktop app's update endpoint on macOS and Windows and report update-CDN reachability alongside the existing network diagnostics.
- Report newer Windows Store builds and macOS updates that Sparkle has staged for installation in the updates check and human-readable notes.
- Validate Windows update manifests against the production app identity, and use the persisted production appcast configuration when selecting the macOS feed.

## Testing

- Cover Windows version comparison and manifest identity validation.
- Cover macOS appcast selection and staged-bundle discovery.
- Verify the human-readable desktop update note.

GitOrigin-RevId: 1af5aa750144346b4b31f2b27a20371daf40d3c0
2026-08-17 20:39:35 +00:00
Ben Romano
45cf6cbc19 Propagate caller metadata to rendezvous connections (#39073)
## What changed

- Add `x-cluster-name` from `OPENAI_CLUSTER` and
  `x-openai-internal-caller` from `DD_SERVICE` to rendezvous WebSocket
  handshakes when the environment values are nonempty and valid HTTP header
  values.
- Apply the rendezvous headers to both client and remote executor connections
  while preserving the existing W3C trace context headers.

GitOrigin-RevId: fead0244ba24fa208990b92d2170a9ae76ff2ceb
2026-08-17 20:36:10 +00:00
Andrew Wilkes
682f57254f Persist generated images through turn executors (#39072)
## Why

Image generation did not save its result when the extension host did not provide a host-local save root.

## What changed

- Save generated images under the turn environment's `generated_images` directory through its sandboxed filesystem executor when no host save root is configured.
- Limit executor-written images to 32 MiB, reject symlinked output directories and existing destinations, and continue returning the image if persistence fails.
- Include the saved workspace path in the tool output hint while preserving host-managed persistence when a save root is available.

## Testing

- Extend the granted-turn-permissions integration test to verify the image and path hint are written to the turn workspace without creating a host-local artifact.

GitOrigin-RevId: 3d24381a75fe4595641b5250e19fac8ed473b2cd
2026-08-17 20:32:41 +00:00
felixxia-oai
d24507a59b Remove skill model delegation support (#39068)
## What changed

- Stop parsing and exposing the `model` field from skill frontmatter.
- Remove the skill model delegation types and instruction generation.

GitOrigin-RevId: 01198c68c095da5062e8abec417cc3539099d9d5
2026-08-17 20:19:04 +00:00
chess
51a9edc083 Add desktop security enforcement diagnostics (#39067)
## What changed

- Add a `desktop.security.enforcement` doctor check for macOS that assesses the app with Gatekeeper and classifies recent Gatekeeper and XProtect events.
- Add the same check on Windows by inspecting recent Microsoft Defender, AppLocker, and Windows App Control events for Codex executables.
- Report blocked or quarantined executions as failures, audit-only or unavailable evidence as warnings, and include actionable remediation while bounding and redacting collected event details.

## Testing

- Add coverage for platform event classification, trusted executable matching, unavailable diagnostics, remediation, and bounded redacted evidence.

GitOrigin-RevId: 792844390cd2cf92d3bc20e6a0973020b4364e51
2026-08-17 20:15:37 +00:00
Charlie Marsh
d327527a3d Limit terminal hyperlink layout to the visible viewport (#39065)
## What changed

- Skip hyperlink layout for wrapped rows above the scroll offset and stop once
  processing reaches the bottom of the viewport.
- Resolve each rendered link destination once while marking its visible cells.
- Add coverage for hyperlinks that span visible wrapped rows after scrolling.

GitOrigin-RevId: c1506d47fa3f1b895966dc2cde7d5b859c201792
2026-08-17 20:06:41 +00:00
Benjamin Carlsson
1aa3a68e7b Restrict queued-message editing to its dedicated binding (#39064)
## What changed

- Stop treating Vim normal-mode history-up as an alias for editing the latest queued message.
- Continue to edit queued messages through the configured `chat.edit_queued_message` binding.

GitOrigin-RevId: d830e0976a38725e948d420c1a5f374bb13fe945
2026-08-17 20:02:50 +00:00
Charlie Marsh
b6e153c985 Render only visible rows in the transcript pager (#39063)
## Why

Scrolling the transcript pager previously rendered a scratch buffer containing
all rows through the visible viewport, including hidden content above it. This
made rendering work and buffer size grow with the scroll offset.

## What changed

- Add viewport-aware rendering for committed transcript cells and the live tail.
- Forward scrolled rendering through cached and inset renderables while keeping
  the full-height fallback for renderables that do not support it.
- Keep hyperlink metadata aligned with scrolled text.

## Testing

Add coverage comparing viewport-aware output with the full-height fallback
across wrapping widths, offsets, insets, styles, hyperlinks, and live tails.

GitOrigin-RevId: 630c30c4a61969a50f2b34701ca1dd87788a4298
2026-08-17 19:59:22 +00:00
Charlie Marsh
386a7b629c Avoid rerendering streamed code fences (#39061)
## Why

The streaming TUI rerendered the entire mutable Markdown block whenever a
newline-bearing delta arrived. For long fenced code blocks, this repeatedly
parsed and syntax-highlighted the growing fence.

## What changed

- Detect open, top-level, language-tagged code fences and append newly
  completed lines directly to the existing render.
- Preserve Syntect parser state across appended lines so multiline syntax and
  the active theme remain consistent.
- Fall back to the canonical Markdown renderer for ambiguous fence syntax,
  theme changes, incomplete lines, and highlighting limit transitions.

## Testing

Added coverage that compares streamed output with full renders across syntax
styles, Unicode, links, blank lines, fence variants, theme changes, and
highlighting limits. A long-fence test also verifies that the rendered prefix
is retained as new lines arrive.

GitOrigin-RevId: 036db2b7bc93607083b8001f8b4fa3cbb58c713e
2026-08-17 19:49:47 +00:00
chess
80e925c28b Add desktop app diagnostics to codex doctor (#39060)
## What changed

- Detect installed Codex desktop apps on macOS and Windows and report their version, running state, and redacted log location.
- Inspect bounded log data for the active desktop session and report the latest local app-server handshake outcome without exposing other log fields.
- Add a dedicated Desktop App section to human-readable doctor reports.

## Testing

- Cover local versus remote handshakes, failed handshakes with sensitive fields, bounded log reads, and stopped desktop sessions.

GitOrigin-RevId: ecfb4bd7af3589263624771ec9413b51953280eb
2026-08-17 19:43:09 +00:00
thomas
14973840e0 Tag Codex Apps protocol discovery metrics (#39058)
## What changed

Add `server_kind=openai_codex_apps` to the
`codex.mcp.protocol_discovery` counter and its duration metric when protocol
discovery runs for the Codex Apps MCP server. Other MCP servers retain the
existing `mode` and `outcome` tags.

GitOrigin-RevId: aadbdc54642f2c103a9f1bab39308e962c115f75
2026-08-17 19:38:18 +00:00
Tamir Duberstein
796325f1e5 Rate-limit TUI frames from their actual emission time (#39057)
## Why

Recording a late frame's requested deadline as its emission time can leave the
rate limiter with a stale timestamp, allowing the next frame to be emitted
immediately in a redraw burst.

## What changed

Record the current time when the frame scheduler sends a draw notification so
the 120 FPS limit is measured from the actual emission.

## Testing

Add a paused-time regression test that submits an overdue draw and verifies the
next frame waits for `MIN_FRAME_INTERVAL`.

GitOrigin-RevId: 8c9a5ac0bf858b2ad87838f6d7c67c9470fdfc61
2026-08-17 19:34:05 +00:00
Charlie Marsh
afb1b3c984 Verify the pinned zsh manifest in release builds (#39056)
## Why

Release jobs download the `codex-zsh` manifest before packaging or signing its
bundled binaries. Verify that download against a pinned digest so an unexpected
manifest cannot enter release artifacts.

## What changed

- Pin the SHA-256 digest for the `codex-zsh-v0.1.0` manifest.
- Add a portable verification script that uses `sha256sum` or macOS `shasum`.
- Run verification in both the package archive and macOS helper signing flows.

GitOrigin-RevId: a404bb897c8cc0bf3c0ff38e8a6e1cce059d7fab
2026-08-17 19:30:38 +00:00
sayan-oai
4a7b51c560 Add network policy metadata to environment configuration (#39055)
## What changed

- Add `EnvironmentNetworkPolicy` as a serializable view of portable domain,
  Unix-socket, upstream-proxy, and local-binding restrictions without exposing
  controller-owned proxy runtime settings.
- Add an optional `network_policy` field to `EnvironmentConfig` and re-export
  the policy and related permission types through the core APIs.
- Reject owner-provided network policies during environment preview and
  readiness until runtime enforcement is implemented, while preserving the
  existing controller policy when the field is absent.

## Testing

- Cover rejection through both environment preview and readiness, including
  preservation of the existing environment selection.

GitOrigin-RevId: 80ad4cf4d4a45632daa7a823e6cf568eb0e8bb80
2026-08-17 19:22:45 +00:00
Charlie Marsh
fe5889928c Use installed callable apps for TUI mentions (#39051)
## Why

The app directory is a discovery catalog and can include apps that are not
callable in the active thread. Using it for `$` suggestions can therefore
offer mentions that cannot be used.

## What changed

- Load mention candidates from `app/installed`, enrich callable apps through
  bounded `app/read` batches, and retain compatibility with app servers that
  do not support `app/installed`.
- Keep the mention catalog separate from the `/apps` directory cache and scope
  results to the current thread, workspace, and account.
- Refresh mentions after app notifications, enablement changes, configuration
  updates, and apps MCP readiness, while immediately removing disabled apps.

## Testing

Add coverage for batching and fallback behavior, stale scoped results,
notification refreshes, enablement changes, MCP startup races, and filtering
non-callable apps from mentions.

GitOrigin-RevId: 4d9e20794aed30cc97120170792fb555b86fe1e7
2026-08-17 19:11:34 +00:00
Felipe Coury
d7d526b81d Prepare the telemetry shutdown worker during initialization (#39050)
## Why

Creating the telemetry shutdown thread during shutdown can fail under resource
pressure, including when the native thread guard page cannot be allocated.

## What changed

- Start and verify a dedicated shutdown worker when `OtelProvider` is created.
- Send the provider to the prepared worker for bounded shutdown, while preserving
  timeout behavior and avoiding a potentially blocking destructor if worker
  preparation failed.
- Rename the fallible provider constructor to `try_new`.

## Testing

Add Unix regression coverage that injects guard-page allocation failures, plus
coverage for worker preparation failure, successful shutdown, and timeouts.

GitOrigin-RevId: 3656298078a800a7fa392437c2ee4a68753092e3
2026-08-17 19:06:53 +00:00
Benjamin Carlsson
1a8bac9405 Avoid rendering sub-agent activity twice in the TUI (#39049)
## Why

The app server sends sub-agent activity in both item-started and item-completed
notifications, causing the TUI to add the same activity to history twice.

## What changed

Render live sub-agent activity when the item completes instead of also rendering
it when the item starts. Preserve the existing replay behavior.

## Testing

Add a regression test that sends matching started and completed notifications
and verifies that the activity produces one history cell.

GitOrigin-RevId: 76a66f3657fe297f37067ed672ab9642997b4499
2026-08-17 19:02:05 +00:00
Charlie Marsh
0c901fd141 Skip plugin hook loading when hooks are disabled (#39047)
## What changed

Gate plugin hook resolution in `hooks/list` on both the hooks and plugins
feature flags. When hooks are disabled, return the default empty plugin hook
outcome without loading plugin hook sources or warnings.

GitOrigin-RevId: 166070576effaba248b790c4f2a47e6e9a7b1112
2026-08-17 18:54:49 +00:00