Changelog
Release notes pulled live from the project changelog - the notable changes per version, shorter than the raw commit history.
v0.9.2
LatestAdded- Added Claude Opus 5.5 to the Anthropic catalog: 1M context, image input, xhigh and max effort levels, and the mid-conversation effort and system-message support the newer Opus models use.
- Added Grok 4.7 to the xAI catalog and made it the default xAI model. xAI models now carry their long-context pricing tier, so requests above 200k input tokens are costed at the higher rate.
- Added the
context_with_systemextension event. It runs after thecontexthandlers on the full transcript, system messages included, and its result is sent as returned. - Added per-model image resize profiles through
inputLimits.images.resizeinmodels.jsonandmodelOverrides. File attachments,readand tool-result images are resized once for the selected model before they enter history; built-in vision models carry the previous 2000x2000, 4.5 MiB default explicitly. - Added a crash hint naming loaded extensions whose files appear in the crash stack trace, with the commands to disable them.
- Added append-only context edits and actionable turn boundaries for extensions. A
context_editentry omits or replaces an earlier message in future model requests without changing raw history, usage or exports, andturn_endplus the newagent_before_settleevent can append entries and ask for one more provider request. Seedocs/extensions.mdanddocs/session-format.md. - Added a session scratchpad, off by default:
/tools scratchpad ongives the agent a private per-session temp directory for throwaway files and restores itsnotes.mdthere after each compaction.
Changed- Changed the session file to be the source of model context. SDK code that assigned
session.agent.state.messagesto restore history no longer affects the next request: restore withSessionManager.inMemory(cwd, { id }, entries)or move withsession.navigateTree(). Extensions that switch exhaustively must handle thecontext_editentry and theagent_before_settleevent,turn_endevents now carry the persisted entry ids, and runs started from anagent_settledhandler wait until every settled handler has finished.
Removed- Removed the
shouldStopAfterTurnagent option. Return{ action: "end" }fromfinishTurninstead, and return nothing for error and aborted responses to keep the old normal-response-only behaviour.
Fixed- Fixed a missing or invalid
--modevalue being silently ignored; KnightCode now reports the valid values and exits with a nonzero status. - Fixed split-turn compaction summaries being refused by Claude Fable 5.1. The summarization request now separates the conversation from the instructions and asks for a continuation checkpoint instead of a prefix summary.
- Fixed image-only prompts being rejected by some OpenAI-compatible providers, which refused the empty text part sent alongside the image.
- Fixed text files that begin with
GIFbeing treated as images and left out ofreadand@fileinput. Detection now requires the full GIF87a or GIF89a signature. - Fixed
/buguploading a report in offline mode. Uploads are refused with a pointer to Export as Zip, which still works offline. - Fixed prompt templates with invalid YAML frontmatter being dropped silently. They are now reported as resource warnings, and valid templates beside them still load.
- Fixed the jump-to-latest label in fullscreen mode shifting sideways when the scrollbar auto-hides.
- Fixed abandoned attempts staying in the model's context after an error retry or a length/overflow recovery. The retried request now omits them; the raw transcript, exports and usage totals still show them.
- Fixed
contextextension handlers that filter or slice messages dropping the system prompt and tool declarations, which after extension-driven compaction left requests without built-in tools. Handlers no longer see system messages, and KnightCode restores the prompt and tools after they run. - Fixed custom OpenAI-compatible endpoints receiving strict tool schemas they may reject. Built-in models that support strict tools keep them, and a custom model can opt back in with
compat.supportsStrictMode: true. - Fixed session files with an invalid session id in their header opening normally. Extensions build directory paths from that id, so such a file is now refused with the same error as an invalid
--session-id.
v0.9.1
Added- Added the shipped Radius model catalog, so Radius models are listed in
/modelbefore the first gateway refresh and while offline; the fetched gateway catalog still overrides it. - Added the Meta provider:
/login metasigns in with a Muse subscription through Meta's device authorization flow and mints a Model API key that is refreshed automatically, andMETA_API_KEYworks as an ordinary API key. - Added prompt cache warming, which keeps a provider's prompt cache alive between turns where the model's cache lifetime is known, with
/settingscontrols and a footer indicator. Extensions can observe or override each refresh. - Added
/bug, which collects a redacted report — version, runtime, model and provider configuration, extensions, settings and this session's error diagnostics, never API keys — and either uploads it to the KnightCode maintainers or writes it as a zip you can attach to an issue yourself. Including the transcript is optional, and declining it offers a model-written summary instead. Crashes are recorded and attached to the next report.
Changed- Changed extension loading to pull in its transform dependencies only when an extension actually needs transforming, which shortens startup for everyone who has no extensions installed.
- Changed the session picker to load progressively, so it opens immediately on a large session directory instead of waiting for every file to be read.
Fixed- Fixed sessions on z.ai stopping instead of compacting when the provider answers a too-long prompt with its
1261error body rather than the usual wording. - Fixed Cerebras requests failing with a 400 when extensions declare both strict and non-strict tools; strict tool schemas are no longer sent to Cerebras.
- Fixed compaction cancellation: aborting during auto-compaction could leave the turn retrying, run an extension handler after the abort, or report a cancelled compaction as a failure.
- Fixed clipboard copying in headless and remote sessions by restoring the OSC 52 fallback when no native clipboard is reachable, including under WSL.
- Fixed the terminal waiting on a remote prompt event that was never awaited, which could drop a prompt sent from the phone.
- Fixed display-math rendering of stacked sub/superscripts, the
\bf-style font switches, andcasesalignment and brace placement. - Fixed slash-command ranking so a
skill:command is matched on its bare name, putting/ideaonskill:research-idearather thanskill:deep-research. - Fixed fullscreen images disappearing in WezTerm, which erased a Kitty image when a later row on top of it was cleared.
- Fixed file-path autocomplete after CJK punctuation: a path typed after a full-width comma or colon now completes, and a completed path containing one is quoted.
- Added the shipped Radius model catalog, so Radius models are listed in
v0.9.0
Added- Added unsubscribe to extension events:
knightcode.on(event, handler)now returns a function that removes that one registration, so an extension can listen once or stop listening without reloading. Removing a handler never affects a dispatch already in progress. - Added what the desktop IDE's first run needs to
knightcode-engine: PUT /v1/models/defaultrecords the model you pick in the IDE as your default, the same setting/modelwrites in the CLI, so both use one choice.GETandPUT /v1/settings/telemetryread and change the install-telemetry setting the CLI already has, so the IDE asks once and both follow the answer. The switch refuses to move whileKNIGHTCODE_TELEMETRYis set in the environment.- When the IDE starts the engine, it sends the same anonymous install ping as the CLI, once per IDE version, and not at all if you turned install telemetry off.
- Added
/undo: pick an earlier user message and go back to it, with the option to restore every file the abandoned turns edited. Files are backed up before eacheditandwrite, so the restore needs no git;/treeand double-Escape offer the same restore.KNIGHTCODE_DISABLE_FILE_CHECKPOINTS=1turns the backups off. - Added click-to-expand for compaction, branch-summary and skill entries in the transcript. A left click toggles them the same way the expand shortcut does.
- Added a
terminaloption toInteractiveMode, so an embedder or test can drive the interactive UI against its own terminal implementation instead of the process's.
Changed- Changed long shell command timings to read as minutes and hours (
26m 32s,2h 3m 4s) instead of a raw seconds count; anything under a minute still shows tenths of a second. - Changed the copy shortcut's description in the hotkeys list and keybinding settings to say what it does: it copies the current selection, or the last assistant message when nothing is selected.
- Changed the transcript types so tool-call arguments and tool-result
detailsare declared as JSON values instead ofany. A tool that puts aDate, a function orundefinedintodetailsis now a type error rather than something that silently fails to round-trip through the session file. - Changed the Kimi For Coding catalog to read from the provider's current listing, which reports the 1M-token context window and low / high / max thinking levels for
kimi-for-coding.
Fixed- Fixed thinking blocks being dropped on the next turn when an Anthropic-compatible endpoint reports a different model name than the one requested. The requested model stays on the message, and the reported one is kept separately for cost attribution.
- Fixed the "Anthropic dropped thinking" notice repeating on every turn and flooding the transcript with per-block reasons. It now shows a short count, only when a response drops more blocks than the previous one, and not again when a session is reloaded; the details stay in the session file.
- Fixed a shell command killed by a signal (an OOM kill,
kill -9, aSIGTERM) being reported to the model as a success. It now fails with the conventional exit code (137 forSIGKILL, 143 forSIGTERM) and keeps the output it produced before dying. - Fixed a bare
400or413with no body from any provider being treated as a context overflow and triggering compaction. Only Cerebras reports overflow that way, so the rule now applies to Cerebras alone. - Fixed automatic compaction doing nothing when the newest tool result alone exceeds the retained-token budget. The cut now falls back to the assistant message that made the tool call, so older history is summarized before the next request instead of the session overflowing.
- Fixed DeepSeek V4.1 Flash offering the wrong thinking levels on OpenRouter and OpenCode Go. Both now expose the low / high / max efforts the model actually accepts, and OpenCode Go lists it under its current ID,
deepseek-v4.1-flash. - Fixed
knightcode-engineanswering a login request whose body is not JSON, or is too large, with a 500 instead of a 400 or 413. - Fixed a
before_agent_starthandler that returnssystemPrompt(or setsforceSystemPrompt) not actually replacing the prompt on models that accept mid-conversation system messages: they kept the original prompt at the head and received the forced text as a later update. The forced prompt is now sent as the leading system prompt for the run, and the session transcript keeps recording the structured sections instead of the forced text. - Fixed fuzzy search in the model, session and file pickers lagging on long lists; matching now skips ahead with a native substring search and returns the same results in the same order.
- Fixed Gemini requests asking for thinking levels a model does not support. Turning thinking off, or picking a level the model lacks, now falls back to the lowest level that model advertises instead of a hard-coded Gemini 3 Pro / Flash guess.
- Fixed llama.cpp models whose chat template supports thinking (Qwen-style
enable_thinking) always running as non-reasoning models. Loaded models are now checked through the server's/props, and those templates get an on/off thinking toggle. - Fixed two transient provider failures ending the turn instead of retrying: Cloudflare
520responses and Azure's "currently experiencing high demand" peak-load rejections are now retried like other overload errors. - Fixed Vercel AI Gateway conversations losing their thinking on the next turn. The gateway returns thinking without a signature for models it translates, and those blocks are now replayed instead of being stripped.
- Added unsubscribe to extension events:
v0.8.0
Added- Added
allowedFallbackModelsto Anthropic model overrides inmodels.json, so you can choose which models the server may fall back to — or set an empty array to turn server-side fallback off. - Added webfetch and websearch tools — a page as pageable, greppable markdown, and results from DuckDuckGo or Brave Search — off until enabled with the new
/toolscommand, which turns each built-in tool off, on for the session, or on by default, and for websearch also picks the provider and stores the Brave API key.
Changed- Changed the system prompt and tool set to live in the transcript instead of being rewritten behind it. A session records when its instructions changed or tools became available, resuming or moving between branches restores that state, and providers that support it keep their cached prompt prefix across the change. Extensions can replace individual prompt sections through
systemPromptOptions.sections, and the deferred-tool loading path is replaced by mid-conversation tool additions on the models that accept them. - Changed a failed copy to say why: instead of a bare "Copy failed" flash, the message now names the missing clipboard backend —
wl-clipboard,xclip/xselor the Termux API package — and stays on screen for five seconds.
Fixed- Fixed a
user_bashhandler that throws or returns a malformed result silently falling back to the local shell — the command is now reported as failed instead of running somewhere the extension meant to prevent. A handler must returnundefined, exactly one of{ operations }or{ result }, and nothing else. - Fixed Baseten requests to carry session-affinity headers so a conversation keeps hitting the same replica and benefits from automatic prompt caching.
- Fixed Bedrock cost reporting to bill one-hour cache writes at their higher rate instead of charging every cache write at the five-minute rate.
- Fixed a local copy reporting success when no clipboard backend actually took the text: the terminal-escape fallback now only counts in a remote session, where it is the terminal that owns the clipboard.
- Fixed the package's public types so extension authors can import the event and result types their hooks receive, such as
ModelSelectEvent,ThinkingLevelSelectEventand the*Resulttypes, instead of redeclaring them. - Fixed the thinking levels offered for Gemini models: they now follow the reasoning efforts each model actually advertises instead of a version-number guess, so newer Flash and Pro models expose their real low/medium/high range.
- Fixed resuming a session by its exact ID reading every transcript in the session directory first, which made startup slow in directories with long histories.
- Added
v0.7.0
Added- Added a
knightcode-enginebinary: a headless local server that owns inference for the desktop IDE, with OpenAI-shaped chat and fill-in-the-middle endpoints. It shares the CLI'sauth.json, so signing in to either product signs in to both. - Added reopening saved sessions to
knightcode-engine, so the desktop IDE restores its threads after a restart instead of failing with "Loading or resuming sessions is not supported by this agent". - Its ACP agent now:
- loads a session, replaying its history;
- resumes, lists, deletes and forks saved sessions;
- lists extension commands, prompt templates and skills under
/; - after an engine restart, reopens a session it no longer holds and retries the prompt.
- Added native deferred tool loading for Fireworks models on the Messages API. Name the loader tool
ToolSearchortool_searchso Fireworks keeps the deferred schemas out of the cached tool prefix. - Added a /remote command that publishes the running session to the web for the signed-in account, with a phone-first app at remote.knightcode.dev that lists live and past sessions, opens every tool call, and runs slash commands in the terminal.
Fixed- Fixed the full-output file of a truncated
!bash command sometimes being empty when read straight away: the command now finishes writing that file before its result, and the file's path, are returned. - Fixed the desktop IDE's open threads offering stale model choices after signing in or out:
knightcode-enginenow refreshes them when an account or the model catalog changes. - Fixed API keys in a project's
.envshowing up in the desktop IDE as signed-in providers that signing out could not remove:knightcode-engineno longer reads a.envorbunfig.tomlfrom the directory the IDE was launched in. - Fixed
/listing no commands in a new, loaded, resumed or forked thread in the desktop IDE:knightcode-enginesent the list before the IDE had registered the session, and the IDE dropped it. - Fixed errors from OpenAI-compatible providers on the Responses API always being labelled as OpenAI errors: the message now names the provider that actually failed.
- Fixed Tab predictions in the desktop IDE repeating the code after the cursor:
knightcode-engine's/v1/completionsnow shows the model your code with the cursor marked in place, and strips code fences from the answer.
- Added a
v0.6.2
Added- Added the Environment Variables reference to the documentation navigation, which previously only reached that page through inline links.
- Added
ctx.modelRegistry.stream()andstreamSimple()so extensions can make model calls through configured providers with resolved authentication, including providers registered by extensions. - Added Ctrl+D as a reliable alternative to Ctrl+S for saving the default model and thinking level. Many terminals (including Windows Terminal) swallow Ctrl+S as XON/XOFF flow control, so the keystroke never reached the app and the default was never saved. Ctrl+S still works where the terminal delivers it.
- Added
compaction.modelOverrides, per-modelreserveTokensandkeepRecentTokensbudgets keyed by exact"provider/modelId", so a million-token model can hold a large response reserve without inflating it for every other model. Each field falls back independently to the ordinary setting and then the built-in default, and the resolved values drive manual compaction, threshold checks, overflow recovery, and thesession_before_compactpayload.
Changed- Changed the DeepSeek catalog to advertise
deepseek-flashfor DeepSeek V4.1 Flash, which accepts images and reasoning levels, in place of the retireddeepseek-v4-flashanddeepseek-v4-flash-vision-expaliases, and refreshed DeepSeek input, output, and cache-read pricing. - Changed OpenRouter requests to send the
x-session-idaffinity header by default on both Chat Completions and Anthropic-compatible models, so cached prompts keep hitting the same upstream replica; settingsendSessionAffinityHeaders: falseor disabling prompt caching still opts out. - Changed the compaction, branch summarization, and retry spinners to render in the editor border alongside the working indicator; custom editors opt in for all four with the same
embedWorkingStatusflag. - Changed the runtime dependencies to current releases, including the Anthropic, Bedrock and Google GenAI SDKs, the proxy agents, TypeBox, undici, chalk, marked, ignore, minimatch, semver, esbuild and grok-mermaid. Google's new
TOO_MANY_TOOL_CALLSfinish reason now maps to an error stop reason.
Removed- Removed GPT-5.4 and GPT-5.4 mini from the OpenAI Codex catalog after ChatGPT accounts lost access to them; selecting either now fails at model resolution instead of at the first request.
Fixed- Fixed agent-level retry backoff doubling without a ceiling, which left the agent asleep for hours after a long provider outage. Assistant and summarization retries now cap each delay at the new
retry.maxAgentDelayMssetting, defaulting to 60 seconds. - Fixed OpenAI Codex requests omitting the reasoning effort when thinking is off, so models that need an explicit Off level fell back to the provider default; the model's mapped Off effort is now sent, and models that map Off to
nullstill send nothing. - Fixed GitHub Copilot GPT models other than GPT-5 being routed to the completions endpoint, which Copilot does not serve them from.
- Fixed the event stream draining its buffered events with
Array.shift(), which made delivery quadratic on long streams; both the event queue and the waiting-consumer queue now use an amortized O(1) FIFO. - Fixed Fireworks Messages models losing their thinking blocks on replay and collapsing native reasoning effort to a budget-based fallback; the catalog now takes effort levels from provider metadata, allows unsigned thinking, and stops advertising GLM 5.2 and Kimi K3 aliases that map onto the same level.
- Fixed Mistral-hosted GLM-5.2 reasoning requests sending
prompt_mode, which that model ignores, so thinking never turned on; they now sendreasoning_effort. - Fixed Mistral Medium reasoning requests sending the unsupported
prompt_modeinstead ofreasoning_effortfor reasoning-capablemistral-medium-*model IDs such asmistral-medium-latest. - Fixed OpenCode and OpenCode Go requests dropping the
x-opencode-sessionrouting header; every API adapter now mapssessionIdonto it while leaving an explicit caller override alone. - Fixed extension tools registered without an object parameter schema being accepted, which broke provider request serialization later; registration now rejects them with an error naming the tool and the extension.
- Fixed steering and follow-up messages bypassing extension
inputhandlers, so extensions could neither transform nor intercept a message queued while the agent was already streaming; both paths now run the handlers and carry their real input source. - Fixed session tree navigation starting while a compaction or another navigation was still running; it now rejects instead of moving the active leaf.
- Fixed a rejected
/treenavigation replacing the running operation's escape handler and status spinner; the compaction or summarization it collided with now keeps its own UI. - Fixed the compiled Windows executable inheriting Bun's own PE resources, so
knightcode.exeshipped with no icon and aFileDescriptionof "Bun" — the string Windows shows as the process name in Task Manager and the taskbar. The win32 build now embeds KnightCode's own title, publisher, copyright, version, and icon. - Fixed fullscreen mode reserving a blank row for a custom footer that renders nothing.
v0.6.1
Added- Added GPT-6 Astra support across tool search, additional tools, long-context pricing, xhigh and max thinking levels, and its explicit thinking-level map.
- Added five-times-faster mouse wheel scrolling while holding Alt in fullscreen mode.
Changed- Changed the generated image model catalog to the current OpenRouter listing.
- Changed the built-in read, write, edit, and bash tools to request strict JSON-schema sampling by default instead of only under
KNIGHTCODE_EXPERIMENTAL. - Changed fullscreen scrollbars to render muted thin tracks with contrasting proportional two-cell-minimum thumbs, reserve an unstyled column in
alwaysmode, reveal hiddenautotracks on pointer entry, expand the same-colored thumb on hover, and support track-click jumping in addition to thumb dragging, with optionalscrollbarTrackandscrollbarThumbtheme colors falling back to muted and text. - Changed fullscreen transcript search to cache unchanged results, index ASCII runs, and highlight only visible matches, so latency no longer grows with transcript size.
- Changed clipboard handling to use small built-in macOS, Windows, and X11 native helpers instead of an external dependency, running native reads on worker threads and making the command-line fallbacks (
pbcopy,clip.exe,wl-copy,xclip) asynchronous. Incremental X11 transfers, legacy text encodings, and native image formats are preserved.
Removed- Removed Grok Build 0.1 from the built-in xAI model catalog.
Fixed- Fixed processes killed by a signal reporting success; they now map to a 128 + signal exit code.
- Fixed compiled binaries shipping without the TUI's native helpers, which left clipboard reads on the command-line fallbacks and dropped Shift+Tab on Windows. Each target's prebuilds are now copied next to the executable.
- Fixed
fdfailing to start on musl-based Linux distributions by downloading the statically linked musl builds of bothfdandripgrep. - Fixed post-login model selection for Radius, whose per-account catalog is empty until the first authenticated refresh; selection now waits for that refresh, defaults to
balanced, and falls back to catalog order. - Fixed the model, scoped-model, and thinking selectors hardcoding Ctrl+S to save; the shortcut is now the
app.models.saveandapp.thinking.savekeybindings and the on-screen hint follows a rebind. - Fixed mouse hover changing selection and recentering autocomplete and settings lists, causing clicks to target a different item.
v0.6.0
Added- Added per-turn thinking effort preservation for Claude models, so a conversation whose turns were answered at different effort levels no longer replays as if every turn used the current one.
Changed- Changed the agent engine to a lane-owned durable architecture, rebuilding the harness, session, protocol, client and server layers in one pass.
- Added
@knightcode/chord, the application composition runtime (services, replicated state, RPC, plugins) the harness, protocol, client and server now build on. - Changed the harness runtime to a lane-owned drive: durable execution primitives, an effect gate, hooks, restore, and a mutation line replace the earlier operation-task/procedure runtime, and the transitional
runtime2andrestorelayers are gone. - Changed the session layer to bound values and lists with a commit/fork/mutation-line model, storage and repository conformance suites, and session benchmarks; the SQLite backend follows it.
- Changed the protocol, client and server to Chord-routed services: a single
protocol.ts, a hosted harness manager, server identities, session directories, draining, and the wrong-server/session-not-found error set replace the earlier RPC schemas and live-session manager. - Changed the experimental CLI to durable server and client commands, with
--provider,--model,-e,--continue,--resume,--server-idand--session-dir, dropping the local demo runtime and session-worker process. - Changed built-in tool rendering to load from
core/tools/renderers/, so a process that only displays tool output no longer pulls in the execution path; the KnightCode tool-output style (Read(...),Search(...),Update(...), collapsed one-line summaries) moved with it. - Added click-to-expand on tool results, wired through the gutter shell so the bullet and continuation-marker layout keeps working.
- Fixed the reserved fork namespace guard, which tested for a stale prefix and so never matched a
knightcode.namespace. - Fixed Windows portability across the session, socket and CLI-spawning suites:
node --importnow receives a file URL, session tests resolve their workspace paths, and the Unix-socket suites are skipped where the platform cannot bind them.
Fixed- Fixed
knightcode configignoring theshowHardwareCursorandclearOnShrinkterminal settings.
v0.5.4
Added- Added an entries argument to
SessionManager.inMemory(), so an SDK embedder can resume a session held outside the filesystem — in a database, say — without writing it to a temporary.jsonlfile first. - Added the relational algebra join operators to LaTeX rendering:
\bowtie,\Join,\ltimes,\rtimes,\leftouterjoin,\rightouterjoinand\fullouterjoin. - Added a
vllmPrioritycompat flag for customopenai-completionsproviders. Set it on a model and requests carry a top-levelpriorityfield, which a vLLM server running with--scheduling-policy priorityuses to order work; lower values are served first. Unset by default, so nothing changes for providers that do not want it.
Changed- Changed the branch summary output cap from 2048 to 4096 tokens, clamped to the model's own limit, so summaries of long branches are no longer cut off mid-sentence.
- Changed the Cloudflare AI Gateway binding transport to pass requests straight to the Workers AI binding's
fetchrather than translating them into universal-endpoint calls.createGatewayBindingFetchis replaced bycreateAiBindingFetch(env.AI), which supports every method, non-JSON bodies and streaming request bodies instead of rejecting them. - Changed the bundled model catalog to a fresh regeneration from models.dev. GitHub Copilot drops eight models that the provider no longer serves (
claude-opus-4.5,claude-opus-4.6,claude-sonnet-4,claude-sonnet-4.5,gemini-3.1-pro-preview,gpt-4.1,gpt-5.2,gpt-5.2-codex) and gainsclaude-fable-5.1andgemini-3.8-flash. This regeneration is also what activates the Copilot Fable 5 routing fix, which changed only the generator and so never reached the committed data. Baseten gainszai-org/GLM-5.3-Fast, Cloudflare AI Gateway gainsclaude-fable-5.1, and OpenCode Go gainsomen-alpha. - Removals only take effect through regenerated data: the remote catalog overlay merges by id and can add or update models, but never removes them, so a model that disappears upstream keeps appearing until the bundled catalog is refreshed.
- Changed the selectors in
/thinking,/model,/scoped-models,/trustand per-model thinking settings to keep the active option marked while browsing, by moving the marker into a fixed column ahead of the label./scoped-modelsnow uses the same per-item toggle as the rest, strikes through models that are no longer available, and no longer collapses to a single model when the first one is toggled off. - Changed the theme settings selectors to keep the configured theme marked while browsing, matching the other selectors. Both the fixed-theme list and the light/dark lists behind Automatic now show the marker in a fixed column.
- Changed the streaming working indicator to render in the editor's top border instead of on its own row above it, so the editor no longer shifts up and down as a turn starts and finishes. It picks up the editor's border colour, which already tracks the thinking level. Custom editors from extensions keep the standalone row unless they opt in with
embedWorkingStatus.
Fixed- Fixed aborting a session leaving an in-progress compaction or branch summary running. Escape during
/compact, or an RPCabort, now cancels it and waits for the session to actually be idle before returning. - Fixed Baseten's GLM-5.2 and GLM-5.2-Fast being advertised as accepting images. The catalog reports image input for them but the endpoints are text-only, so attaching an image produced a provider error instead of being caught up front.
- Fixed a Codex response being dropped when the server closed the stream without a blank line after the final event. The last frame is now processed at EOF instead of being discarded with the buffer.
- Fixed GitHub Copilot Claude Fable models being served through the OpenAI completions adapter, which dropped the selected reasoning level. They now route through the Anthropic Messages adapter like the other Claude 4.x and 5.x models on that provider.
- Fixed Fireworks GLM models other than GLM-5.2 being served through the Anthropic-compatible endpoint, which does not accept them. Every
glm-model on Fireworks now uses the OpenAI completions endpoint, so GLM-5.3 and GLM-5.3 Flash work. - Fixed forking a compacted session losing the messages after the compaction boundary when that boundary pointed at a label. Labels are dropped from the forked path, which left the boundary pointing at an entry that no longer existed.
- Fixed importing a session file silently overwriting a stored session that happened to have the same filename. The import is now written alongside it under a numbered name.
- Fixed a proxied request hanging when the server closed the stream without sending a terminal event, and a final event that arrived without a trailing newline being dropped. The first now surfaces as an error, the second is processed.
- Fixed proxied plain-HTTP provider requests hanging after a tool call by tunneling them with CONNECT again, restoring the behaviour Undici changed in 8.7.
- Fixed Qwen3.8 Flash offering the wrong thinking levels on the Qwen Token Plan providers: it advertised high and max, which it does not accept, instead of low, medium and xhigh. It is also now listed on the Individual plan, where it is available.
- Fixed the built-in tools ignoring the working directory supplied on the extension context.
read,write,edit,ls,find,grepand the shell tool resolved relative paths against the directory captured when the tool was created, so a caller running a tool against a different directory operated in the session's directory instead of its own. - Fixed
fdandripgrepfailing to download behind shared egress IPs, where the anonymous GitHub API rate limit is permanently exhausted. The latest release is now resolved from the release page redirect, which costs no API quota. A failed download also reports the underlying network error instead of a bare "fetch failed". - Fixed
knightcode updatereporting every install as a standalone binary.bin/knightcodespawns the compiled binary out ofnode_modules, so install detection now classifies a binary by where it sits rather than by how it was built, and moves the running executable aside on Windows so npm can replace it. - Fixed the write tool reporting UTF-16 code-unit counts as byte counts by removing the misleading count from its result.
- Added an entries argument to
v0.5.3
Fixed- Run the auto-compaction threshold check between turns of an agent run, so a tool batch that fills the context window is compacted before the next assistant request instead of overflowing it.
- Add a
fullscreenCopyOnSelectsetting (defaulttrue). Turn it off and a fullscreen mouse selection stays highlighted instead of being copied on mouse release, andCtrl+Xcopies the active selection rather than the last assistant message. - Settle the running turn before an in-memory
/fork, so the aborted assistant message and its tool results are no longer appended to the freshly forked session. - Merge Mistral streaming tool-call chunks by their
index, so a call whose id and name arrive only in the first chunk is no longer split into two tool calls with truncated arguments. A name that arrives on a later chunk is picked up rather than left empty. - Match
NO_PROXYentries against the root domain and its subdomains, and parse IPv6 hosts andhost:portentries correctly, so a bareexample.comentry also bypasses the proxy forapi.example.comandnotexample.comno longer matches it. A bare*entry now bypasses everything even when listed alongside other entries, and an entry with a malformed port is dropped rather than widened into a host-wide bypass. - Add a
supportsMaxOutputTokenscompat flag foropenai-responsesmodels (defaulttrue). Set it tofalsefor a gateway that rejectsmax_output_tokensand the parameter is omitted instead of failing the request. - Stop already-prepared tool calls from running when a parallel batch is aborted during preflight, so cancelling at a permission prompt no longer lets the remaining tools in that batch execute.
- Ignore a failing SIGWINCH self-signal at terminal startup, so sandboxes whose seccomp or LSM policy denies
kill(2)no longer crash on launch. The dimension refresh is skipped instead. - Tidy the tool call transcript block. The dark theme's
greenandrednow hold the pinned diff hexes, so the success bullet,✓marks, bash mode and markdown code blocks match the diff colours instead of staying olive. Shell tool call headers are clamped to a single line — a long command no longer wraps several rows of quoted URL over the transcript — and the bash expand hint follows its output rather than preceding it, matching every other tool renderer. Line counts in the expand hints are pluralised. - Detect Zed's integrated terminal so it gets truecolor and hyperlinks instead of falling through to the conservative default, and document the Zed key bindings needed for
Shift+Enterand friends.
v0.5.2
Fixed- Read EXIF orientation from JPEGs whose first APP1 segment holds XMP instead of EXIF. Such images previously rendered unrotated.
- Clear a delivered steering or follow-up message that carried only images. The entry previously stayed in the queue forever, leaving the pending count wrong and the message re-queued.
- Give each
/shareits own temp directory so two shares running at once no longer overwrite each other's export or delete the other's file mid-upload. - Keep skills in the system prompt when
readis disabled but a shell tool is available, and tell the model to loadSKILL.mdwithbash(or PowerShell) instead. Skills previously vanished entirely from bash-only tool setups. - Ignore Kitty image conversions that land after the tool image at that position changed, so a streamed partial image no longer replaces the final result.
- Add AgentRouter as a built-in provider.
AGENTROUTER_API_KEYenables five AgentRouter models, defaulting toagentrouter/glm-5.3, with Claude routed through the Anthropic Messages endpoint and the rest through the OpenAI-compatible one. Token prices come from AgentRouter's rate table rather than upstream list prices; cache costs remain estimates because AgentRouter does not publish its cache ratios.
v0.5.1
Fixed- Tool calls now render as blocks in the transcript. Each one shows a
Bash(...)/Read(...)/Update(...)header with its result collapsed underneath on a⎿gutter, instead of the flat before/after dump. The rest of the chrome — boxed messages, the rounded input frame, the braille spinner, the banner and footer — is unchanged. Fixed a context-window overflow loop. Messages with no provider usage yet are estimated at 4 chars/token, but real tokenizers land nearer 3 on code and JSON, so reservingmax_tokensagainst the raw estimate could push prompt +max_tokenspast the window. The provider rejected it as an overflow, the agent compacted,max_tokensre-expanded into the freed room, and the next request failed the same way. The estimated part is now padded so the reservation stays inside the window.
- Tool calls now render as blocks in the transcript. Each one shows a
v0.5.0
A rebuilt agent core. The agent loop, session storage, provider layer and terminal UI were all replaced. What that buys: Distribution is unchanged — a self-contained compiled binary per platform, no Bun or Node needed at runtime.
Added- A measured ~1,100-token floor for the system prompt and tool definitions — every request is smaller, on every model.
- Real multi-provider support: Anthropic, OpenAI/Codex, OpenRouter, Amazon Bedrock, xAI, Kimi, GitHub Copilot, and any custom endpoint through
models.json. OAuth sign-in where the provider supports it, API keys everywhere else. - Sessions you can leave and come back to: resume, fork, branch, search, and automatic compaction when a conversation outgrows the context window.
- Extensions, skills and prompt templates, discovered from the project or installed globally.
- Headless mode:
--printwithtext,jsonorrpcoutput, for scripting and for driving KnightCode from another program.
v0.4.1
Fixed- Re-inject the current todo list after each tool round so the model's plan stays in context during long turns. Only fires when the list has unfinished items and has changed since the last round.
v0.4.0
Harness reliability: safer edits and recovery from flaky model streams.
Added- No blind or stale edits. A file must be read before it can be edited, and an edit is rejected if the file changed on disk since that read — so a write can't silently clobber newer changes. The read state is rebuilt from the transcript, so it survives a session resume.
- No accidental repeats. Identical read-only tool calls in one round run once instead of duplicating, and the loop guard stops repeated identical calls sooner.
- Auto-retry on flaky streams. Transient stream failures and empty responses retry with exponential backoff (honoring
Retry-After); cancelling mid-backoff no longer fires an extra model call. - Tool errors self-correct. An invalid tool call no longer ends the turn — the model gets the error back and can fix it.
- No misleading diffs. An edit diff shows only after the edit actually applies; failed or rejected edits don't render one.
v0.3.1
Fixed- Fix the
/exitcommand freezing the terminal in packaged builds. Process cleanup usedspawnSync(process.execPath, ["-e", ...])as a sleep, but in a compiled standalone binaryprocess.execPathis the CLI itself, so it relaunched the TUI and blocked forever. Replaced it with an in-process sleep and made exit terminate the process explicitly.
- Fix the
v0.3.0
Add automatic skill discovery, hot-reload, and path-scoped skills so installed skills surface and get loaded without having to be named explicitly.
Added- Skill auto-discovery. Each turn a cheap side-query compares your request against the installed skills, surfaces the relevant ones, and directs the model to load them via the
Skilltool before responding. Surfaced skills appear as a visible↳ Relevant skills: …line in the chat. Controlled by theskills.autoDiscoversetting (on by default). - Skill hot-reload. A file watcher picks up added, edited, or removed
SKILL.mdfiles mid-session, so changes take effect without restarting. Controlled by theskills.hotReloadsetting (on by default). - Path-scoped (conditional) skills. A skill with a
pathsfrontmatter glob is kept out of the always-on skill list and surfaces only when you edit a file matching its globs.
Changed- The skill index injected into the system prompt is now size-bounded: descriptions are truncated to fit the budget and, in the extreme, the listing falls back to names only — but every skill name is always shown, so no installed skill becomes undiscoverable.
- Skill auto-discovery. Each turn a cheap side-query compares your request against the installed skills, surfaces the relevant ones, and directs the model to load them via the
v0.2.1
Added- Memory follow-ups: feed recent tool usage into the recall selector as an extra relevance signal, frame extraction's "new messages" window from a per-session cursor (so durable facts mentioned during gate-skipped turns are still reconsidered), and drain any in-flight memory extraction on
/exit(bounded) so a save isn't dropped at shutdown. - Refresh the supported model catalog with new OpenRouter models:
nvidia/nemotron-3-ultra-550b-a55b:free(Nemotron 3 Ultra 550B),nex-agi/nex-n2-pro:free(Nex N2 Pro),qwen/qwen3.7-plus(Qwen3.7 Plus),z-ai/glm-5.2(GLM 5.2), andmoonshotai/kimi-k2.7-code(Kimi K2.7 Code). Newqwenandnexmodel aliases accompany them. - Accurate per-session cost: enable OpenRouter usage accounting (
usage.include) so each request returns its actual cost. The in-app/cost"Session cost" now sums real costs (correct for free/cached/uncurated models) and only falls back to the local price table when a message has no reported cost. - Session grouping on OpenRouter: send the session id as the
x-session-idheader so a session's requests are grouped in OpenRouter's logs (Sessions tab) and routed stickily to the same provider for better prompt-cache hits. Requests are also tagged with the session id via theuserfield for per-request "Client User ID" attribution.
Changed- Default model is now
nvidia/nemotron-3-ultra-550b-a55b:free(wasz-ai/glm-4.5-air:free). Theglm,kimi, andnemotronaliases were repointed to their successor models (z-ai/glm-5.2,moonshotai/kimi-k2.7-code,nvidia/nemotron-3-ultra-550b-a55b:free), and the onboarding shortlist was updated to match the new catalog. - OpenRouter app attribution:
HTTP-Referer→https://knightcode.raghavseth.inandX-Title→KnightCode(was "KnightCode CLI").
Removed- Drop two unused dependencies from
@knightcodeai/cli:pretty-ms(never imported) andhono(the toast provider'suseMemonow imports fromreactinstead ofhono/jsx). - Drop discontinued/older version models:
z-ai/glm-4.5-air:free,deepseek/deepseek-v4-flash:free,z-ai/glm-5.1,moonshotai/kimi-k2.6, andnvidia/nemotron-3-super-120b-a12b:free, along with theirglm_airanddeepseekaliases.
FixedTabmode cycle so it reachesAUTO: previouslyTabonly toggled betweenBUILDandPLAN, makingAUTOselectable solely via the/agentsdialog.Tabnow cyclesBUILD → PLAN → AUTO → BUILD.
- Memory follow-ups: feed recent tool usage into the recall selector as an extra relevance signal, frame extraction's "new messages" window from a per-session cursor (so durable facts mentioned during gate-skipped turns are still reconsidered), and drain any in-flight memory extraction on
v0.2.0
Standalone query engine, concurrent tool scheduler, and Apache-2.0 licensing. This release replaces the React `useChat`-based chat harness with a dedicated, framework-agnostic query engine, adds a concurrency-aware tool scheduler, and hardens the interactive terminal experience. The project is now formally licensed under Apache-2.0.
Added- Standalone query engine. A new engine loop drives a turn end-to-end, independent of the React render tree (
lib/engine/). It owns engine event and params types, a transcript-repair pass that resolves dangling/unresolved tool calls, and tool-gating decisions backed by a loop guard to prevent runaway tool cycles. - `useQueryEngine` hook. A thin React hook that drives the engine loop and replaces the previous
useChatharness entirely. - Concurrency-aware tool scheduler. Engine-owned scheduling policy runs tool rounds with bounded concurrency. Introduces an engine
ToolHostcontract and a hook adapter so the engine can execute tools without depending on the UI layer. - Cross-session project memory. Durable, non-obvious facts are extracted automatically after completed turns into a per-project store (
~/.knightcode/projects/<cwd>/memory/) with aMEMORY.mdrecall index. Relevant memories are recalled into the system prompt, a consolidation ("dream") pass merges and prunes the store, and aMemorytool lets the model review, correct, or forget entries. - Per-row tool spinners. Concurrently running tools each get their own inline spinner instead of a single shared indicator.
- `@`-mention path expansion. Paths referenced with
@in a prompt are expanded into the model's context at submit time. - PostToolUse `systemMessage` surfacing. Messages emitted by
PostToolUsehooks are now surfaced to callers. - Apache-2.0 license. Added root
LICENSEandNOTICEfiles andlicensefields in the workspace and CLIpackage.json.
Changed- Extracted
compactHistoryout of the olduse-chatmodule and moved chat message types intolib/engine/messages. - Exposed a hook-free
executeRegisteredToolfor engine use. - Unified all interactive prompts onto a single shared permission panel.
- Dropped the unused
sessionIdfromQueryParams. - Pointed repository URLs at the KnightCodeAI org and scoped the publish workflow to publishable paths.
Fixed- Quit behaviour:
/exitis now the only way to quit; Ctrl+C never exits. - Permissions: every confirm-gated tool now shows a permission prompt, and every awaited tool decision is guaranteed a resolvable prompt; scoped the always-allow sweep correctly.
- Markdown rendering: convert
<br>to real line breaks in prose, expand<br>table cells into continuation rows, and stop rendering literal<br>tags. - Interrupts: render the interrupted marker after the partial response, with a plain interrupted notice (no emoji or completion verb); render interrupted aborts and surface queued mid-turn submits.
- History integrity: stop schema-validating history and instead quarantine invalid tool calls.
- State sync: synchronize message-ref writes, guard submit re-entry, persist the final turn snapshot, queue mid-turn submits, clear finished todos, and only clear the compacting state when it was actually set.
- Hardened file reads, question cancellation, and transcript text handling, plus a sweep of code-review findings across the engine and UI.
- Standalone query engine. A new engine loop drives a turn end-to-end, independent of the React render tree (
v0.1.0
Added- Initial public release:
knightcodeships as a self-contained compiled binary (no Bun required) distributed via platform-specific npm packages, with a headless--versionanddoctor, embedded database migrations, and a non-blocking update check.
- Initial public release: