## 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
## 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
## What changed
- Add `cli_auth_credentials_store` and `chatgpt_base_url` as exact managed requirements loaded from local requirements configuration.
- Apply these requirements to runtime and bootstrap authentication configuration, overriding user-configured values.
- Expose the managed values through `configRequirements/read` and reject attempts to change them through config write APIs.
- Ignore these local-only authentication requirements in cloud-managed requirement layers.
## Testing
- Cover requirement loading and composition, runtime and bootstrap overrides, app-server responses, and read-only config writes.
GitOrigin-RevId: 8ea9c096386072036ca5441f3d48af8707988a65
## Why
Building a resume-picker preview for a legacy session should not require loading its full thread history.
## What changed
- Read up to six preview lines by scanning at most 1 MiB from the end of a local legacy rollout.
- Fall back to the existing history hydration path when the local file is unavailable, the bounded scan is incomplete, or the tail contains a rollback.
- Keep the initial `thread/read` request turn-free while loading the preview.
## Testing
Added coverage for compaction, rollbacks, oversized records, exhausted scan budgets, and app-server request parameters.
GitOrigin-RevId: a8950f03d8b56323f268fd3355c6a38a16cb9833
## Why
Direct access to shimmer primitives can bypass the reduced-motion handling
introduced in https://github.com/openai/codex/pull/20564.
## What changed
- Make `shimmer` a private child of `motion` and restrict `shimmer_spans` to
its parent module, so Rust visibility enforces the animation boundary.
- Remove the source-scanning regression test that previously checked this
boundary with regular expressions.
GitOrigin-RevId: 1f4cccacaa907992c636cd1e9cd2829b7653f811
## What changed
- Reuse shared directory fixtures and local and remote app-server instances across the resume cwd case matrix.
- Seed the runtime working-directory override directly so each case focuses on resume behavior without starting and replacing an extra thread.
- Run the test on a four-thread Tokio runtime and shut down each shared server after all cases complete.
GitOrigin-RevId: 4bc4978abc546882f26bcb5e3591ff9673758b4a
## Why
Pet tests reuse the same blank WebP spritesheet fixture, so encoding a new image
for every temporary path does unnecessary repeated work.
## What changed
Encode the test spritesheet once with `LazyLock`, then write the cached WebP bytes
to each requested fixture path.
GitOrigin-RevId: 26d75bb1bac448717ca63aeb82eb4e500c86fad8
## Why
The 1,000-character human-like typing test waited on the wall clock after
every keypress, making the test unnecessarily slow.
## What changed
Advance an injected timestamp by the recommended paste flush delay and flush
the paste-burst detector explicitly after each character. This preserves the
coverage that slow typing appears directly without creating a paste
placeholder, without sleeping between keypresses.
GitOrigin-RevId: 0c1beb40283f7d73a381cd221725ab4227c8e233
## What changed
Construct the oversized unified diff fixture directly instead of generating it
from two large input strings. Keep the fixture just above
`MAX_HIGHLIGHT_LINES` so the test continues to verify that syntax highlighting
is skipped for large updates.
GitOrigin-RevId: 8f8853e03a50ff9f53e77b2ba0956cf85ee17c07
## Why
MCP tool results can contain multi-megabyte image, audio, or resource bodies,
even though TUI history renders only summaries for those content types.
## What changed
- Project completed MCP results into width-independent display data, dropping
media and resource bodies that history does not render.
- Preserve text output, JSON fallbacks, error state, Node REPL rendering, and
the fully decoded image-output marker.
- Add tests covering width-dependent rendering, image validation, and Node REPL
text fields on non-text and unknown content blocks.
GitOrigin-RevId: 2cfddf0864093e6837a4431e541f7a9cab544a68
## Why
Keeping overflowing separators with the following word can add whitespace-only
rows and make composer wrapping differ from the queued-input preview.
## What changed
- Hang breakable whitespace from the preceding visual row at soft word breaks
while preserving the underlying editable text.
- Keep indentation, trailing whitespace, mandatory breaks, and nonbreaking spaces
visible and editable according to their existing semantics.
- Align cursor placement, scrolling, vertical navigation, masked rendering, and
styled overlays with the visible wrapped content, including after resizes.
## Testing
Add focused wrapping, rendering, cursor, editing, scrolling, navigation, Unicode
separator, long whitespace-run, and resize coverage.
GitOrigin-RevId: 7fbdb0a4bf33cfee20c4c19dca5aee74df4f892c
## Why
Windows named pipe servers can impersonate connected clients. IDE context
connections only require the server to identify the client, so they should not
grant broader impersonation rights.
## What changed
Open Windows IDE context pipes with `SECURITY_SQOS_PRESENT` and
`SECURITY_IDENTIFICATION`, limiting the server's impersonation token to the
identification level.
## Testing
Add a Windows regression test that connects to a named pipe, asks the server to
impersonate the client, and verifies that the resulting token has the
`SecurityIdentification` level.
GitOrigin-RevId: 51ef080f3367857987e03b0113a476040ea40e56
## What changed
- Group consecutive successful agent and unified-exec startup commands into a compact `Ran N commands` entry while preserving their full transcript.
- Flush command groups at interaction boundaries, after failures, and after 32 completed commands. Keep manual shell commands and failed or declined commands visible.
- Apply the same grouping rules when replaying thread history without duplicating command starts or disturbing unrelated active commands.
## Testing
- Add TUI coverage for live and replayed grouping, transcript preservation, failures, overlapping commands, group limits, and interaction boundaries.
GitOrigin-RevId: d6602a20201644012fcff3d6cecf4690024383a9
## What changed
Stop visiting remaining `ColumnRenderable` children once the render position
reaches the bottom of the available area.
GitOrigin-RevId: 5b7f2c657f65879119b1b840e82f47b1c5f9e3db
## What changed
- When the composer is empty in Vim normal mode, make the configured history-up binding restore the latest queued follow-up for editing.
- Remove the restored message from the queue so submitting the edited version replaces it instead of creating a duplicate.
- Preserve normal history navigation when the composer has text or a popup is active, and honor remapped Vim bindings.
## Testing
- Add TUI tests covering repeated edit-and-requeue cycles and a remapped history-up binding.
GitOrigin-RevId: 0b04dd964d3fc6fdcd10712aa4d5fd81cbbd2255
## What changed
- Add `/cd [path]` for changing an idle local session's working directory while preserving conversation history. Relative paths resolve from the current directory, and omitting the path selects `~`.
- Reload project configuration, instructions, permissions, keybindings, file search, and hooks for the destination before replacing the active session.
- Reject unsafe transitions, including active or queued work, background terminals, remote environments, untrusted destinations, and incompatible permission profiles.
- Add `/pwd` and its `/cwd` alias to display the current working directory, and discard asynchronous results left over from the previous directory.
## Testing
- Cover command parsing, aliases, default paths, session eligibility, transition failures, history preservation, destination policy loading, hooks, and stale events.
GitOrigin-RevId: 1a987c029f157a087ba02c0f26e022260409132b
## What changed
- Store the editor portion of `RuntimeKeymap` in an `Arc` so the chat composer
and its embedded textarea use the same keymap snapshot.
- Initialize the textarea from the composer's default runtime keymap and keep
custom binding updates shared between both components.
- Use copy-on-write when tests and binding resolution need to mutate editor
bindings.
## Testing
- Verify that applying custom editor bindings shares the same keymap allocation
with the composer and textarea.
GitOrigin-RevId: 7f3b0afd6cc784e23deee8819e5c2c37a3709c68
## Why
External editor buffers can contain the current composer text and should not be
placed in directories exposed as writable by a restricted filesystem policy.
## What changed
- Create editor buffer files under a protected `editor` directory, trying the
configured Codex home, the default Codex home, and a workspace fallback.
- Reject candidates that overlap writable roots or resolve through symbolic
links, while preserving external editor support for full-disk-write policies.
- Surface an editor error when no protected directory is available.
## Testing
Add coverage for writable roots, aliases, symbolic links, fallback selection,
temporary-directory grants, full-disk-write policies, and editor invocation.
GitOrigin-RevId: df1029d81b327678991ab84ffd1077f0e5855631
Encode each character into a stack buffer before appending it to the
decorated span, avoiding a temporary `String` allocation for every character.
GitOrigin-RevId: 72ec1ad5363391dffee089f04073d827d8c459bf
## What changed
- Display a dimmed `Resuming session…` or `Forking session…` status above the provisional composer based on the requested session action.
- Update or clear the status after session selection resolves, while preserving the composer height and any startup draft text.
## Testing
- Add snapshot coverage for resume and fork loading states and transitions back to a fresh session.
GitOrigin-RevId: 9d37b2d0e390d28dee310dd7a5b9fa992db2c25c
## What changed
Remove the unused `codex-cli` dev-dependency and the no-op import that kept it
visible to `cargo-shear`. TUI tests continue to locate spawned binaries through
`codex-utils-cargo-bin`.
GitOrigin-RevId: ba5855590c6f0300845170f15f39d77c0611a60a
## Why
App directory data and in-flight requests can outlive the account, workspace, or thread that produced them, allowing stale apps to appear in the current TUI context.
## What changed
- Invalidate cached app data, dismiss the app picker, and start a fresh fetch when the account, workspace, or thread changes.
- Tag app directory fetches with their originating thread, workspace, and scope generation, and ignore queued requests or results that no longer match.
- Treat `AppListUpdated` notifications as revalidation signals instead of directly adopting their unscoped contents, with deduplication and a bounded error retry.
## Testing
Added coverage for stale request and result rejection, context invalidation, picker dismissal, and notification revalidation.
GitOrigin-RevId: f20930a0598a6abbdfb3c7826ec955346fe2da7a
## What changed
- Discover synchronous `mcp_tool` hook handlers and invoke their configured MCP server and tool through a supplied executor.
- Expand nested hook-event placeholders in MCP tool inputs while preserving JSON types, and process tool output through the existing hook output contract.
- Represent hook details as handler-specific metadata in `hooks/list`, including MCP server and tool fields, and show those details in the TUI hooks browser.
- Skip unsupported `SessionEnd` MCP hooks and runtimes without MCP invocation support with startup warnings.
## Testing
- Cover argument expansion, missing placeholders, MCP invocation and hook decisions, discovery warnings, `hooks/list` metadata, and TUI rendering.
GitOrigin-RevId: 295b845471fe92bd7ad7cd272fbcd2c3713912e0
## Why
Replacing every carriage return with a line feed turns each CRLF pair into two
line breaks when text is pasted into the TUI composer.
## What changed
Normalize CRLF pairs before converting remaining bare carriage returns, so each
pasted line ending becomes a single line feed while existing line feeds remain
unchanged.
## Testing
Add a regression test covering mixed CRLF, bare CR, and LF line endings.
GitOrigin-RevId: 86c66d2a52fae52c9ae58c2f24a49eed685b60be
## What changed
- Treat plain, Shift-modified, and Windows AltGr character events as text-producing input for paste-burst detection.
- Exclude Super, Hyper, and Meta character events from paste bursts, flushing any pending text before handling them as shortcuts.
## Testing
- Add coverage for plain and Shift-modified spaces, shortcut-modified spaces, pending burst flushes, and platform-specific AltGr input.
GitOrigin-RevId: 3c43224966307fd014eb1586dce0c53ee56c75aa
## Why
Backspace should let users remove Thai vowel and tone marks without deleting the
entire grapheme cluster.
## What changed
- Treat Thai nonspacing marks as individual backward-deletion boundaries.
- Keep embedded text elements atomic and preserve the existing behavior for
other grapheme clusters, including decomposed Latin text and joined emoji.
## Testing
Add coverage for successive deletion of Thai marks, cursor rendering after
deletion, unchanged non-Thai grapheme handling, and atomic Thai text elements.
GitOrigin-RevId: f4834183909d93f4b4dd92f5d93e89235dc2b621
## What changed
Return early from `mark_buffer_hyperlinks` when none of the supplied lines
contain hyperlink metadata, avoiding unnecessary paragraph layout work.
GitOrigin-RevId: bdd6727f3dab7cef87646f97ac955e848cfcfee2
## Why
The TUI reads the account to determine login status, then bootstrap reads the
same account again during startup.
## What changed
- Preserve the login-status account response and pass it to app-server
bootstrap, avoiding the second account request.
- Discard the prefetched response when onboarding or a resume-directory prompt
allows authentication to change, when a picker replaces the app-server
session, or when the model provider changes.
## Testing
- Verify bootstrap reuses a prefetched account without issuing another account
request and retains its account metadata.
- Verify normal bootstrap still reads the account when none was prefetched.
- Verify matching resume directories skip the interactive prompt.
GitOrigin-RevId: 8da1b9104b9e7f048c4254399b126116798d641a
## Why
Routine state such as history, logs, sessions, or temporary files does not mean
that the default account can authenticate. Treating any non-pristine Codex home
as configured can show the composer before onboarding is complete.
## What changed
- Base the startup decision on authentication-relevant state instead of requiring
an empty Codex home. Existing credentials, configuration, workload identity,
managed configuration, or a running local daemon continue to keep the composer
visible.
- Treat an unreadable or ambiguous home conservatively and keep the composer
visible.
- Allow onboarding when the legacy `--search` flag is the only configuration
override.
## Testing
Expanded startup preflight and draft tests to cover existing home state,
credential sources, workload identity markers, daemon state, ambiguous paths,
and search-only overrides.
GitOrigin-RevId: 76837e3fd6aa714f2a7f72d191088a3faae23515
## Why
On a pristine default installation, the provisional composer can appear before
first-login onboarding takes over the terminal.
## What changed
- Detect pristine local installations conservatively, accounting for existing
Codex state, custom homes, access tokens, system configuration, and managed
configuration sources, including macOS managed preferences.
- Keep the composer hidden and ignore draft input until onboarding completes,
while still allowing startup cancellation with `Ctrl-C` or `Ctrl-D`.
- Reveal the configured composer after onboarding for normal new-session
launches; resume and fork pickers retain their existing startup flow.
## Testing
- Cover pristine and existing home layouts, environment credentials, system and
managed configuration, inaccessible state, onboarding input suppression,
cancellation, and the transition to the composer.
GitOrigin-RevId: c1a47ea3ba7c1ff1dd229895c0362b6dd9bfd713
## Why
Configuration and app-server initialization can take time before the main TUI is ready, leaving users unable to begin drafting a prompt.
## What changed
- Show a provisional composer while startup work runs and carry its text, cursor position, paste state, and attachments into the initialized chat.
- Limit the provisional composer to safe editing and cancellation, and quarantine input around session pickers, approvals, and other actionable startup screens.
- Preserve configuration validation before terminal checks and recover terminal state cleanly from startup failures and caught panics.
## Testing
- Cover startup editing, multiline and large pastes, keymaps, cancellation, session-picker handoff, approval boundaries, and draft restoration.
- Verify non-interactive launches report configuration errors before terminal errors.
GitOrigin-RevId: fe04a85cfbbcff21ff87fa81fd17474827858575
## Why
Terminal probes and other bootstrap work can leave keys or partial control
sequences buffered before an interactive startup screen is visible. Those
inputs must not accidentally select or confirm an action, while typeahead
intended for the composer should survive terminal initialization.
## What changed
- Replay user input consumed by Unix startup probes through Crossterm while
filtering completed terminal color replies, and avoid consuming the Windows
console input queue when detecting default colors.
- Drain decoded and unread input after rendering actionable startup screens,
including onboarding trust, migration, update, provider, resume, and hooks
prompts. Keep incomplete control sequences quarantined and fail closed when
an input boundary cannot be resolved.
- Restore terminal modes if initialization exits early and bound terminal probe
reads by time and byte limits.
## Testing
Add parser, boundary, onboarding, and PTY coverage for preserved typeahead,
split escape sequences, bracketed paste, delayed input, and fresh input after
an interactive screen becomes ready.
GitOrigin-RevId: 321198996cdd88fe9b43c4a762e750bff450482c
## What changed
- Drain queued app events until the initial session header is installed before
handling terminal input.
- Render the active session header without a leading separator so it starts at
the top of the viewport.
## Testing
- Add a rendering snapshot that verifies the initial header begins on the first
viewport row.
GitOrigin-RevId: 070417776b629c681b3f94e93ba619dfefe764b1
## What changed
When the generated `None of the above` option is selected in a request user
input prompt, route Enter and configured accept actions to the notes editor
instead of submitting the response. Tab continues to open the same editor.
## Testing
Add a regression test confirming that both Tab and Enter reveal the notes editor
without submitting the response.
GitOrigin-RevId: 8a563d81a82a11ca0b26c2b1100053f13be8e8f4
Import `ThreadHistoryMode` where the resume picker uses it for session
selection state and history mode tracking.
GitOrigin-RevId: ae8b30ad959c872d35eb2a38d514e67ecf1275f1
## What changed
- Scan legacy and paginated transcript items newest-first and stop after collecting the six newest nonblank preview lines.
- Keep paging through bounded paginated history when newer items do not produce visible preview text, while preserving chronological display order and assistant markdown rewrites.
- Move transcript preview loading into a focused module and add coverage for reverse scanning, legacy/paginated parity, and paging past invisible items.
GitOrigin-RevId: 576afe37d034b32db363691bd4f401815fffaea7
## Why
Resuming a known legacy rollout with `excludeTurns` first requires the TUI to
retry after the app server rejects paginated history loading.
## What changed
- Carry the history mode reported by the session picker into the resume flow.
- For embedded app-server sessions, resume a legacy rollout with its turns when
the rollout is still legacy and background migration cannot race the check.
- Keep requesting paginated history when the picker metadata may be stale,
migration is enabled or active, or the app server is remote.
## Testing
Added coverage for picker server replacement, background migration, maintenance
lock contention, stale history metadata, and paginated resume requests.
GitOrigin-RevId: 2300d1ad93a817eeeeb8f8ed60b073400ddf7106
## What changed
- Set `parallel_tool_calls` for regular and remote compaction prompts without consulting model metadata.
- Remove `supports_parallel_tool_calls` from `ModelInfo`, the bundled model catalog, and related fixtures.
- Preserve the existing Responses Lite behavior that disables parallel tool calls at request construction.
GitOrigin-RevId: 49552bdf97e71fa57325abb49f8adc0c88f1401a
## What changed
- Add experimental `thread/queue/add`, `list`, `update`, `delete`, `reorder`, and `start` requests for persistent queued user submissions.
- Automatically dispatch queued submissions in FIFO order after completed or failed turns, while leaving the queue paused after interruption.
- Emit `thread/queue/changed` notifications and expose paginated queue contents with stable submission and client message IDs.
- Export the new protocol types through the generated JSON Schema and TypeScript bindings.
## Testing
- Add app-server integration coverage for capability gating, CRUD, pagination, capacity limits, notifications, automatic dispatch, cold-thread resume, interruption, and explicit queue starts.
GitOrigin-RevId: 89caf5577192199bda77cf6c372a59d26cdd910e
## What changed
- Parse the optional `retirement_at` RFC 3339 value from model upgrade metadata, treating missing, null, or malformed values as unknown.
- Expose known retirement times from `model/list` as nullable Unix timestamps in `upgradeInfo.retirementAt` and preserve them when converting app-server models back into model presets.
- Update the generated protocol schemas and app-server documentation.
## Testing
- Cover absent, null, valid, and malformed catalog values.
- Verify `model/list` serialization and app-server model conversion for known, missing, and out-of-range timestamps.
GitOrigin-RevId: 969baf9f5b012997f460fb4611ba63c963ee658c
## What changed
When `Ctrl-C` is pressed with an empty composer while a task is running in a local daemon session, show a menu that lets the user:
- cancel the task and stay in Codex;
- exit Codex while leaving the task running; or
- stop the task and exit Codex.
Do not offer background execution for side-thread tasks or when follow-up messages are queued. Preserve existing `Ctrl-C` behavior for non-daemon sessions, drafts, paste bursts, MCP startup, and returning from an active side thread.
## Testing
Add TUI tests for each exit action, menu dismissal, side threads, queued follow-ups, composer input, MCP startup, and non-daemon sessions.
GitOrigin-RevId: 539c33d3a4ff288a015bddbe9465d2bbdbe018d0
## What changed
- Add the experimental `thread/revert` request, which replaces a loaded paginated thread's durable history with the prefix before `beforeTurnId` while preserving the thread ID.
- Interrupt any active turn, reload the replacement history without unloading the thread, preserve mutable thread settings, and emit `thread/reverted`.
- Return backward pagination cursors for the retained turns and items, reject stale rollout paths after a revert, and document that local file changes are unaffected.
## Testing
- Cover history replacement, pagination, stale paths, missing turns, subsequent turns, active-turn interruption, and preserved thread settings.
GitOrigin-RevId: 435a8163ad4f310cc47219b436f6bdde21f2b83a
## What changed
- Treat workload identity environment markers as an explicit authentication selection, even when another process credential is present.
- Return initialization errors from `AuthManager` and propagate them through commands and services instead of continuing with an unusable authentication state.
- Make `codex login status` validate workload identity, keep the TUI on an embedded app server for local workload identity, and reject workload identity in `codex mcp-server`, where it is unsupported.
## Testing
- Cover workload identity precedence and partial configuration errors.
- Verify login status reports an unreadable identity assertion and app-server routing enforces the supported workload identity topology.
GitOrigin-RevId: efc6b6b4cd4d61652617de82aaa3d7ffc75d6618
## What changed
- Classify simple PowerShell `Get-Content` commands, including `gc` and `type` aliases, as file reads while preserving Windows paths.
- Reuse the shared classification for implicit skill invocation detection on Windows and render recognized commands as `Read <file>` in the TUI.
- Leave commands with unsupported flags, multiple operands, wildcards, or expressions unclassified.
## Testing
- Cover supported and rejected PowerShell forms, Windows executor skill detection, and the TUI read summary.
GitOrigin-RevId: 4e8f5470f2ae31c08d74091f9634c2926e516ccf
## Why
Terminal autowrap for oversized URL tokens can drop the user-message gutter and background on continuation rows.
## What changed
- Explicitly wrap long URLs within the available message width.
- Preserve the complete OSC 8 hyperlink destination on every wrapped fragment.
- Keep the user-message gutter and background styling across continuation rows.
## Testing
Add history-cell and VT100 coverage for URL content, hyperlink targets, gutters, and backgrounds across wrapped rows.
GitOrigin-RevId: 59514eee4ab967bd937b55574b9f8d0d1c82df7c
## Why
Inline visualization viewer documents must remain outside locations that a
sandboxed session can modify before they are opened in a browser.
## What changed
- Materialize viewer documents in a dedicated cache under `CODEX_HOME`, keyed
by the source and artifact thread IDs, instead of alongside visualization
artifacts.
- Create visualization links only when the active filesystem policy cannot
write to the viewer cache. This also disables links for full-disk-write
sessions and applies the policy consistently when loading transcript history.
- Reject viewer cache paths containing symbolic links and track materialized
documents in memory so unchanged viewers are reused without trusting existing
file contents.
## Testing
- Verify that rendering an unchanged visualization reuses the existing viewer
file, while an updated fragment refreshes it.
GitOrigin-RevId: 12b7fbe522a68076e5d683a987b7801940d131c2
## What changed
- Add `thread-credits` and `estimated-thread-cost` items to the configurable
status line and terminal title for Enterprise workspaces.
- Fetch one shared thread usage estimate only when either item is selected,
omit unavailable values, and refresh the display after turns complete.
- Preserve the last nonzero estimate while usage settles, with bounded delayed
refreshes and retries for transient failures.
## Testing
- Add coverage for configuration, rendering, previews, plan availability,
replay handling, retries, and post-turn settlement.
GitOrigin-RevId: dd69ee621c5bca0e5d9edd32b2bba42487eb1500
## What changed
- Extend `account/usage/read` with an optional `threadId` request and a
backward-compatible `threadUsage` response containing estimated credits,
optional USD cost, and model, reasoning, speed, and token breakdowns.
- Fetch thread usage for eligible Business and Enterprise plans when `/status`
is opened, then update the rendered status card asynchronously.
- Preserve terminal scrollback when replacing a visible status-card tail, and
append a refreshed card when the original tail can no longer be updated.
## Testing
- Add app-server coverage for authentication, canonical thread IDs,
unavailable billing routes, and malformed IDs.
- Add TUI coverage for usage formatting, stale responses, retries, history
updates, terminal reflow, and scrollback preservation.
GitOrigin-RevId: 49300914b3fba917c0f08e8595363e04e5ba6d37