Repository navigation
Releases
v0.4.13
miao v0.4.13
v0.4.13 returns the default page to the palette 0.4.9 shipped and lets that page adopt
the colour the terminal paints around a pane, so the transcript no longer sits in a
differently coloured block inside the window. It also gives folded tool output a readable
width and keeps an over-window Session running.
The page matches the window again
0.4.10 replaced the default dark palette with a neutral graphite ramp. The page then
painted #212121 while the terminal's own chrome stayed #2e3440, and every pane edge
became a visible seam.
Restoring the palette alone was not enough. A terminal that draws each pane as a rounded
card inset by a margin and padded inside owns those few pixels around the page, so a page
painted in any colour of its own leaves a ring of the terminal's colour around itself —
4 to 8 points on every side, which reads as the app carving out a smaller area than the
terminal gave it. Returning the page to #2e3440 against a #1c1c1e card made that ring
larger, not smaller.
The page therefore adopts the colour the terminal announces for the pane card. It is the
same colour as the padding, so the page and the ring are one ground and the seam goes away,
while every other token keeps the theme's own hue.
The default dark theme is the Nord-derived palette again, #2e3440 with its periwinkle,
teal and amber accents. A theme you pick yourself is unaffected, and the diff band and
line-number colours that were tuned separately keep their values. A page that pins light or
dark mode refuses a canvas from the other side of the divide, so text never loses its
ground. Terminals that announce nothing keep the theme's own page.
Folded tool output stays readable
An over-wide line inside a folded tool result is now clipped to the column width with a
long lines clipped note, and a folded result keeps a three-line budget. Consecutive
calls are separated by a blank row again, and each call reads as plain text on the page
ground rather than as a filled badge.
A Session past its window keeps going
A Session whose context had grown past the model window is continuable again instead of
being left unable to start another turn. A waiting job also clears its pause row as soon
as the wait is over.
Also in this release
- tui: restore the Nord default palette (#3324)
- tui: paint the page in the host's canvas colour (#3318, restored in #3326)
- tui: clear a waiting job once its pause is over (#3323)
- tui: return tool rows to plain page-ground text (#3321)
- tui: give folded tool output a readable budget (#3320)
- tui: clip an over-wide tool line while folded (#3319)
- engine: keep an over-window Session continuable (#3315)
v0.4.12
miao v0.4.12
v0.4.12 fixes the model catalog lookup behind ChatGPT OAuth and newly released models. The catalog cache already carried GPT-6.2 Astra and GPT-6.2 Sol; the engine was reading an older shipped snapshot instead.
The newest catalog wins
The installer's models.json and the catalog service's cache can both exist. The engine used the first readable copy, so a snapshot shipped with an older build kept winning over the cache the service had already refreshed. With no catalog the ChatGPT account route had no models to expose.
The engine now takes the newest readable snapshot. An explicit MIAO_MODELS_PATH still selects one exact catalog, and the self-maintained overlay applies only when no explicit path is set.
Windows finds the cache
On Windows a native process often has USERPROFILE but no HOME. The lookup now prefers USERPROFILE on Windows, with HOMEDRIVE/HOMEPATH and HOME as fallbacks, so the same cache the product writes is the one the engine reads.
After upgrading, ChatGPT OAuth routes and the model list use the current snapshot, including GPT-6.2 Astra and GPT-6.2 Sol, without reinstalling the model catalog by hand.
Also in this release
- engine: read the newest model snapshot (#3312)
v0.4.11
miao v0.4.11
v0.4.11 makes automatic compaction fire where a route's input really ends, says why a compaction pass failed, and refreshes the default palette and tool-row spacing.
Compaction arms where the input really ends
A declared limit.output is the model's maximum, not what a turn asks for. Some providers receive it (Anthropic requires max_tokens); OpenAI-compatible routes send no output cap at all. The trigger nevertheless subtracted the whole declaration from the window: a 1M route declaring output: 393216 planned against 655,360 and compacted at 622,592 — 59% of the window the operator sees — even though the same endpoint accepted a 941,198-token request for that model.
Model routes now record whether their provider actually receives the declared cap. When it does, the declaration is still reserved whole. When it does not, the ceiling reserves a sixteenth of the window, enough for the server's own completion default. For the route above the trigger moves to 933,888 (89% of the window), still under the largest input the endpoint accepted. The request bound, the painted percentage and the summarizer capacity keep reading the same ceiling.
A failed pass says why
An automatic compaction pass that the summarizer refused cleared the status phase in silence: the conversation simply stopped mid-history with nothing saying why compaction did not run, which reads exactly like a compaction that never started. The failure reason now lands in the composer notice as Compaction failed · <reason>, while the running row and phase still clear.
A calmer default palette
The default theme was repainted so the canvas, panels and syntax hues agree with each other and with a dark terminal background. Light and dark variants share the same role names, and the code-block syntax assertions were updated with the palette.
Tool rows sit on the page
A tinted band behind every call stacked the transcript into grey slabs, and two consecutive calls read as one crammed block. Every call now keeps the page background and is marked by its badge alone, with one blank row between calls so stacked panels stay distinct.
A calmer diff and badge palette
Changed diff rows now sit on deep green and deep red bands, with the marker carrying the only strong hue. Line numbers and folded hunk headers read their own theme tokens instead of borrowing the muted text colour, and every tool label wears one filled badge instead of a per-category hue. Themes can declare toolBadgeBg / toolBadgeFg; the existing diffLineNumber / diffHunkHeader keys now actually drive the render.
Also in this release
v0.4.10
miao v0.4.10
v0.4.10 keeps an Anthropic turn alive when the endpoint closes it legally but unusually: a reply that ran out of output room, a turn the endpoint paused, a thinking signature the rewritten history can no longer satisfy, and a parameterless tool call that was read as garbled JSON. It also stops capping Anthropic output at 4096 tokens.
A truncated or paused reply continues the turn
The Anthropic codec accepted only tool_use, end_turn and stop_sequence, while the Bedrock codec also accepted max_tokens. A reply that hit the output cap is not a malformed stream: the visible content is valid and any streamed call is incomplete. miao reported invalid provider stream: incomplete or unsupported stop reason and ended the turn with no answer.
max_tokens and pause_turn now continue the turn the way a truncated Chat reply already did: reasoning and text are committed, an unfinished call never executes, and the turn continues from durable history with only the remaining work. refusal reaches the operator as the text it carried, and an unknown stop reason now names the value it saw instead of hiding it behind "unsupported".
A stale thinking signature no longer dead-ends a Session
Anthropic binds a signed thinking block to the exact conversation prefix it was minted on. Any rewrite of an earlier message — tool-output pruning, the last-resort bound, an injected note, a switched model, or a retry that re-assembled the history — voids every signature behind the changed message, and no later request can satisfy the endpoint again:
messages.19.content.0: Invalid `signature` in `thinking` block.
The block is bound to a different conversation.
The endpoint's own remedy is "remove the block", so miao now replays that turn once with reasoning stripped from the outgoing history, announces the recovery as a provider retry, and no longer spends the generic identical 400 replay on a rejection a replay can never fix. The durable transcript keeps its reasoning; only the wire copy drops it.
"No arguments" is an answer
A model calls a parameterless tool with no arguments, and the empty argument string was read as garbled JSON. Three of those in one run paused the Session with "Stopped after the model repeatedly produced invalid JSON tool arguments" — a correct call shape treated as a defect.
Empty arguments now decode as the empty input. Whether that input is usable is the tool schema's question, answered by the tool itself. A call still never borrows another function's arguments from surrounding text.
The declared output cap is honoured
Anthropic requires an explicit max_tokens, and miao always sent 4096 because the setter had no production caller. Extended thinking is billed inside that budget, so a long thinking turn could spend the whole cap on reasoning and hand back a truncated reply. Model routes that declare a per-model limit.output now forward it to the Anthropic codec; providers that ignore the cap keep their own default.
Also in this release
v0.4.9
miao v0.4.9
v0.4.9 fixes one silent stop in automatic context compaction, restores the Command Code model list and plan-aware routing, makes the Chinese composer hint readable, and shows what a Session is doing while it waits or compacts.
Automatic compaction no longer stops for good
A Session could sit at 97% of its context window with automatic compaction armed and never shrink. The trigger was not the problem: compaction started at 640,450 tokens of a 655,360 window, and the summarizer answered. The commit then refused the checkpoint with unmatched tool result — every time.
An interrupted turn was writing the same answer twice. The stop path settled a planned tool with "the turn stopped before it ran", and the run's reconciliation then settled the still-planned call again with "Execution stopped before dispatch". The second answer was an orphan result, and the compaction cut validates its prefix strictly, so that prefix could never be cut.
Reconciliation now checks whether a call already has an answer before synthesising one, and the prefix validator accepts a repeat for an already settled call while still rejecting a result whose call never existed. The second half matters beyond prevention: a history already damaged by a released build compacts again after upgrading, without editing the database.
The Command Code model list is back
Command Code publishes neither capabilities nor pricing on its model list, so the catalog leaves modalities out for most entries. The route derivation read that missing field as "does not produce text". Only the one free model that happened to declare a text output survived, and a connected key appeared to have a single model.
A missing capability declaration is now unknown rather than unusable, and catalog entries marked deprecated are skipped, matching the product's existing enabled rule. The same pass points Command Code at its Provider API base /provider/v1 and sends its Claude models to /messages with the Anthropic wire; every other model stays on /chat/completions.
Plans choose the model list
Command Code gates models by subscription tier. providers.commandcode.plan takes go, goat, pro, or max; both Max 10× and Max 20× map to max. A provider holding keys on different plans can name each account's tier with account_plans:
{
"providers": {
"commandcode": {
"plan": "pro",
"account_plans": { "work": "max" }
}
}
}A model whose catalog entry lists no tiers, or lists the account's tier, is selectable. An unrecognized plan (team, provider, and the like) hides nothing, and a missing plan keeps the previous behaviour. A plan-only provider entry merges with the catalog instead of replacing it, so declaring a plan no longer makes every model disappear.
The Go plan has no Provider API access, so third-party clients need GOAT or higher. That limit comes from Command Code; the picker still shows the catalog because the account may upgrade.
OpenCode was rechecked at the same time: its pay-as-you-go Console (opencode) and Go subscription (opencode-go) remain separate providers, and Go, Go Plus, and Go Teams cover the same model set. opencode-go therefore does not filter by plan; the tier changes usage limits, not selectable models.
The composer hint is readable again
The empty composer's hint was cut in half in Chinese: 随便问… painted as 便问…, because the terminal's block cursor occupies the composer's first cell and a CJK glyph is two cells wide. The hint now starts one cell right of the caret: the caret keeps a cell of its own, the whole first glyph survives, and a typed draft still starts at the first column.
Host footer facts keep their colour
When miao runs inside mtty, the host merges the status strip into its own footer row and used to paint every fact in one grey. Each fact now carries a semantic tone — accent for the model, muted for the provider and a settled approval policy, warning for a blocking approval — and mtty maps those into its palette (mttydev/mtty#277). A host that predates the field ignores it and keeps its own colour, so nothing changes until the host ships that release.
A waiting turn says what it is doing
- A job a Session is waiting on shows live progress — the job, its elapsed time and the estimate — instead of a frozen
workingline. - A compaction pass shows as a live
compacting contextsegment with its counted and total tokens, and the transcript keeps its own record when the pass commits. - A pure wait no longer injects a
Task pausednote into the transcript; the wait state is the notice. Pauses that need a decision (turn budget, spend, stall) keep their explanation. - A stopped turn records why it stopped and who stopped it, so the next read of the transcript says
interruptedinstead of looking like a truncated answer.
Compatibility
No protocol or storage changes. plan and account_plans are optional provider fields; existing configurations keep their model list. Command Code's non-Claude routes now point at /provider/v1/chat/completions, and Claude routes use /provider/v1/messages. The host-footer tone is an optional field on the existing footer wire. A session already blocked from compacting by the duplicate-result history recovers on the next settled turn after upgrading.
Maintenance and verification
cargo fmt --check, cargo clippy --all-targets -- -D warnings, the full TUI suite (780 tests), the engine store (24) and history (10) suites, the 12 native_routes tests, and the full miao-engine library suite (593 tests) pass on Rust 1.100 stable. The compaction fix carries two regression tests that fail on the previous code; the composer test asserts the painted hint sits one cell right of the reported cursor; the route tests cover catalog entries without modalities, deprecated entries, Command Code's two wires, and plan filtering per account.
v0.4.8
miao v0.4.8
v0.4.8 finishes the sidebar's language switch, fills the documentation gaps around commands and provider setup, and fixes the budget gate that could stop a Session after a Goal spent its allowance.
The sidebar speaks the picked language
The goal panel, plan/quota block, session-usage ledger, activity counters and subagent rows were still English while the rest of the TUI followed the language picked with /lang. They now read from the catalog: the GOAL / PLAN · QUOTA / SUBAGENTS headers, goal and plan states, steps, budget, file counts, quota reset countdowns, no usage yet, the retried/attempt/rework counters, and the manual-approval footer fact (ask approval / 逐次批准).
Colours key off the catalog key rather than the English string, so a translated build keeps the same warning and accent treatment as the original.
Documentation: FAQ and command reference
New FAQ pages answer the questions that kept coming up — sessions and recovery, context and compaction, permissions and approvals, provider keys and routing — and a command reference lists every command and chord in one place. The guide and provider pages were trimmed to point at those pages instead of repeating them.
A new message reopens the goal budget window
A Goal counts its turns from the revision that recorded it, and the budget gate read the declarations once per drain. After a first stretch spent the allowance, every later message was stopped before its first provider turn, so sending more input could not make progress; a Goal declared mid-drain was never enforced at all. The gate now refreshes at every provider-turn boundary, and promoting a human input reopens the Goal window at max(promotion, goal revision). The Session budget from configuration stays in force, and an input that is only queued still waits.
Token budgets belong to the operator
A model cannot estimate tokens: the incident behind this fix declared three million tokens for a three-hundred-turn goal and then spent 136 million. budget.max_goal_tokens (default 20,000,000, read at load time so an existing configuration needs no rewrite) now caps any token figure a Goal may declare. A declaration past the cap is refused with guidance to ask once about an envelope in observable units — time or the next checkpoint — and record turns or wall-clock time instead.
Compatibility
No protocol or storage changes. budget.max_goal_tokens is optional and an absent key reads as 20,000,000, so existing configurations keep working unchanged. An exhausted Goal budget no longer vetoes your next message; the Session budget from configuration is unchanged.
Maintenance and verification
cargo fmt --check, cargo clippy --all-targets -- -D warnings, the full TUI suite (770 tests) and the engine budget suites (cost_budget, config_derive, permission) pass on Rust 1.100 stable, including the sidebar goal section in both zh and en.
v0.4.7
miao v0.4.7
v0.4.7 makes the theme list show what it is about to apply, and keeps the approval switch on screen after it is switched off.
The theme list previews
/theme changed nothing until Enter, so picking kanagawa from a column of names was a guess. Every row now paints as the cursor reaches it — background, borders, the sidebar and the launcher switch live. Esc puts back the theme the picker opened with; Enter keeps the pick and writes it to preferences. The dark/light/unlock rows still apply on Enter, because they reload the palette catalog rather than swap one theme.
The approval switch stays
The merged footer — and the strip miao paints itself — named auto-approve only while it was on. One press turned the policy off and removed the only target that could turn it back on. The fact is now always present: auto-approve keeps its warning, the default mode reads ask approval / 逐次批准, and both carry the same chord. A press flips the policy either way.
Also in this release
Two viewport guards: a detached viewport whose offset outlived a shorter transcript paints its tail instead of a blank window, and opening another Session while reading history follows the new tail (#3271).
Compatibility
No configuration changes. Themes and preferences work as before; only the moment they are written changed — Enter, not every row.
Maintenance and verification
cargo fmt --check, cargo clippy --all-targets -- -D warnings, and the full TUI suite (767 tests) pass on Rust 1.100 stable.
v0.4.6
miao v0.4.6
v0.4.6 makes the first start an onboarding instead of a refusal, and keeps a committed answer on screen when you are reading back through the conversation.
A first start has somewhere to begin
A start with nothing configured used to fail with --model is required. It now comes up and serves the catalogs the picker drives: every provider the install ships is listed as needing auth, the model list is empty, and a prompt answers with the same guidance the startup error carried — store a key, then pick a model (#3269).
Storing that first key is enough. The engine derives routes from the configuration and the credential store, and an engine that is already running re-derives them on config_reload instead of needing a restart. The TUI's embedded engine now takes that path and re-reads both catalogs, so the key stored from inside the conversation appears in the picker immediately. A host-written route manifest keeps its old contract: its primary route still has to match the provider the host launched with.
A committed answer stays on screen
Scrolling back through history is a reading position, not a pause. When a reply finished while the reader was in history, the committed projection was withheld and the draft it replaced had already been cleared, leaving the conversation blank until End was pressed. Fresh projections that only append — the answer, the next prompt — now paint immediately; only a refresh that would drop entries already loaded is held (#3268).
The scroll clamp also moved out of the projection step and into the frame that has the wrapped rows in hand, so a viewport no longer snaps back to an old tail because an unwrapped frame undercounted its lines.
Compatibility
Configured starts resolve exactly as before. Unmodeled starts are new behavior: the engine, not a missing flag, decides what a first run has to offer.
Maintenance and verification
CI covers cargo fmt --check, cargo clippy --all-targets -- -D warnings, the engine and TUI test suites, and the new unmodeled_serve integration cases: an empty start serves both catalogs, a stored key becomes a served route, and a key stored while the engine runs becomes a route on config_reload. Locally the full engine (588) and TUI (766) library suites pass on Rust 1.100 stable.
v0.4.5
miao v0.4.5
v0.4.5 completes the merged status row: under the mtty host the terminal reclaims the facts row for the conversation entirely — the composer keeps its bottom edge with no reserved gap — and every press on the host's row arrives as the operator's own chord, spelled by the keymap right in the wire.
The row belongs to the conversation
Yesterday's merge kept a reserved strip under the composer: an invisible click surface the host aimed synthesized mouse presses at. It worked, but it read as a wasted line between the box and mtty's status row. Under the host the layout is now one band shorter — the conversation takes the line — and the wire reports the facts as labels with the chord each one answers to (ctrl+x f flips approval, ctrl+x m opens the model picker, ctrl+x a the provider list), spelled by the keymap so remaps travel with the report (#3264).
The approval toggle owns a key
The merged row can press the approval fact, so the flip finally owns a chord of its own: <leader>f, next to the picker and list chords it sits beside on mtty's row (#3264).
Compatibility
A press on mtty's row lands the same way across combinations: a chord-carrying miao sends its named keystrokes; a cell-reporting miao (0.4.3/0.4.4) gets the synthesized mouse press at the recorded cell. A zero-geometry wire is refused rather than clicked onto the transcript. Plain terminals keep the painted facts row exactly as before.
Maintenance and verification
cargo fmt --check, cargo clippy --all-targets -- -D warnings and the full cargo test suite for the TUI crate run in CI (760 green) under the Rust 1.100 stable toolchain.
v0.4.4
miao v0.4.4
v0.4.4 fixes a real leak in yesterday's merged status row and makes the first run say what to do instead of going quiet.
The merged row no longer stacks
The status strip's clickable ranges were never cleared between paints — the field doc said "cleared on every paint" but no code did, and clicking still worked because the first covering range wins. The merged footer changed that arithmetic: it reports every range to the host, so a session left open overnight reported the same two facts 240 frames over — 480 segments on mtty's status row. Both panes now clear their hits at the top of their paint, and double-paint tests pin the wire to exactly what the current frame laid out (#3262).
The first run names the setup step
On a fresh install with no provider key, /model used to hand the text to a Session — for an engine that cannot start yet — and the provider pickers sat silent waiting for a catalog no engine would serve. Chrome commands (/model, /theme, /sessions, /lang, …) now run where they were typed; Session-bound commands (/goal, /tag, /recall) and unknown slash text stay first prompts. And when the model picker or the provider list has no engine behind it, it states the setup step — the full miao auth login <provider> <key> command — instead of nothing (#3260).
Maintenance and verification
cargo fmt --check, cargo clippy --all-targets -- -D warnings and the full cargo test suite for the TUI crate run in CI; the Rust stable toolchain moved to 1.100 and the chrome is clean under its new lints.