Commit Graph
5350 Commits
Author SHA1 Message Date
Eric Traut 20ffdd0a21 Merge branch 'main' into etraut/messages 2026-04-12 16:11:12 -07:00
Dylan Hurd 68a1d82a41 fix(mcp) pause timer for elicitations (#17566)
## Summary
Stop counting elicitation time towards mcp tool call time. There are
some tradeoffs here, but in general I don't think time spent waiting for
elicitations should count towards tool call time, or at least not
directly towards timeouts.

Elicitations are not exactly like exec_command escalation requests, but
I would argue it's ~roughly equivalent.

## Testing
- [x] Added unit tests
- [x] Tested locally
2026-04-12 16:06:17 -07:00
Eric Traut 46ab9974dc Expose instruction sources (AGENTS.md) via app server (#17506)
Addresses #17498

Problem: The TUI derived /status instruction source paths from the local
client environment, which could show stale <none> output or incorrect
paths when connected to a remote app server.

Solution: Add an app-server v2 instructionSources snapshot to thread
start/resume/fork responses, default it to an empty list when older
servers omit it, and render TUI /status from that server-provided
session data.

Additional context: The app-server field is intentionally named
instructionSources rather than AGENTS.md-specific terminology because
the loaded instruction sources can include global instructions, project
AGENTS.md files, AGENTS.override.md, user-defined instruction files, and
future dynamic sources.
2026-04-12 15:50:12 -07:00
Eric Traut 470510174b Remove context status-line meter (#17420)
Addresses #17313

Problem: The visual context meter in the status line was confusing and
continued to draw negative feedback, and context reporting should remain
an explicit opt-in rather than part of the default footer.

Solution: Remove the visual meter, restore opt-in context remaining/used
percentage items that explicitly say "Context", keep existing
context-usage configs working as a hidden alias, and update the setup
text and snapshots.
2026-04-12 15:42:09 -07:00
Felipe Coury 0393a485ed feat(tui): add reverse history search to composer (#17550)
## Problem

The TUI had shell-style Up/Down history recall, but `Ctrl+R` did not
provide the reverse incremental search workflow users expect from
shells. Users needed a way to search older prompts without immediately
replacing the current draft, and the interaction needed to handle async
persistent history, repeated navigation keys, duplicate prompt text,
footer hints, and preview highlighting without making the main composer
file even harder to review.


https://github.com/user-attachments/assets/5165affd-4c9a-46e9-adbd-89088f5f7b6b

<img width="1227" height="722" alt="image"
src="https://github.com/user-attachments/assets/8bc83289-eeca-47c7-b0c3-8975101901af"
/>

## Mental model

`Ctrl+R` opens a temporary search session owned by the composer. The
footer line becomes the search input, the composer body previews the
current match only after the query has text, and `Enter` accepts that
preview as an editable draft while `Esc` restores the draft that existed
before search started. The history layer provides a combined offset
space over persistent and local history, but search navigation exposes
unique prompt text rather than every physical history row.

## Non-goals

This change does not rewrite stored history, change normal Up/Down
browsing semantics, add fuzzy matching, or add persistent metadata for
attachments in cross-session history. Search deduplication is
deliberately scoped to the active Ctrl+R search session and uses exact
prompt text, so case, whitespace, punctuation, and attachment-only
differences are not normalized.

## Tradeoffs

The implementation keeps search state in the existing composer and
history state machines instead of adding a new cross-module controller.
That keeps ownership local and testable, but it means the composer still
coordinates visible search status, draft restoration, footer rendering,
cursor placement, and match highlighting while `ChatComposerHistory`
owns traversal, async fetch continuation, boundary clamping, and
unique-result caching. Unique-result caching stores cloned
`HistoryEntry` values so known matches can be revisited without cache
lookups; this is simple and robust for interactive search sizes, but it
is not a global history index.

## Architecture

`ChatComposer` detects `Ctrl+R`, snapshots the current draft, switches
the footer to `FooterMode::HistorySearch`, and routes search-mode keys
before normal editing. Query edits call `ChatComposerHistory::search`
with `restart = true`, which starts from the newest combined-history
offset. Repeated `Ctrl+R` or Up searches older; Down searches newer
through already discovered unique matches or continues the scan.
Persistent history entries still arrive asynchronously through
`on_entry_response`, where a pending search either accepts the response,
skips a duplicate, or requests the next offset.

The composer-facing pieces now live in
`codex-rs/tui/src/bottom_pane/chat_composer/history_search.rs`, leaving
`chat_composer.rs` responsible for routing and rendering integration
instead of owning every search helper inline.
`codex-rs/tui/src/bottom_pane/chat_composer_history.rs` remains the
owner of stored history, combined offsets, async fetch state, boundary
semantics, and duplicate suppression. Match highlighting is computed
from the current composer text while search is active and disappears
when the match is accepted.

## Observability

There are no new logs or telemetry. The practical debug path is state
inspection: `ChatComposer.history_search` tells whether the footer query
is idle, searching, matched, or unmatched; `ChatComposerHistory.search`
tracks selected raw offsets, pending persistent fetches, exhausted
directions, and unique match cache state. If a user reports skipped or
repeated results, first inspect the exact stored prompt text, the
selected offset, whether an async persistent response is still pending,
and whether a query edit restarted the search session.

## Tests

The change is covered by focused `codex-tui` unit tests for opening
search without previewing the latest entry, accepting and canceling
search, no-match restoration, boundary clamping, footer hints,
case-insensitive highlighting, local duplicate skipping, and persistent
duplicate skipping through async responses. Snapshot coverage captures
the footer-mode visual changes. Local verification used `just fmt`,
`cargo test -p codex-tui history_search`, `cargo test -p codex-tui`, and
`just fix -p codex-tui`.
2026-04-12 19:32:19 -03:00
Ahmed Ibrahim d840b247d7 Mirror user text into realtime (#17520)
- Let typed user messages submit while realtime is active and mirror
accepted text into the realtime text stream.
- Add integration coverage and snapshot for outbound realtime text.
2026-04-12 15:03:14 -07:00
viyatb-oaiandCodex cb870a169a fix(sandboxing): reject WSL1 bubblewrap sandboxing (#17559)
## Summary

- detect WSL1 before Codex probes or invokes the Linux bubblewrap
sandbox
- fail early with a clear unsupported-operation message when a command
would require bubblewrap on WSL1
- document that WSL2 follows the normal Linux bubblewrap path while WSL1
is unsupported

## Why

Codex 0.115.0 made bubblewrap the default Linux sandbox. WSL1 cannot
create the user namespaces that bubblewrap needs, so shell commands
currently fail later with a raw bwrap namespace error. This makes the
unsupported environment explicit and keeps non-bubblewrap paths
unchanged.

The WSL detection reads /proc/version, lets an explicit WSL<version>
marker decide WSL1 vs WSL2+, and only treats a bare Microsoft marker as
WSL1 when no explicit WSL version is present.

addresses https://github.com/openai/codex/issues/16076

---------

Co-authored-by: Codex <noreply@openai.com>
2026-04-12 14:08:14 -07:00
Eric Traut ccd5b7e279 codex: document injected message event payload 2026-04-12 14:00:22 -07:00
Eric Traut 67df6c09b3 codex: document injected message event scope 2026-04-12 14:00:22 -07:00
Eric Traut 2206269fe4 codex: clarify detached pending scheduler task 2026-04-12 14:00:22 -07:00
Eric Traut 21cab96f20 codex: simplify pending input metadata 2026-04-12 14:00:22 -07:00
Eric Traut 78ae59d7e2 codex: simplify injected message handling 2026-04-12 14:00:22 -07:00
Eric Traut 3dc073acdb codex: rename injected message module 2026-04-12 14:00:22 -07:00
Eric Traut cd1f0fd41b codex: address injected message review feedback 2026-04-12 14:00:22 -07:00
Eric Traut df296d0f9d codex: remove unrelated guardian test change 2026-04-12 14:00:22 -07:00
Eric Traut 7a08d53b2d codex: address PR review feedback (#17380) 2026-04-12 14:00:06 -07:00
Eric Traut 35250b86b5 Remove delayed codex queue support 2026-04-12 14:00:06 -07:00
Eric Traut c3582c8d9d Simplify injected message envelopes 2026-04-12 14:00:06 -07:00
Eric Traut f2b9318ea1 Remove timer chatwidget tests 2026-04-12 14:00:06 -07:00
Eric Traut d0fa8a1292 Document cross-instance timer delivery claims 2026-04-12 14:00:06 -07:00
Eric Traut be227df76e Restore best-effort archive delivery cleanup 2026-04-12 14:00:06 -07:00
Eric Traut a68c825911 codex: address PR review feedback (#17380) 2026-04-12 14:00:06 -07:00
Eric Traut 056135fa05 codex: fix CI failure on PR #17380 2026-04-12 14:00:06 -07:00
Eric Traut 668325efde codex: address PR review feedback (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut c2b92ccf40 Harden timer integration test waits 2026-04-12 14:00:05 -07:00
Eric Traut bb13e4a0d1 codex: enforce timer db cap in core (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 2874c0fdac codex: enforce queue timer limit (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 517cfb769e codex: use literal windows timer ignore reason (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut c7968f0ead codex: clean up queue rows for archived threads (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 8211c56154 codex: stabilize queued mail pending input test (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 667d2a2d95 codex: keep timer runtime on delete failure (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut b6ab1b1e5f codex: avoid windows timer integration timeout (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut fc6dd9bb00 codex: stabilize timer integration tests (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 520e3b091e codex: stabilize resume timer history regression (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 6fe44104f3 codex: restore timers after resume history replay (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 108679a91f codex: respect ephemeral timer storage mode (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 548b035edc codex: stabilize queued message timer tests (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut 4f33051313 codex: address recurring timer message starvation (#17380) 2026-04-12 14:00:05 -07:00
Eric Traut dfb83d6a4c codex: address recurring timer restart review (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut 529b855d60 codex: fix overdue one-shot timer claim on restart (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut 9976a36c39 codex: stabilize queued message timer test (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut 70edc61fde codex: fix timer runtime clippy lint (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut b4f738def9 codex: stabilize queued message timer ordering (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut b19709c649 codex: preserve exhausted schedule restore state (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut 0d00ec0f8d codex: delete exhausted recurring timers (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut 5bdc7b59c6 codex: fix state argument lint (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut 15bfff63f3 codex: validate queue thread names (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut 86361563a2 codex: fix timer tool argument lint (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut 08554a2378 codex: address queue and timer race feedback (#17380) 2026-04-12 14:00:04 -07:00
Eric Traut 6e0ba130a7 codex: prevent idle timer message starvation (#17380) 2026-04-12 14:00:03 -07:00