# Caudra 0.2 Preview 16

[v0.2.0-preview.16 on GitHub](https://github.com/caudra/caudra/releases/tag/v0.2.0-preview.16)

- Switch the model or thinking level during a running turn, in the main chat or a task, including while it waits for a quota reset.
- Saved tool outputs move into the session database, and `caudra -p` runs become sessions you can resume.
- GPT-6.1 Terra is available through OpenAI and Copilot.
- `/usage` shows xAI subscription quotas, and exhausted xAI free usage is not retried.
- Filter the keybindings list with `/`, and open a side question with `F2`.
- Errors and notices get their own footer row on terminals at least 30 rows tall, so the context and spend meters stay visible.
- Task results survive a busy database, and large sessions show loading progress while they open.
- Shell ETAs account for literal sleeps, and Caudra keeps up to 100,000 shell runs.

> **Important**
>
> Close other Caudra sessions before starting Preview 16. Its first start upgrades the session database for saved tool outputs, decision usage, and optional CPU measurements beside shell runs. Existing shell history is kept, with unavailable measurements left unknown.
>
> Updating from Preview 15 saves a copy first at `backups/caudra.db.v40.bak` in the state directory. Older builds cannot open the upgraded database, and `caudra rollback` restores only the previous binary.

## Models

- **GPT-6.1 Terra.** Adds `gpt-6.1-terra` for OpenAI and GitHub Copilot, with vision and configurable reasoning. Default models are unchanged.

## Changes

- **Switch models while work runs.** `/model`, `/thinking`, and the footer chips apply to the chat on screen, including running or finished tasks. Changes take effect after the request in flight finishes. If a request is waiting for a retry, rate limit, or exhausted account, it resumes on the new model without that wait. In the task picker, `Ctrl+T` opens the selected task's model list. The exhausted-account card also offers **Use another model…**. Saved transcript rows mark model and thinking-level changes. See [Commands](/docs/commands/#switch-models-while-work-runs).
- **See which model wrote a message.** The `⋮` message menu shows the model and thinking level behind each reply or tool call. Messages saved before this release lack those details. See [Sessions](/docs/sessions/#message-actions).
- **Saved tool outputs move into `caudra.db`.** Caudra stores the full output behind a truncated result, compressed, in the session database. Forks keep these outputs, and trimming or deleting a session removes its outputs. The per-output limit drops from 100 MiB to 32 MiB. The upgrade imports usable files from `tool-output/`, skips obsolete or unusable files, and removes the directory. `/storage` no longer lists a separate tool-output share, and `caudra storage stats` reports saved outputs. See [Sessions](/docs/sessions/#managed-tool-outputs).
- **Resume print runs.** `caudra -p` saves its session when it ends. It appears in session lists, keeps its saved tool outputs, and can be resumed with `caudra --session <ID>`. See [Headless](/docs/headless/).
- **xAI subscription quotas in `/usage`.** `/usage` shows included-credit usage and its reset time, plus prepaid and on-demand balances when xAI reports them. After xAI refuses a request under its rolling 24-hour free-tier limit, `/usage` shows the observed token counts and when they were seen. Caudra does not estimate when that limit resets. The entry clears after a successful request for that model or after 24 hours.
- **Filter keybindings.** In the `F1` list, press `/` to search actions, keys, and sections. Every search word must match. `Enter` keeps the filter and `Esc` clears it. Modifier keys use `⌃`, `⇧`, `⌥`, and `⌘`, while searches such as `ctrl` and `shift` still work. See [Keybindings](/docs/keybindings/).
- **Open a side question with `F2`.** Outside a modal, `F2` opens `/btw` for the current conversation or focused task. Closing an unsent question keeps the draft for the next `F2`. See [Commands](/docs/commands/).
- **A footer row for messages.** Terminals at least 30 rows tall get a third row for errors, retries, notices, and pending actions. The row stays reserved when empty, so the composer does not move. Hover over a shortened message to read it, and overflow chips collect under `[+N]`. Shorter terminals prioritize the context and spend meters. The account chip now sits beside spend. Once subagents add to the bill, the spend chip shows the session total, and its tooltip shows what the focused chat spent. See [Quick start](/docs/quick-start/).
- **Tooltips in `/accounts` and `/usage`.** Hover over a key in the `/accounts` footer to see what it does. In `/usage`, hover over a column, total, quota figure, section heading, or note to see what it means. See [Token Economy](/docs/token-economy/#lifetime-spend).
- **Shell runs record host load.** With `[agent] shell_eta` enabled, new local runs save CPU usage and host-capacity measurements without delaying commands. Unix hosts also record load averages, and Linux records CPU pressure when available. These measurements do not yet affect ETA predictions.
- **More shell history.** Caudra keeps up to 100,000 local shell runs, up from 20,000. ETA models still train on the newest 20,000. Runs pruned before this release are not recovered.

## Fixes

- **Busy databases no longer lose task results.** When many sessions write at once, a finished task keeps retrying the save of its result and delivers the result once the save succeeds. Background work keeps running, and the retries no longer block the screen in every session. Reopening a session delivers results that Preview 15 lost this way, and its finished tasks wake the agent again. Switching the model or folder, compacting, and replacing tool outputs now rewrite only the changed rows, so each save holds the database for less time. See [Sessions](/docs/sessions/#results-and-continuation).
- **Loading progress for large sessions.** Opening, resuming, or forking a session shows a loading card with its title, current step, and elapsed time until the transcript is ready. Sessions that open quickly show no card.
- **Resume waits for a busy database.** While another session holds the database, opening a session retries for up to 30 seconds instead of five and shows that it is waiting. If it still fails, the error names the step that could not finish.
- **Shell ETAs account for literal sleeps.** `sleep 30` uses its requested duration without needing past runs. Consecutive sleeps add up, and supported chains such as `sleep 30 && make build` add the sleep duration to the estimate for the remaining work. Without a reliable estimate for that work, the card shows `at least 30s`. Conditional sleeps and polling loops still use the learned model.
- **Exhausted xAI free usage is not retried.** When xAI reports free usage as exhausted, Caudra stops retrying the request. Automatic account selection can switch to another eligible account. A pinned account stays pinned and reports the restriction.
- **Activity counts distinguish exchanges and model turns.** The exit summary separates user exchanges from individual model turns and includes a subagent subtotal. Counts survive resumes and compaction. Older sessions show a lower bound or an unknown count when history is incomplete.
- **Decision usage names its provider.** New decision calls appear under their configured endpoint in session and lifetime usage. Unknown prices stay unknown. Older totals keep their previous attribution because they did not record the endpoint.
- **Usage totals fit narrower screens.** In session and lifetime totals that show both billed and subscription spend, the subscription amount and legend appear below billed spend, aligned at the decimal point.
- **Wrapped `/logs` scrolls and copies.** With wrapping on, the wheel, the scrollbar, and the page keys move through `/logs` row by row without snapping back. A record taller than the pane can be read to its end, and the selected record stays highlighted. Dragging over log text selects it and copies it on release, keeping wrapped lines whole.
- **Telemetry exports events queued at exit.** Log events and measurements queued just before telemetry shuts down are exported. The final export still respects its time limit.
- **Shell scrollbars do not select text.** Clicking or dragging the scrollbar in shell command details scrolls without selecting adjacent text.
- **Patch colors stay stable.** Streamed previews keep addition and removal colors and apply syntax highlighting only after the tool finishes.
- **`Scratch` shows the agent's temporary directory.** The workbench follows the directory the agent is told to use, including after `/cd` and across worktrees or projects. See [Workbench](/docs/workbench/#files-outside-the-project).
- **Pictures open inside batches.** `view_image` results no longer open to a blank area inside a batch. Picture rows fold and expand like `file_read`, with pictures initially open outside compact view. See [Images](/docs/markdown/#images).
- **Nested `code` cards respond to clicks.** Call rows and printed trees inside a batch now expand and fold instead of only highlighting the clicked row.
- **Tool cards label empty results.** Searches show `no matches` or `no files`, empty files and folders show `empty`, and single results use singular labels.
- **Redundant module imports no longer stop `code` runs.** Imports of modules already in scope, such as `import history`, are removed and listed as repairs on the card. Unsupported imports explain how to call the module directly.
