Files
alan 10049b8062 Chat info: account quota per harness (Claude rate_limit_event, Codex account/rateLimits, OpenCode unsupported)
Usage frames carry optional usage.account {harness, source, plan, as_of,
windows[{id,label,used_percent,resets_at}], unsupported}. Claude Code quota
comes from its rate_limit_event stream lines and the initialize account
(plan), shared across chats on the same account. Codex reads
account/rateLimits/read once per connection (re-read when a chat opens after
5 min) and merges account/rateLimits/updated. OpenCode exposes no quota API
and says so. The app's chat info sheet shows an Account usage section with a
progress bar and reset countdown per window, Material and Cupertino.
2026-11-02 18:57:13 +00:00
..

Codex model protocol fixtures

These use synthetic models/providers, never guessed production identifiers. Wire shapes were checked against the official app-server documentation and the generated protocol source matching the installed package manifest (Codex 0.163.0):

Model.model is the turn override, not the catalog row's opaque id. Thread.model is current configured/latest persisted metadata, not per-turn execution telemetry. thread/start also returns model/provider at the top level. The fixtures project fields consumed by this adapter and retain real casing and pagination shapes. Tests use an isolated fake WebSocket JSON-RPC server.

Local codex --version timed out before output, so schema generation was not reached; the installed codex-package.json identified version 0.163.0, so version-tagged generated source was read instead. No live app-server socket was contacted.

Model selection validates via thread/read + model/list, persists a Pipelines next-turn choice, and supplies turn/start.model only when the user sends a prompt. It never calls thread/resume, which can awaken a queued goal, nor any configuration-writing API. The acknowledgement means "saved for the next turn," not "remote settings changed." The override is supplied again after a Pipelines restart; an already-running turn is not reconfigured.

Attachment inputs

Attachment wire tests also use the installed 0.163.0 tag's schema/typescript/v2/UserInput.ts and TurnStartParams.ts. Verified PNG, JPEG and GIF bytes use localImage with an absolute local path. Other files (including unsupported/corrupt image formats) retain their bytes and use a mention name/path plus an explicit statement that the reference has not loaded their contents: the agent must inspect them with its normal tools. This does not bypass the thread's sandbox or grant filesystem permissions. Text inputs include the schema's text_elements array.

Only unchanged server-prepared file URIs are admitted; private regular files, eight-file/1 MiB combined bounds, and image decode allocation bounds are checked before turn/start. Files retain the existing attachment-store retention rules. History keeps local file/image parts; native image parts use the stored basename while a companion text input retains the original display name. All wire tests use fake JSON-RPC servers, never the production control socket.

Account rate limits

account-rate-limits-read.json (an account/rateLimits/read result) and account-rate-limits-updated.json (an account/rateLimits/updated notification) follow the schema generated by the installed codex-cli 0.164.0 (codex app-server generate-ts: v2/GetAccountRateLimitsResponse.ts, RateLimitSnapshot.ts, RateLimitWindow.ts, AccountRateLimitsUpdatedNotification.ts). Numbers are synthetic. resetsAt is Unix seconds; usedPercent is 0-100. The update is sparse: null fields keep the previously read values.