NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Go modules, #58 by repository stars
Latest stable
v0.54.2
Last release 5 months ago
29 May 2026
Ships on a steady schedule
a new release about every 8 days
Most releases are documented
notes for 46 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
7 months old
147 releases · first in 2026
Drag across the ruler to compare, or tap a release to open it.
Headline: subagent capability sharpened on three axes — skills can now scope a child to a specific tool subset via allowed-tools frontmatter, callers
Headline: subagent capability sharpened on three axes — skills can
now scope a child to a specific tool subset via allowed-tools
frontmatter, callers can request a per-spawn iter budget via the new
max_iters arg (clamped 1-32), and two built-in personas (explore,
verify) are selectable inline via a type arg without writing a
skill. Closes umbrella #316.
Subagent:
allowed-tools frontmatter when forking
the child registry. The field was parsed but ignored ("Unused in v1");
now it scopes the subagent to the named tools only. New
forkRegistryWithAllowList helper alongside forkRegistryExcluding;
NEVER_INHERITED (spawn_subagent / submit_plan) still wins so
depth=1 + plan-mode guarantees hold even if a skill names them. An
allow-list naming a tool the parent doesn't have returns a structured
error result (no API call burned). (#317, PR #320)max_iters on the spawn_subagent tool
schema. Clamped to 1-32 at the boundary; floats round down; non-numeric
/ missing falls back to the registration-time default (still 16).
Verify-style tasks can ask for 6-8, explore-style can ask for 24+.
(#318, PR #321)type arg —
explore (wide-net read-only investigation, 20-iter budget) and
verify (narrow yes/no with evidence, 8-iter budget). Caller's
explicit system / max_iters override the type's defaults. Prompts
live in new src/tools/subagent-types.ts so subagent.ts stays
under the 500-line target. (#319, PR #322)Your coding agent can read these notes before it upgrades. Set up the MCP server →
One column per month.
Headline: USD-account users now see $ instead of ¥ everywhere money is shown in the TUI — wallet balance, turn cost, session cost, top-bar cost label,
Headline: USD-account users now see $ instead of ¥ everywhere
money is shown in the TUI — wallet balance, turn cost, session cost,
top-bar cost label, subagent end-event cost suffix, and the UsageCard
header / body / wallet line. Pre-fix a USD wallet rendered
¥0.0352 turn · ¥0.461 session · wallet ¥0.91; now it renders
$0.0308 turn · $0.064 session · wallet $0.91. The display follows
the wallet currency reported by the DeepSeek API (currency: "USD"|"CNY"),
not the UI language — a CNY account on an English UI still sees ¥,
and vice versa. Originally reported in #278 by @Explosion-Scratch.
UI / currency:
$ for wallet balance, turn cost, and
session cost. State + event schemas now carry balanceCurrency
through App.tsx → reducer → StatusBar so every render site sees
the wallet symbol the API reported. Originally drafted by @wviana
in #272; the TUI plumbing through state.ts / cards.ts / events.ts /
reducer.ts / useScrollback.ts / slash/types.ts was the bulk of the
fix.$0.91 ≈ ¥6.55) rather than treating 0.91 as < ¥5 → red. USD
wallets now correctly show yellow at low-but-not-empty balances.StatsPanel.ChromeRow cost label and useSubagent
end-event cost suffix follow the wallet currency too — pre-fix
these always rendered $. (#313)theme/tokens.ts
(formatCNY / formatBalance / formatBalanceLabel /
formatWalletDisplay / formatCost / balanceColorCny /
balanceColorForBalance) collapsed to three: formatBalance,
formatCost, balanceColor. Undefined currency defaults to CNY
(matches pre-fix unconditional ¥) so the transient first-turn
case where balance arrived but currency hasn't is consistent.ChromeBar.tsx (258 lines). App.tsx
mounts StatsPanel's diverged ChromeRow, which is the bar users
actually see. The two formatter helpers ChromeBar once owned now
live in theme/tokens.ts. (#314)Loop:
loop.ts 1331 → 1219 (−112). Three sibling files
under src/loop/: messages.ts (pure ChatMessage builders),
turn-failure-tracker.ts (per-turn failure count + threshold
tipping), force-summary.ts (forced-summary generator behind a
small DI context). Continues the #308 / #309 cadence — small
per-helper extractions, no behavior change. (#311)Known follow-up: SessionPicker still hardcodes ¥ for
per-session cost in the session-history list, tracked in #312
(good-first-issue).
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Headline: run_command learns the four common shell chain operators (|, ||, &&, ;) and the seven file redirect operators (>, >>, <, 2>, 2>>, 2>&1, &>).
Headline: run_command learns the four common shell chain
operators (|, ||, &&, ;) and the seven file redirect
operators (>, >>, <, 2>, 2>>, 2>&1, &>). Parsed and
spawned natively — no shell is invoked, so semantics are identical
on Windows / macOS / Linux; PowerShell 5.1's && parse error and
the object-vs-bytes pipe gap are sidestepped. Each chain segment is
allowlist-checked independently, so git status | grep main now
auto-runs when both halves are individually allowed. Driven by
discussion #231.
Shell:
|, ||, &&, ; chain operators in
run_command via split-and-spawn. The chain is segmented at
whitespace-bounded operators (preserves embedded & / | inside
arg values like --flag=1&2), each segment runs through the
existing lenient tokenizer, and segments are executed with proper
short-circuit semantics for && / ||. Each segment hits the
allowlist independently — git status | grep main runs when both
halves are allowed individually. (#233, #234)run_command — > (truncate),
>> (append), < (stdin from file), 2> (stderr truncate), 2>>
(stderr append), 2>&1 (merge stderr into wherever stdout points),
&> (both → file). Targets resolve relative to the project root.
Mid-pipe 2>&1 correctly merges stderr into the next segment's
stdin without truncating on stdout-end. (#235)cargo run -- --flag=1&2 and
similar embedded-operator args stay literal instead of getting
POSIX-strict-rejected. shell-quote dependency dropped;
splitOnChainOps is whitespace-bounded like the existing
detectShellOperator. (#234)Nothing published for this version
Headline: Two TUI fixes on top of the 0.24.0 cell-diff renderer. Frame writes are now wrapped in DEC 2026 synchronized-output markers so supporting te
Headline: Two TUI fixes on top of the 0.24.0 cell-diff renderer.
Frame writes are now wrapped in DEC 2026 synchronized-output markers so
supporting terminals can't paint a half-cleared intermediate state, and
marked is bumped to v15 to stop pre-escaping inline text into HTML
entities — which both displayed wrong and miscalculated wrap widths.
Renderer:
\x1b[?2026h…l; supporting terminals (Windows Terminal ≥1.18,
iTerm2, Kitty, Wezterm, alacritty, foot) swap frames atomically,
others ignore the unknown CSI. Resize's screen clear is also folded
into the next commit so clear+repaint is one sync block. Closes #225.Markdown:
marked to v15 — v12 pre-escaped inline text to HTML
entities (< → <, " → "), which displayed wrong in the
TUI and miscalculated cell widths so content past the wrap edge could
be clipped. v15 keeps token.text literal and only escapes at the
HTML renderer layer, which matches our actual rendering path.Nothing published for this version
Headline: Two follow-up fixes to 0.23.0 — the ReasoningCard and StreamingCard get a card-aligned redesign so they share the CardBox + Pill primitives
Headline: Two follow-up fixes to 0.23.0 — the ReasoningCard and
StreamingCard get a card-aligned redesign so they share the
CardBox + Pill primitives the rest of the run cards already use,
and the repair-storm detector now grants the loop one self-correction
attempt on the first storm before bailing the turn.
TUI:
CardBox with a tier-aware accent and a Pill
header, replacing the ad-hoc layout that didn't line up with
ToolCard / done-assistant rendering. New primitives/CardBox.tsx
and primitives/Pill.tsx are reused by the broader card family.
Closes #133. (#136)Loop:
Headline: TUI quality-of-life pass driven by RFC discussion #20. A read-only context sidebar on the right surfaces the active plan
Headline: TUI quality-of-life pass driven by RFC discussion #20. A read-only context sidebar on the right surfaces the active plan
Ctrl+\ toggle, plan-only auto-show), assistant
replies get a left accent bar so long answers are scannable in
scrollback, the viewport gains a single row-budget allocator that
ends the jitter when an approval modal mounts mid-stream, the prompt
input grows a full readline vocabulary (Home / End / Ctrl+K
/ Alt+B/F / Alt+Backspace), and the @-picker honors nested
.gitignore instead of dropping files past a 500-result cap on
Flutter / iOS projects.TUI:
plan.drop reducer action; manual Ctrl+\ toggle
persists in ~/.reasonix/config.json.sidebarOpen. Refuses below 88
cols total; sidebar divider uses borderTop so the line auto-fills
the panel width. (#127)borderLeft
accent. Picked over backgroundColor because Ink's <Box> doesn't
accept it — a left bar works on light + dark themes equally per
lamyc's RFC #20 callout. (#126)StreamingCard, EditConfirm, ShellConfirm,
PlanCheckpointConfirm, PlanConfirm, ChoiceConfirm,
PromptInput now declare their height to a single
ViewportBudgetProvider instead of each reading stdout.rows and
guessing. Modal-vs-streaming row race that produced visible
vertical jitter mid-turn (lamyc's video) is gone. Pure allocator in
src/cli/ui/layout/viewport-budget.tsx is priority-greedy
(modal > plan-card > status > input > stream). (#124)Home / End (line jumps, joins existing Ctrl+A /
Ctrl+E), Ctrl+K (kill to end of line), Alt+B / Alt+F (word
back / forward), Alt+Backspace (alias for the existing Ctrl+W).
Ctrl+U keeps Reasonix's "clear whole buffer" behaviour, not
readline's "kill to start" — clearing a large paste needs a single
ergonomic key. (#123)Bug fixes:
.gitignore
(root + every subdirectory, layered like git itself) and bumps the
default result cap from 500 → 2000. On Flutter / iOS projects with
a built ios/Pods/ directory the alphabetical walk used to burn
the cap before reaching lib/ and every @ query returned "no
files match". The new src/gitignore.ts util is shared with the
semantic chunker — single source of truth for "walk a dir
respecting .gitignore". Supports negation (!keep.log) and
respectGitignore: false opt-out. (#129)Internal:
resolvePreset /
canonicalPresetName + invariant check that every preset keeps
harvest: false and branch: 1 (the rule that branch and harvest
are never silently auto-enabled). (#125)Headline: Live MCP-server reconnect — /mcp reconnect (and the r keybind in the /mcp browser modal) tear down a stuck client, hand- shake a fresh one,
Headline: Live MCP-server reconnect — /mcp reconnect <name> (and the
r keybind in the /mcp browser modal) tear down a stuck client, hand-
shake a fresh one, and accept either identity or append-drift mid-session
without breaking the prompt prefix cache. The d keybind in the same
modal persists mcpDisabled for the selected server.
The reconnect work was driven by an empirical DeepSeek cache spike
(benchmarks/spike-mcp-reconnect/) that overturned the original RFC's
"any drift = full miss" framing — the cache is chunk-keyed, so an
appended tool costs only the new chunks (~95% hit retained). The full
graduated-permissive design lives in #110.
MCP UX:
/mcp reconnect <name> slash subcommand. Re-handshakes
the named server's transport and swaps the underlying McpClient
through a new McpClientHost indirection so existing tool closures
keep working without re-bridging. Identity-drift is always accepted;
append-drift (server added new tools at the end of its tool list) is
accepted mid-session via applyMcpAppend, which calls
prefix.addTool + registry.register for each new tool. Edit /
reorder / remove drift is refused with a clear "restart Reasonix to
apply" message — those are catastrophic for the cache and would need
new ImmutablePrefix API surface (replaceTool / removeTool).
(#115, #117)r (reconnect) and d (disable) keybinds in the
/mcp browser modal. Both surfaces now route through one shared
helper (kickOffMcpReconnect / toggleMcpDisabled) so the slash
command and the modal stay byte-identical in behaviour. (#116, #118)reconnect lifecycle state added to the formatter —
⌘ MCP · <name> ↻ reconnect… tearing down · re-handshake · listing tools per design §37.Internal architecture:
src/mcp/registry.ts — extracted registerSingleMcpTool(mcpTool, env)
BridgeEnv type. bridgeMcpTools now exposes a host
parameter (mutable client holder) and returns the resolved env so
reconnect can register newly-added tools with the same options. (#115)src/mcp/reconnect.ts (new) — opens a fresh transport, classifies
drift via classifyToolListDrift, swaps host.client only on
accepted drift kinds, closes the new client cleanly on refusal so
the old one stays untouched.src/mcp/drift.ts (new) — classifyToolListDrift(before, after)
returns { kind, added, removed, edited } over the five drift
taxonomy buckets (identity / append / edit / reorder / remove).
Pure function. (#114)McpServerSummary.client?: McpClient replaced by host: McpClientHost + bridgeEnv: BridgeEnv. Internal-only (the type
isn't in the public package surface).Tests / spikes:
tests/mcp-reconnect-prefix-invariant.test.ts (new) — six structural
cases pinning ImmutablePrefix.fingerprint behaviour under every
drift the reconnect path can produce. Locks the bytes-equal claim
the design rests on. (#112)benchmarks/spike-mcp-reconnect/ (new) — live deepseek-chat spike
tests/mcp-drift.test.ts, tests/mcp-reconnect.test.ts,
tests/mcp-append.test.ts (new) — unit coverage for the
classifier, reconnect early-returns, and the append handler.Deferred (filed as catastrophic-cache-cost cases):
ImmutablePrefix.replaceTool)removeTool + cache-reset card)--strict flag to refuse even append-driftEach is structurally a guaranteed cache miss and refused-with-restart is the right default; the follow-up issues will land if real demand surfaces.
Headline: MCP CLI surfaces realigned with docs/design/agent-tui-terminal.html sections 24, 32, and 37. Lifecycle messages get the documented vocabular
Headline: MCP CLI surfaces realigned with docs/design/agent-tui-terminal.html
sections 24, 32, and 37. Lifecycle messages get the documented vocabulary
(↻ handshake… / ✓ connected / ✖ failed / ○ disabled), /mcp opens
an interactive browser modal instead of dumping text to scrollback, named
servers can be skipped on launch via /mcp disable <name>, and a per-server
p95 latency tracker emits a one-line warn toast when a server consistently
goes slow.
MCP UX:
⌘ MCP · <name> ✓ connected 12 tools · 8 resources · 142ms
on bridge success, ↻ handshake… before initialise, ✖ failed with
reason in the catch path. New src/cli/ui/mcp-lifecycle.ts is the
single formatter shared by chat and run. (#106)/mcp opens a keyboard-driven browser modal per design §24,
showing server name + health badge + tool / resource / prompt counts +
capability list under the active row. /mcp text keeps the printed-card
form for non-TTY / replay contexts. (#107)/mcp disable <name> and /mcp enable <name> slash
subcommands persist a mcpDisabled list to ~/.reasonix/config.json.
Disabled named servers are skipped on the next launch and surface as
⌘ MCP · <name> ○ disabled via /mcp disable <name> in
startup output. Anonymous servers (no name=) aren't toggleable, by
design. (#108)mcpSlowThresholdMs
(default 4000) — ⚠ MCP \<name>` slow · 8.4s p95 over the last 5
calls. Idempotent: re-fires only after p95 dips below and crosses back. New src/mcp/latency.ts+src/cli/ui/mcp-toast.ts`. (#109)Deferred:
/mcp reconnect <name> (live tool-list teardown) split out as RFC #110.
The naïve implementation breaks the byte-stable prompt prefix when the
reconnected server's tool surface drifts; needs a design call between
refuse-on-drift / permissive-with-warn / --force flag before code.
The r keybind in the /mcp browser is a labelled stub waiting for
this RFC.Headline: Drops Node 20 support (EOL'd 2026-04-30). The README has been overhauled with hero-terminal / hero-stats / feature-grid SVGs that match the
Headline: Drops Node 20 support (EOL'd 2026-04-30). The README has been overhauled with hero-terminal / hero-stats / feature-grid SVGs that match the design-doc palette, plus contributor-avatar grid, Code of Conduct, and SECURITY policy.
Breaking:
engines.node bumped from >=20.10 to >=22. Node 20 reached
end-of-life on 2026-04-30; npm install reasonix on Node 20 will now
print an EBADENGINE warning. Tested CI surface trimmed to a single
Node 22 job. (#98)Fixes:
reasonix code now bridges MCP servers from
~/.reasonix/config.json, matching reasonix chat behaviour.
Previously any servers defined in config were silently skipped in
code-mode sessions. (#91)NAME_PREFIX regex in parseMcpSpec accepts hyphens, so
kebab-case server names like sage-wiki=npx -y @scope/sage-wiki
parse correctly. Previously the entire string was treated as a raw
command path. Regression test in tests/mcp-spec.test.ts. (#96)Docs / project hygiene:
hero-terminal.svg
(faithful to formatPendingPreview unified-diff output),
hero-stats.svg (94% / ~30× / MIT), and feature-grid.svg (six-card
3×2 grid). Bilingual *.zh-CN.svg siblings ship for the zh README.
All SVGs live under docs/assets/. (#102)# Reasonix H1 (the
logo wordmark says it), drop the duplicated tagline, center the
badges + description under one column, trim the comparison table
to differentiating rows only, drop the --system-append doc
subsection (lives in --help). (#102)agent-dashboard.html, agent-tui-terminal.html)
moved into docs/design/ so README links resolve to the rendered
GitHub Pages page instead of HTML source view. (#102)good-first-issue ticket list
with a single label-filter link — auto-fresh as tickets close. (#99)contrib.rocks contributor-avatar grid; add
GitHub stars + Discussions badges. (#102)CODE_OF_CONDUCT.md (Contributor Covenant 2.1) and
SECURITY.md (private-disclosure policy with explicit scope). (#102)Nothing published for this version
Nothing published for this version
Headline: Fix a render crash in the dashboard's Editor that triggered when toggling Edit / Split / Preview on a markdown file. Mixing the CodeMirror-m
Headline: Fix a render crash in the dashboard's Editor that triggered
when toggling Edit / Split / Preview on a markdown file. Mixing the
CodeMirror-managed DOM with sibling dangerouslySetInnerHTML while the
host element changed shape across modes confused Preact's reconciler
(Failed to execute 'insertBefore' on 'Node').
data-mode on a single .editor-stage wrapper
drives visibility via CSS. CM stays mounted across mode switches and
is poked with requestMeasure() when it becomes visible again.Headline: Fix a tool-loop regression on deepseek-chat introduced by DeepSeek's V4 rollout. The model now returns non-empty reasoning_content even with
Headline: Fix a tool-loop regression on deepseek-chat introduced
by DeepSeek's V4 rollout. The model now returns non-empty
reasoning_content even with extra_body.thinking.type = "disabled",
and the API rejects round-trips that drop the field
("reasoning_content in the thinking mode must be passed back to the
API"). Reasonix's whitelist-by-model in assistantMessage() was too
narrow — it stamped reasoning_content only for deepseek-reasoner /
deepseek-v4-flash / deepseek-v4-pro. Caught by re-running τ-bench
on v0.16.0: 24/24 reasonix runs were failing.
assistantMessage() now preserves reasoning_content
whenever the producer emitted non-empty content, regardless of the
model name. The whitelist still applies to synthetic messages
(empty stamp for thinking-mode endpoints) so non-thinking sessions
stay clean.loop-r1-reasoning.test.ts —
deepseek-chat returning non-empty reasoning_content round-trips
the field on the next request.Headline: Mouse drag in the log now selects text directly, with the log auto-scrolling when the drag hits the viewport edge. Releasing the button copi
Headline: Mouse drag in the log now selects text directly, with the
log auto-scrolling when the drag hits the viewport edge. Releasing the
button copies the selection to the system clipboard via OSC 52 plus a
tempfile fallback for terminals that don't honor it. The whole flow
stays inside the alt-screen TUI — no more /copy dance to dump the
log to main buffer.
<tmpdir>/reasonix-clip-<ts>.txt fallback for
terminals or remote sessions that drop OSC 52. Shift+drag still
bypasses tracking so the terminal's native selection remains
available for visible-only copies.stdin-reader now surfaces mouseDrag (SGR button 32)
and mouseRelease (tail m) events; previously dropped silently.
alt-screen switches from mode 1000 (press/release only) to mode
1002 (button-event tracking with drag motion).log-frame extends AtomViewport with firstRowAbs so
the keystroke layer can map mouse coordinates back to absolute log
rows. New extractSelection(atoms, sel) walks the cell grid and
produces UTF-8 text honoring 2-wide chars (CJK / emoji) with ANSI
styling stripped./copy slash command, the copyMode lifecycle, the
alt-screen exit + main-buffer dump, and the setMouseTracking /
isMouseTrackingOn helpers all removed. The new flow doesn't need
to leave alt-screen, doesn't pollute main scrollback, and doesn't
have the "two histories stacked" bug the dump approach kept hitting.Headline: Event-log sidecar lands as a real kernel artifact and gets its first consumer — replay() reads events.jsonl and runs the same pure reducers
Headline: Event-log sidecar lands as a real kernel artifact and
gets its first consumer — replay() reads events.jsonl and runs
the same pure reducers apply() does in-process. First external
PR merged: deny-with-context, pressing Tab on a tool-confirm modal
lets the user type why they're refusing, forwarded to the model
verbatim. Comment policy now enforced by tests/comment-policy.test.ts
under npm run verify; companion sweep dropped 6.3k LoC of
module-essay docstrings, banner separators, and incident-history
narrative across 148 source files.
events.jsonl sidecar — every kernel Event is
appended to <session>.events.jsonl next to the legacy
LoopEvent log. Append-only, durable, no behavior change for
in-process consumers. Unblocks the v0.14 architecture migration:
any view (CLI, dashboard, replay) can now reconstruct state from
the sidecar without the loop running.replay() reads the sidecar and runs the same pure
reducers as in-process apply(). First proof that the projection
layer is genuinely deterministic — replay(events) matches
apply(...) for the conversation / budget / plan / workspace /
capabilities / status / session-meta views.reasonix events <name> — inspect any session's event
stream from the command line. Filters by event variant
(reasonix events ToolCallStarted), tail mode, JSON output for
piping into jq. Plus a kernel sweep removing the dead-comment
layer that accumulated during the LoopEvent → Event transition.ShellConfirm, WorkspaceConfirm, edit review), pressing
Tab on the Deny option opens inline editing — type a reason, Enter
submits. The reason is appended to the synthetic I denied running … message so the model knows why and can adjust course
instead of plowing ahead. Edit-review path uses a dedicated
DenyContextInput modal (n hotkey opens the reason input, Esc
returns to the diff). Bracketed-paste support in the inline editor
so multi-line context can be pasted in one go./mouse slash command and the
misleading "drag to select & copy" prompt hint — both predated
/copy and gave wrong guidance now that the proper flow is
alt-screen-exit + scrollback dump.tests/comment-policy.test.ts pins six rules
derived from CLAUDE.md: ≤2-line module headers, no Phase-N
narrative, no version refs in comments, no incident history
(user reported, screenshot showed, fix for #N), no banner
separators (// ─── helpers ───), ≤3-line block comments. Runs
under npm run verify, which is the pre-push gate. Companion
sweep: 116 module-essay headers compressed to one line, 577
over-long block comments distilled or deleted, 44 banner separators
stripped. Net −6,367 LoC of dead-weight comments across 148 files;
zero behavior change, full lint/typecheck/test green.Headline: Two real bug fixes (post-shell-confirm session lockup, post-workspace-switch ENOENT on edit_file), a new /copy mode for copying across multi
Headline: Two real bug fixes (post-shell-confirm session lockup,
post-workspace-switch ENOENT on edit_file), a new /copy mode for
copying across multi-screen log content, an always-on context-pressure
footer above the prompt, and width-aware chrome that stops dropping
pills when there's clearly room. Plus a quiet refactor: shared UI
primitives, dead-code purge in StatsPanel.
_turnAbort before
returning. Without this, a queued-submit triggered by App.tsx
(ShellConfirm "run once" → loop.abort() + setQueuedSubmit)
produced a spurious aborted at iter 0/64 — stopped without producing a summary the moment the synthetic message reached
the loop, locking the session until the user /retry'd.edit_file interceptor now reads the workspace root via
currentRootDirRef instead of capturing currentRootDir in a
stale closure. Workspace switch (change_workspace → modal approve)
rebound read_file / run_command to the new root but left the
interceptor pointing at the old one — edit_file wrote to the
old path while read_file looked in the new one, surfacing as a
mysterious ENOENT for a file the model had just successfully edited./copy exits the alt-screen, dumps the rendered log to
the main screen, and listens for any keystroke to restore. Native
terminal scrollback + drag-select work on the dump — solves the
"can't copy text that scrolled past the viewport" problem alt-screen
introduced. Re-entering alt-screen and bumping React state forces
Ink to redraw the TUI cleanly. Multiple enter/exit cycles per
session; React tree, event log, model session, prompt draft all
preserved across the toggle.ctx ▰▰▰▱▱▱▱▱▱▱▱▱▱▱ 14K/977K · 1% · sys 5.8K · tools 6.1K · log 0.
Single-row layout matches the chrome bar's ▰▱ visual language.
Width-aware shed for the breakdown segments (input → log → tools →
sys). /context toggles visibility (default on); the rich
4-color stacked breakdown is still pushed to scrollback for
headless / replay surfaces that don't carry the toggle callback.narrow = cols < 120 to width-aware greedy shed. Optional pills
(balance > cache > session > update) drop in priority order only
when string-width math says they won't fit — at 100 cols all
five render where the old code dropped three. Cache pill is now
default-on (cold-start dim treatment instead of hiding).Bar, formatTokens, ChromeRule, ContextCell
promoted to src/cli/ui/primitives.tsx (were duplicated 2-3× across
StatsPanel / ChromeBar / EventLog / log-frame). CtxBreakdownBlock
computeCtxBreakdown extracted to src/cli/ui/ctx-breakdown.tsx
so /context and the footer share the same compute path. StatsPanel
shrunk from 769 → ~280 lines (dead helpers from the chrome
redesign era removed).src/core/events.ts
(25-variant Event union + 7 view types), src/core/reducers.ts
(pure projections + apply / replay combinators), src/ports/*.ts
(6 ports: ModelClient, ToolHost, EventSink, MemoryStore, HookRunner,
CheckpointStore). Types only; zero behavior change. 19 reducer tests
pin the conversation / budget / plan / workspace / capabilities /
status / session-meta projections and prove replay() determinism.Headline: Web dashboard. A top-tier local control plane that lives alongside the TUI — chat, files, MCP, skills, hooks, settings, all on one URL. Plus
Headline: Web dashboard. A top-tier local control plane that lives alongside the TUI — chat, files, MCP, skills, hooks, settings, all on one URL. Plus auto/flash/pro preset rework so model commitment is something you actually understand.
/dashboard slash)A full-screen browser app, embedded HTTP server, 12 panels, modal mirroring back to the live TUI. 127.0.0.1 only, ephemeral token in the URL, CSRF on every mutation.
Foundation (v0.12 base)
src/server/ — Node native http, zero new depssrc/cli/ui/theme.tsChat parity (v0.13a)
/submit routes through handleSubmit so slash commands,
!cmd, @path work identically; SSE /events streams loop
events live; /abort mirrors Esc; /messages snapshots the
log; /modal/resolve lets web pick a ShellConfirm /
ChoiceConfirm / PlanConfirm / EditConfirm — either surface
resolves, the other's modal disappears- / green
+) and unified diffs, kind-specific tool cards (edit_file,
read_file, write_file, run_command), markdown-styled assistant
messages with reasoning blockquote, blinking cursor while
streaming, scroll lock when user reads above bottom, custom
scrollbars in brand paletteObservability (v0.13b)
Mutation surface (v0.14)
Polish (v0.15)
prefers-reduced-motion respectedwindow.error + unhandledrejection +
Preact ErrorBoundary all funnel into a full-screen card with
copy-details + "Report on GitHub" prefilled-issue buttonEditor drawer (post-v0.15)
Live status bar (in Chat)
Live mode pickers (in Chat)
/effortapplyPresetLive/new and /clear)Headline: old fast / smart / max collapsed into model-commitment
vocabulary that actually says what it does.
auto — flash baseline, auto-escalates to pro on
<<<NEEDS_PRO>>> markers or after 3+ tool failure signals.
The default — covers ~96% of turns at flash cost.flash — flash always. No auto-escalation. /pro still
works for one-shot manual escalation.pro — pro always. No downgrade. ~3× flash at the 5/31
discount window, ~12× outside it.autoEscalate: boolean added to the loop (constructor + reconfigure)
gates both auto-escalation paths (NEEDS_PRO marker scavenge +
failure-count threshold). flash and pro presets pass false,
locking the running session to one model.
Legacy fast / smart / max names: still parse from existing
config files but collapse to auto — simpler than mapping the old
semantics onto the new vocabulary, user re-picks if they want flash
or pro explicitly.
applyPresetLive callback in DashboardContext flips the live
loop's model + autoEscalate + reasoningEffort the moment the user
clicks a preset in the web Chat picker — no session restart.
cacheSavingsUsd(model, hitTokens) in src/telemetry.ts — USD
the prompt cache shaved off the bill (miss-price minus hit-price
for cached tokens). Surfaced in reasonix stats dashboard +
/api/usage rolled buckets + the Usage chart.BUILTIN_ALLOWLIST) re-exported for
the dashboard's Permissions panel listing.removeProjectShellAllowed + clearProjectShellAllowed in
src/config.ts.DashboardEvent + ActiveModal types exported from
src/server/context.ts for downstream tooling.1568 vitest tests pass. New test files: tests/server-dashboard.test.ts
(40 tests covering auth/CSRF, every endpoint shape, SSE round-trip,
mid-modal mutations).
Headline: Two long-deferred items land — /permissions makes the shell allowlist auditable and editable from inside the TUI, and Streamable HTTP MCP tr
Headline: Two long-deferred items land — /permissions makes the
shell allowlist auditable and editable from inside the TUI, and
Streamable HTTP MCP transport (2025-03-26 spec) clears the last debt
from the v0.3 deferred queue.
/permissions — list / add / remove / clear the shell
allowlist without leaving the session. Bare /permissions shows
the current edit mode (review / auto / yolo with a yolo-bypasses-
allowlist banner), the per-project entries with 1-based indices,
and the read-only builtin list grouped by leading verb. Subcommands:
/permissions add <prefix> (multi-token OK), /permissions remove <prefix-or-N> (literal match or list index), /permissions clear confirm. Refuses to add a prefix that's already in the builtin
list (no redundant project entry) and refuses to remove a builtin
(read-only). Mutating subcommands require code mode. perms
registered as alias.removeProjectShellAllowed + clearProjectShellAllowed
exported from src/config.ts. The remove helper does literal-
prefix match (not prefix-of-prefix), so dropping git doesn't
accidentally remove git push origin main if both were stored.src/mcp/streamable-http.ts implements the new single-endpoint
protocol. POSTs JSON-RPC frames, handles all three response shapes
(202 Accepted for notifications, application/json for single
responses, text/event-stream for multi-frame streams covering
progress + response). Captures Mcp-Session-Id from the first
response that hands one out and echoes it on every subsequent
request; surfaces 404-with-session as a "session expired" error
so callers know to reinitialize. Long-lived GET stream for
unsolicited server-initiated frames is deliberately deferred —
POST-only handles full request/response/notification traffic
for every server we'd realistically point at today.streamable+http(s):// prefix routes to the
new transport ({ transport: "streamable-http", url, name }).
Plain http(s):// still routes to SSE (2024-11-05) so existing
--mcp config entries keep working without surprise upgrades.
Wired through chat.tsx, run.ts, and reasonix mcp inspect.
Public API gains StreamableHttpTransport + the
StreamableHttpMcpSpec type re-export.tests/permissions-slash.test.ts — 16 tests covering listing,
add, remove (by prefix and by 1-based index), clear, mode banner,
builtin-collision rejection, codeRoot guard, alias.tests/config.test.ts — 6 new tests for removeProjectShellAllowed
/ clearProjectShellAllowed (literal-only matching, scoping per
project, idempotent counts).tests/mcp-streamable-http.test.ts — 8 tests against an in-process
http.Server fake that speaks the 2025-03-26 wire shape: JSON
response delivery, 202 ack as no-op, session-id capture+echo,
multi-frame SSE ordering (progress → response), full McpClient
initialize → tools/list round-trip, 404+session = "expired",
500-as-error from send(), close() unblocks idle iterators.tests/mcp-spec.test.ts — 4 tests for the new prefix parsing.1521 tests pass (+24). Lint / typecheck / build clean.
Headline: Local semantic search lands as an opt-in pillar — Ollama- backed embedding index, reasonix index CLI with progress spinner, a /semantic slas
Headline: Local semantic search lands as an opt-in pillar — Ollama-
backed embedding index, reasonix index CLI with progress spinner, a
/semantic slash for status, and bilingual (zh/en) prompts. Plus a
trio of subagent abort races that made Esc silently fail to stop a
running subagent.
reasonix index — new CLI command that walks the project, line-
windows source files, embeds via Ollama (nomic-embed-text by
default, ~274 MB once), and persists a JSONL index at
.reasonix/semantic/. Incremental by default (mtime-based), with
--rebuild for a full wipe. Per-chunk failures are logged + skipped
so one bad file doesn't kill a 30-minute build.ollama serve or ollama pull <model>
with [Y/n] confirms. --yes for scripts. Non-TTY exits cleanly
with a remediation hint.⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏ ticks every
120ms via setInterval, INDEPENDENT of progress events. Builds
that take 30+ seconds never look hung. Non-TTY mode keeps phase
lines + heartbeats for parseable CI logs.maxChunkChars cap (default 4000 ≈ 1000
tokens) with line-boundary splitting for oversized windows and
hard-truncation for single overlong lines. Fixes Ollama 500 "the
input length exceeds the context length" on minified / dense files.semantic_search tool — registered in reasonix code only when
an index exists. Tool description is now directive ("FIRST CHOICE
for descriptive queries"); the code-mode system prompt grows a
# Search routing fragment when the tool is registered, telling
the model to prefer semantic_search for intent-style questions
and fall back to grep for exact tokens./semantic slash — shows status (built? Ollama installed?
daemon up?) plus how-to-enable hints. Fire-and-forget pattern, same
as /kill — sync placeholder, async post via ctx.postInfo.src/index/semantic/i18n.ts with EN/ZH dicts
for every preflight + /semantic + progress label. Locale
detection: REASONIX_LANG override → LANG/LC_ALL/LC_MESSAGES
(Unix) → Intl.DateTimeFormat (Windows fallback) → en. Tool
descriptions and CLI --help stay English on purpose (model-facing
text aligns with training distribution; commander's --help is
registered once at boot).reasonix code launch.
If an index exists, the tool registers; otherwise the bootstrap
is a no-op. Discovery happens via /semantic when the user is
curious, or via the explicit reasonix index command.Esc abort racesaddEventListener("abort", …) doesn't replay aborts — DOM
semantics: an already-aborted signal won't fire the abort event
again, so a parent that aborted before spawnSubagent attached
its listener silently lost the cancel. Sync-check .aborted at
attach and forward immediately to childLoop.abort().step() was overwriting aborted state — at the top of
step() we reassign _turnAbort = new AbortController(). If
loop.abort() had been called BEFORE step() ran, the prior
aborted controller was discarded and the fresh one started clean.
Carry the aborted bit forward so the iter-0 check still bails.forcedSummary was treated as success — when the loop aborted
it yielded a synthetic assistant_final with forcedSummary: true
and content "[aborted by user (Esc) — no summary produced.]".
The subagent stuffed that into final and returned success: true,
so /skill cheerfully reported "subagent finished" with the abort
message as the answer. Now forcedSummary routes to errorMessage
→ success: false → caller renders the error.docs/ — bilingual landing page (auto-
detect via navigator.language, manual EN/中文 toggle, persisted
per-browser), brand-gradient dark theme, hero terminal animation
that mirrors the real TUI rendering primitives (◇/◆ role glyphs,
yellow tool pills, rounded cyan EditBlockRow with - old red /
+ new green diff lines, info-row pending/applied status).README.zh-CN.md — full Chinese mirror of README.md. Both
READMEs now carry a language switcher header at the top.tests/semantic-chunker.test.ts — line-window splitting, overlap,
forward-slash path normalization, NUL-byte sniff; the new
chunkText cap behavior (multi-line split + hard-truncate-overlong-
line + idempotent passthrough).tests/semantic-store.test.ts — JSONL roundtrip, cosine ranking,
minScore threshold, dim-mismatch refusal, model-mismatch refusal,
remove + wipe, fileMtimes.tests/semantic-embed-tolerant.test.ts — embedAll returns
Array<Float32Array | null> on per-chunk error (mocked Ollama 500),
abort still throws globally, all-fail surface, progress fires once
per chunk regardless of outcome.tests/semantic-i18n.test.ts — locale detection precedence,
override env var, placeholder substitution, ZH dict.tests/semantic-bootstrap.test.ts — registers when index exists,
silent skip otherwise (no startup prompt).tests/semantic-slash.test.ts — /semantic status renderer,
enabled / not-built / Chinese-locale paths.tests/semantic-launcher.test.ts — findOllamaBinary contract.tests/code-prompt.test.ts — search-routing fragment is absent by
default and present + ordered before .gitignore when the flag is on.tests/subagent.test.ts — regression: parent signal already aborted
at dispatch time (race we previously dropped on the floor).src/code/prompt.ts — codeSystemPrompt(rootDir, opts?) grew
a hasSemanticSearch flag; the routing fragment is appended only
when the tool is actually registered. Cache prefix stays stable per
session because the flag is captured at launch.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Headline: Cost control becomes a first-class pillar. Default flips flash-first, v4-pro is opt-in, tool results auto-compact between turns, and the TUI
Headline: Cost control becomes a first-class pillar. Default flips
flash-first, v4-pro is opt-in, tool results auto-compact between
turns, and the TUI grows per-turn cost visibility + a /pro
one-shot upgrade. Month-over-month cost on an active coding project
drops ~6–10× in practice.
deepseek-v4-flash, not deepseek-v4-pro.
reasonix code, reasonix chat, and subagents all land on flash
by default. Users who need the frontier tier:
/preset max, /pro, or --model deepseek-v4-pro on CLI.branch or harvest anymore — both were hidden multipliers. The
new matrix:
| preset | model | effort | harvest | branch |
|---|---|---|---|---|
| fast | v4-flash | high | off | 1 |
| smart (default) | v4-flash | max | off | 1 |
| max | v4-pro | max | off | 1 |
Users who want branching still get it via /branch N; users who |
||||
want harvest still get it via /harvest on. Neither is implicit. |
smart (was fast). Flash + full
thinking budget is the best price/quality point for coding.deepseek-chat / deepseek-reasoner aliases scheduled for
removal. Still accepted (they map to flash non-thinking /
thinking), but every user-facing surface (/models, setup wizard,
--help) now advertises v4-flash / v4-pro only./pro single-turn arming — queue v4-pro for just the next
turn; auto-disarms after. Separate from /preset max (persistent)
so "this one task is hard" doesn't require a preset round-trip.
Status bar shows ⇧ pro armed in yellow while queued, ⇧ pro escalated in red while the turn is actually running on pro.edit_file SEARCH-not-found errors + ToolCallRepair fires per
turn. 3+ signals flip the rest of the turn to v4-pro with a
visible warning row. Counter resets at every turn start. No
silent cost surprises.<<<NEEDS_PRO>>>) — system
prompt teaches the model that when a task CLEARLY exceeds flash's
capability (complex architecture, subtle correctness, genuine
design trade-offs), emit the marker as the first line of its
response. The loop aborts that call, retries this turn on pro,
one shot. Guarded against infinite retry (pro never self-
escalates) and streaming output is buffered so the marker never
flickers on-screen before the retry fires.read_file output stops re-paying its cost on every
future prompt. The proactive in-turn threshold also dropped from
60% → 40% so the reactive 80% path rarely fires.v4-flash + effort=high. Skill
frontmatter model: / effort: remain the per-skill override.submit_plan pushes a dedicated role: "plan" row into the
Static log (rendered via the full markdown pipeline, never
truncated); the PlanConfirm modal below shrinks to a tight
approve/refine/cancel picker. Long plans are fully readable via
terminal scrollback.TUI_FORMATTING_RULES and
NEGATIVE_CLAIM_RULE live once in src/prompt-fragments.ts,
embedded into every system prompt (main code, default chat,
subagent, built-in skills). Three near-identical copies
collapsed; subagents gain the "don't assert absence without
checking" guardrail they previously lacked.run_skill accepts decorated names. The Skills index wrote
entries like - 🧬 explore, and models copied the whole thing
verbatim into run_skill({name:"🧬 explore"}). The index now
uses a trailing [🧬 subagent] tag after the name, and
run_skill normalizes inputs by stripping bracketed tags +
leading emoji before lookup. Handles "🧬 explore",
"[🧬 subagent] explore", "explore [🧬 subagent]", etc.edit_file result no longer shown twice. The interceptor's
applyNow was pushing an info row, and the loop's tool event
re-displayed the same text as a proper tool row. Dropped the info
row push; the tool row alone carries the content.run_command / run_background descriptions teach their shell
constraints upfront. Explicit list of rejected operators
(&&, ||, |, ;, >, <, 2>&1), the cd doesn't-persist
rule, a warning against unbounded-output commands (netstat -ano,
find /), and concrete alternatives (npm --prefix, cargo -C,
git -C). Models stop burning turns rediscovering these via
error replies.LiveRows.tsx, edit-history.ts, useEditHistory.ts,
useCompletionPickers.ts, useSessionInfo.ts, and
useSubagent.ts. Every hook under 310 lines.dispatch.ts), and 10 per-topic handler files
all under src/cli/ui/slash/. Adding a command now means editing
one handler file + one registry line.docs/ARCHITECTURE.md rewritten for v0.6. The four pillars,
current module layout (slash + handlers + hooks all reflected),
design-evolution timeline replacing the stale roadmap,
non-goals updated to call out "automatic cost escalation without
user-visible announcement" as explicitly rejected.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Headline: reasonix stats is now a cross-session cost dashboard.
Headline: reasonix stats is now a cross-session cost dashboard.
Every turn reasonix chat|code|run executes now appends one line to
~/.reasonix/usage.jsonl carrying tokens + cost + the equivalent
Claude Sonnet 4.6 cost. reasonix stats (no arg) rolls that log up
into today / week / month / all-time windows:
Reasonix usage — /Users/you/.reasonix/usage.jsonl (2.3 KB)
turns cache hit cost (USD) vs Claude saved
----------------------------------------------------------------------
today 8 95.1% $0.004821 $0.1348 96.4%
week 34 93.8% $0.023104 $0.6081 96.2%
month 127 94.2% $0.081530 $2.1452 96.2%
all-time 342 94.0% $0.210881 $5.8934 96.4%
most used model: deepseek-reasoner (84% of turns)
top session: default (214 turns)
tracked since: 2026-04-20
Pillar 1's pitch (94–97% cost reduction vs Claude) turns from a
blog number into a fact users can check on their own machine. The
savings column is derived per turn (not synthesized) from the
existing claudeEquivalentCost() helper in src/telemetry.ts.
Back-compat: reasonix stats <transcript> still works — passing a
path falls back to the old per-file summary (assistant turns + tool
calls). No arg → dashboard.
Privacy: the log contains tokens + costs + the user-chosen session name, nothing else. No prompts, no completions, no tool args.
/stats slash — same dashboard, in-session. Reads
~/.reasonix/usage.jsonl and renders via the shared
renderDashboard pure function, so the shell command and the
slash stay in sync by construction.src/usage.ts — appendUsage (best-effort JSONL write,
swallows disk failures so a read-only ~/ never breaks the
turn), readUsageLog (malformed-line tolerant), aggregateUsage
(rolling windows: 24h / 7d / 30d / all, plus model + session
histograms), bucketCacheHitRatio, bucketSavingsFraction,
formatLogSize.src/cli/ui/App.tsx (assistant_final event) and
src/cli/commands/run.ts (CI / scripting turns land in the same
log as TUI turns).reasonix stats. No-arg → dashboard; transcript arg
→ legacy per-file summary. renderDashboard(agg, path) is an
exported pure function so tests can assert the string output.tests/usage.test.ts covers: appendUsage round-trip, empty
log / malformed-line tolerance / parent-dir auto-creation / silent
write-failure (points path at a regular file), aggregateUsage
(empty, rolling-window bucketing, cross-record sums, byModel +
bySession sort + (ephemeral) grouping), bucket helpers with zero
denominators, renderDashboard (row labels + em-dash fallback).Headline: Hooks — user-defined automation that fires at four well-known points in the loop. Same two-scope layout (project + global) as memory and ski
Headline: Hooks — user-defined automation that fires at four well-known points in the loop. Same two-scope layout (project + global) as memory and skills.
A hook is a shell command. Reasonix invokes it with stdin = a JSON
envelope describing the event. The exit code drives the decision:
0 = pass, 2 = block (only on PreToolUse / UserPromptSubmit),
anything else = warn (rendered inline as a yellow row, the loop
keeps going). Block on a tool event swaps the dispatch for a
synthetic tool result carrying the hook's stderr — the model sees
a structured refusal instead of a silent omission, and can
reason about what to do next.
Settings file:
// <project>/.reasonix/settings.json ← committable
// ~/.reasonix/settings.json ← per-user
{
"hooks": {
"PreToolUse": [{ "match": "edit_file|write_file", "command": "bun scripts/guard.ts" }],
"PostToolUse": [{ "match": "edit_file", "command": "biome format --write" }],
"UserPromptSubmit": [{ "command": "echo $(date +%s) >> ~/.reasonix/prompts.log" }],
"Stop": [{ "command": "bun test --run", "timeout": 60000 }]
}
}
Project hooks fire before global hooks. match is anchored regex
on the tool name (* or omitted = match every tool); ignored for
prompt / Stop events. Per-hook timeout overrides the defaults
(5s for blocking events, 30s for logging events). The CLI loads
both files at App mount; /hooks lists what's active and
/hooks reload re-reads disk without tearing down the running
loop (so the append-only log is preserved).
Deliberate non-goals for v1: workflow DSL, conditional chaining, hook templates. Hooks are shell commands — the user already has a programming language, we don't need to invent one.
src/hooks.ts — loadHooks (project + global merge),
runHooks (event filter + stdin JSON + spawn dispatch),
decideOutcome (pure exit-code → decision matrix), matchesTool
(anchored-regex name filter), formatHookOutcomeMessage (single
source of truth for the warning row text). Spawner is injectable
for tests; default uses shell: true so &&, pipes, env
expansion all behave the way they do in the user's terminal.CacheFirstLoopOptions.hooks + hookCwd. Loop dispatches
PreToolUse (around line 866 in src/loop.ts) and PostToolUse
(immediately after dispatch). loop.hooks is mutable so
/hooks reload can swap the list without rebuilding the loop.UserPromptSubmit + Stop. App.tsx calls
runHooks before pushing the user message (block = drop the
prompt) and after loop.step resolves (warnings only, since the
turn already ended)./hooks slash command. list (default) groups loaded hooks
by event with scope tags; reload re-reads settings.json from
disk via the App-provided reloadHooks callback./update slash command. Shows current vs the last-resolved
latest (piggybacks on App.tsx's mount-time background check) and
prints the exact shell command to upgrade. Deliberately does NOT
spawn npm install from inside the TUI — stdio:inherit into a
running Ink renderer corrupts the display, and on Windows the
currently-running binary can be locked. Users exit the session
and run reasonix update in a fresh shell.tests/hooks.test.ts — loadHooks (empty / project+global / array
order / ignore malformed entries / tolerate malformed JSON / no
project root → global only / path helpers), matchesTool (* /
anchored regex / substring rejected / malformed regex falls back
to no-match / non-tool events ignore match), decideOutcome
(exit 0 / exit 2 / non-zero / timeout / spawn error per event),
runHooks (filters by event+match before running, stops at first
block, doesn't stop on warn, stdin envelope shape, cwd routing,
default timeouts, per-hook timeout override), formatHookOutcomeMessage
(pass → empty / non-pass includes scope+command+detail / 60-char
truncation).tests/loop-hooks.test.ts — CacheFirstLoop accepts a hook list,
default empty, loop.hooks is mutable, hookCwd defaults to
process.cwd() and honors override, no-tool turn doesn't fire
PreToolUse hooks.tests/slash.test.ts — updated suggestSlashCommands("h") to
include the new hooks command; added 4 tests for /update
(pending / up-to-date / upgrade-available / suggest-surfaces-it).Headline: Version display in the TUI header + reasonix update self-upgrade command.
Headline: Version display in the TUI header + reasonix update
self-upgrade command.
Two small quality-of-life additions. The stats panel now carries the
running version (Reasonix v0.4.22 · model …) so users can tell at
a glance whether they're on the latest build; a 24-hour background
check against the npm registry quietly surfaces a yellow
update: X.Y.Z nudge on the right side of the same row when a
newer version has been published. The nudge never blocks startup —
the fetch is bounded at 2s with a 24h on-disk cache, and any
failure (offline, firewall, registry hiccup) is silent by design.
reasonix update is the command form: detects whether you're
running a global install vs an ephemeral npx spawn, and either
spawns npm install -g reasonix@latest for the former or prints a
cache-refresh hint for the latter. --dry-run prints the plan
without executing.
The VERSION constant now sources from package.json at runtime
(walking up from import.meta.url) instead of a hand-maintained
literal, so it can never drift again — it was stale at 0.4.20
before this release. Tests assert they stay in sync.
src/version.ts — exports VERSION, compareVersions,
getLatestVersion, isNpxInstall, and the
LATEST_CACHE_TTL_MS / LATEST_FETCH_TIMEOUT_MS constants.
getLatestVersion caches to ~/.reasonix/version-cache.json
(24h TTL) and returns null on any failure.reasonix update subcommand (src/cli/commands/update.ts).
planUpdate() is the pure decision function, updateCommand()
is the CLI orchestrator with test seams (fetchLatest, isNpx,
spawnInstall, write, exit).v${VERSION} inline, plus an
update: X badge (yellow, bold) on the right when
updateAvailable is passed. App.tsx fires the registry check
in a background useEffect on mount; only a version strictly
newer than the running one flips the state.VERSION constant. src/index.ts hard-coded
"0.4.20" while package.json was on 0.4.21. Replaced with a
re-export from src/version.ts, which reads the manifest on
first access. A regression test pins them together.tests/version.test.ts — VERSION === package.json.version,
compareVersions covers numeric + pre-release ordering,
isNpxInstall covers the three detection paths,
getLatestVersion covers cache hit / force-refresh / expired
entry / network failure / bad body / cache-write failure.tests/update-command.test.ts — planUpdate returns the
correct action for all four decision quadrants; updateCommand
respects every seam: no-spawn on up-to-date, no-spawn on npx,
spawns on global-behind-latest, honors --dry-run, exits
non-zero on registry failure, surfaces npm's non-zero exit.…resolution) and Node 21.7.3+/24 (broken by CVE-2024-27980's prohibition on direct .cmd/.bat spawns with shell: false). Unix behavior unchanged. Plus:…
Headline: Windows shell hotfix + StormBreaker visibility.
reasonix code now runs npm, npx, tsc, yarn, pnpm, bun,
pytest, and every other .cmd / .bat wrapper on Windows — both
under Node 18/20 (broken by missing PATHEXT resolution) and Node
21.7.3+/24 (broken by CVE-2024-27980's prohibition on direct
.cmd/.bat spawns with shell: false). Unix behavior unchanged.
Plus: the StormBreaker anti-loop-detector no longer silently halts
a turn — when it fires it emits a visible warning row explaining
what was suppressed and what the user should do next, and its
sliding window resets on each new user message so a new intent
doesn't inherit the previous turn's repeat patterns.
spawn npm ENOENT on Windows — child_process.spawn with
shell: false uses CreateProcess, which ignores PATHEXT. Bare
npm failed because no npm.exe exists — only npm.cmd. New
resolveExecutable(cmd) walks PATH × PATHEXT manually and
returns the full resolved path (C:\Program Files\nodejs\npm.CMD)
before handing to spawn. Keeps shell: false (no shell expansion
of piped / chained commands — the whole reason we avoided
shell: true to begin with).spawn npm EINVAL on Node ≥ 21.7.3 / 24 — even with the
resolved .cmd path, Node's post-CVE-2024-27980 patch refuses to
execute .cmd / .bat files via direct spawn. Second layer:
prepareSpawn() detects a .cmd / .bat target on Windows and
rewrites the invocation to cmd.exe /d /s /c "<bin> <args…>"
with windowsVerbatimArguments: true. Each arg is routed through
quoteForCmdExe(), which wraps in double quotes when the arg
contains whitespace or cmd.exe metacharacters
(" & | < > ^ % ( ) , ; !) and doubles embedded quotes per
cmd.exe's "" escape rule. Arguments like a&b stay literal;
they don't become shell operators.resolveExecutable(cmd, opts?) — exported from src/tools/shell.ts.
Windows PATH × PATHEXT resolver. Opts lets tests inject platform,
env, and isFile so the Windows-specific path can be exercised
from a Linux CI runner without touching real fs.
prepareSpawn(argv, opts?) — exported. Returns the
(bin, args, spawnOverrides) tuple that runCommand should pass to
child_process.spawn. On non-Windows it's a passthrough; on
Windows it applies the PATHEXT lookup and the cmd.exe wrapping
when needed. Unit-tested without spawning real processes.
quoteForCmdExe(arg) — exported. The per-arg quoting
function. Round-trip tested against realistic argvs
(npm install, paths with spaces, args containing
& | < > ^, empty strings, embedded double quotes).
Silent storm-break. When StormBreaker caught a repeated
(tool, args) pattern it dropped the offending call but emitted
nothing user-visible beyond a small [repair] broke 1 storm note
on the assistant row. If the suppressed call was the only tool
call of the turn, the turn just ended — no explanation of why
nothing happened. Now the loop yields a dedicated warning event
(same channel as Esc-abort and budget warnings) with an
actionable message, distinguishing "all calls suppressed (stuck
retry)" from "some calls suppressed" cases.
StormBreaker state bleeds across user turns. The sliding
window of recent signatures persisted for the lifetime of the
loop, so a stuck pattern from an earlier intent could false-
positive against the user's legitimate new "try again with
different input" request. CacheFirstLoop.step() now calls
repair.resetStorm() on every new user turn — the window
repopulates naturally as the new turn's tool calls fire, and
genuine repeats still trip after the usual 3-in-a-row pattern.
ToolCallRepair.resetStorm() — exposes StormBreaker.reset
through the repair facade. Called by the loop at each user turn;
library consumers that drive repair.process manually can use it
too if they wrap their own turn semantics.tests/shell-tools.test.ts (+21) — resolveExecutable on
non-Windows (passthrough), PATHEXT walk (first-hit ordering,
whitespace-tolerant PATHEXT entries), absolute-path / slash /
already-extensioned passthrough, empty input, missing PATH /
PATHEXT. quoteForCmdExe (simple identifiers unquoted, whitespace
""). prepareSpawn (unix passthrough, .cmd wraps via
cmd.exe, .bat wraps too, .exe direct, metachar args quoted,
PATHEXT miss falls through).tests/repair/pipeline.test.ts (+1) — resetStorm clears the
repeat-window so post-reset calls aren't suppressed.tests/loop.test.ts — the iter-budget warning test refined to
filter by the iter-specific pattern, since identical fixture
calls now also trip the (correct) storm warning.runCommand in src/tools/shell.ts now calls prepareSpawn
instead of spawning argv[0] directly. Every codepath that was
going through spawn still does; the bin / args /
spawnOverrides it receives are platform-normalized.readOnlyCheck plan-mode gate + timeout /
output-cap / AbortSignal wiring is untouched.CacheFirstLoop.step() now resets the StormBreaker at the top of
each turn AND emits a warning event after repair.process()
when report.stormsBroken > 0. The existing repair field on
assistant_final still carries the count for historical records
/ transcripts.Headline: Plan Mode — the model can propose a markdown plan autonomously for large tasks (multi-file refactors, architecture changes, ambiguous reques
Headline: Plan Mode — the model can propose a markdown plan
autonomously for large tasks (multi-file refactors, architecture
changes, ambiguous requests), and you can also force a read-only
exploration phase via /plan. Picker shows Approve / Refine / Cancel.
Approve pushes a synthetic "implement now" message; Refine keeps the
model exploring; Cancel drops the plan. Designed around Pillar 1 —
tool specs stay pinned, so the cache prefix doesn't break when plan
mode toggles.
submit_plan tool (src/tools/plan.ts) — registered by default
in reasonix code. Throws PlanProposedError carrying the plan
text via the new toToolResult() protocol on ToolRegistry. Fires
the picker whether or not plan mode is active — the model is
expected to propose plans on its own for large tasks; /plan is
the stronger constraint that forces the model into read-only./plan slash (code mode only) — toggles read-only plan mode.
/plan on, /plan off, or /plan to flip. While on, the registry
refuses non-read-only dispatch; while off, the model can still
propose plans autonomously via submit_plan. /status surfaces the
state; StatsPanel shows a red PLAN tag./apply-plan slash (code mode only) — force-approve fallback.
Clears plan mode, clears the pending-plan picker state, and
resubmits the implement-now synthetic via the existing resubmit
mechanism. Useful when the model wrote the plan in assistant text
instead of calling submit_plan, or when you want to keyboard-only
the approval without the picker.ToolDefinition.readOnly + readOnlyCheck — declarative gate
used by ToolRegistry.dispatch when plan mode is on. Read tools
(read_file, list_directory, search_files, directory_tree,
get_file_info, web_search, web_fetch) run normally. Write
tools bounce with a refusal the model reads and learns from.
run_command uses a dynamic readOnlyCheck so allowlisted
invocations (git status, cargo check, npm test, grep, …)
still work during planning — exploration isn't gated. Non-allowlisted
commands refuse just like other writes.ToolRegistry.setPlanMode(on) / .planMode — the enforcement
switch + accessor. Mirrored onto the UI's planMode React state so
the StatsPanel badge stays in sync.toToolResult() extension protocol on Error subclasses —
ToolRegistry.dispatch calls it if present when an error is thrown,
serializing custom fields alongside error. Used by
PlanProposedError to ferry the plan text to the UI without
regex-scraping the error message. Falls back safely on serialization
failure.PlanConfirm.tsx — 3-option Ink picker (Approve / Refine /
Cancel) with the plan rendered as live Markdown (via the
existing Markdown component — headings, lists, code, bold all
formatted, not raw text) in a cyan-bordered panel above. 2 400-char
rendered cap; longer plans get a "use /tool for full" truncation
marker. Live rows hidden while the picker is up, matching
ShellConfirm's behavior. When the plan contains headings like
"Open questions", "Risks", "Assumptions", "待确认", "开放问题", "风险",
"未知", "假设", "不确定", the picker auto-selects the Refine option
by default and shows a yellow "▲ the plan has open questions —
pick Refine to answer them" hint above the options.PlanRefineInput.tsx — inline text input that appears after
the user picks either Approve or Refine. Picking Approve
lets the user type last-minute instructions or answers to the
model's open questions (blank Enter = approve as-is). Picking
Refine requires specifics — the input collects them and includes
them verbatim in the synthetic sent to the model, so "refine"
actually means "revise with this feedback" instead of the generic
"try again" message the first cut sent. Esc returns to the picker
without resuming the loop.CODE_SYSTEM_PROMPT) — teaches the
model when to call submit_plan autonomously (big / risky / ambiguous
tasks) vs. just making the change (typos, obvious one-line fixes),
and how /plan mode adds the stronger dispatch gate on top.tests/plan.test.ts (+17) — ToolRegistry plan-mode gate
(default-off, toggle, block non-read-only, allow read-only, honor
readOnlyCheck per-args, precedence over readOnly, off-mode
noop); toToolResult protocol (serializes custom fields, falls
back on serializer failure); PlanProposedError carries plan +
STOP directive; registerPlanTool registers submit_plan as
read-only, fires picker both in and out of plan mode, rejects
empty plans, trims whitespace.tests/slash.test.ts (+7) — /plan registry entries + required
commands check; /plan toggle / on / off / true / false / 0 / 1;
/plan info text explicit about the stronger-constraint
relationship; /apply-plan code-mode gating; /apply-plan flips
mode + clears pending + resubmits; works without optional
clearPendingPlan callback; /status plan-mode line appears
iff on.src/tools/filesystem.ts — read_file / list_directory /
directory_tree / search_files / get_file_info tagged readOnly.src/tools/shell.ts — run_command gets readOnlyCheck tied to
the existing isAllowed check + allowAll escape hatch.src/tools/web.ts — web_search / web_fetch tagged readOnly.src/cli/commands/code.tsx — registerPlanTool(tools) added after
the filesystem and shell registrations so the tool is always in
the pinned spec list (prefix cache stays stable across
plan-mode toggles).src/index.ts — re-exports PlanProposedError, registerPlanTool,
PlanToolOptions for library consumers.