Repository navigation
New Features
- Compaction recall & retention: summaries now cite session entries (
[rN]), include## Key Facts(cNrN) and## Replaced Context(E<n>) sections restored on demand viarecall_context, enforce long-session retention rules, and add opt-incompaction.growthGateTokens(see Compaction Reference and Compaction settings) (#767, #794) - Externalized truncated tool outputs: truncated
read,grep,find, andlsresults are saved under the agent directory and paged back in 50KB chunks viarecall_tool_result(#767) - Autonomous image generation (
generate_image): generates or edits images (supportingaspectRatioandsize) using the session provider's image model when available, gated by the permission prompt in non-yolo sessions (see Use image models) (#757, #893) - Built-in
git,/token-usage,batch(execute_many), andsubagents.preferredCli: unifiedgit(status|diff|log|branch, including reading diffs) and/token-usagejoin the built-in modules, hiddenexecute_manybatches multiple tool calls into one round trip, and subagents can run viaclaude,codex, oragy(see Slash commands) (#803, #824) - Read-only subagent viewer & status UI: pressing
Downin an empty editor opens a read-only subagent list and job report overlay; the working indicator aligns at column 0 with a breathing dot, and retry/compaction rows shimmer at 30fps (#877, #906) o200k_basetoken estimation,Usage.pricingsnapshots, and fail-closed sandbox: context estimation usesgpt-tokenizero200k_baseinstead of character division, costed responses freeze rate snapshots onusage.pricing, and unattended sessions fail closed when a configured sandbox launcher is missing (see Security) (#763, #803)- Embedded sidecars in
full:fullbundles embed TUI native prebuilds and photon wasm again, removing on-demand downloads so image and clipboard features work offline (#840)
Added
-
Ported four pi-extensions picks as built-in modules:
pi-deepwiki(repo-grounded Q&A),pi-git-tools(read-only git, nogh),pi-meat(faithful reading diff via subagent), and/token-usageover the existing usage ledger.subagents-minigainssubagents.preferredCliso a spawn can run claude, codex, or agy with the harness default model (issue #824) -
Read-only subagent viewer: pressing Down on an empty editor when subagent jobs exist opens a job list overlay (
Up/Downselects,Enteropens the selected job report,Escexits) without altering the transcript or the live widget under the editor -
Added the hidden built-in
batchmodule (execute_manytool,module/batchbuild component) to run multiple callable tools sequentially or in parallel within one model round trip (issue #803) -
Costed responses now freeze an auditable
Usage.pricingsnapshot (provider,model,revision,rates) viacalculateCost()and preserve it incombineUsage(), keeping historical spend explainable across catalog edits (issue #803) -
A compaction summary cites the session entries behind its facts as
[rN], andrecall_contextreads one back. Every message handed to the summarizer carries its entry id, the summary prompt asks for a trailing<refs>block that defines each tag, and the tool resolves the tags against that block and appends acontext_recallentry, so the recalled history returns as history instead of a tool result the next compaction eats. An undefined tag, a summary without a<refs>block (any session compacted before this change), an entry still inside the kept region, and a block over a quarter of the context window are all refused with a reason (#767) -
Compaction summaries now follow explicit long-session retention rules: exact paths, signatures, errors, decisions, constraints, and unfinished work are kept; consumed logs, repeated reads, and settled discussions are dropped. The rules live in the summarization system prompt and do not change the summary format (issue #767)
-
The summarization system prompt now keeps every open, unsuperseded user objective as its own line even when the summarized range made no progress on it, and requires user requests, decisions, and constraints to be quoted verbatim or explicitly marked as a paraphrase. Both the default and the Codex compaction paths share this prompt, so the rules apply to each (#794)
-
Compaction summaries gain a
## Key Factsblock with stable refs (c0r2) to the session entries they compress; therecall_contexttool restores those original messages on demand when a summary is too compressed to continue safely (issue #767) -
A compaction summary now lists the history it replaced, and
recall_contextpulls one region back. The summary ends with a## Replaced Context (recallable)section, one line per replaced turn with a ref, a one-line preview, an entry count, and a token size;recall_context({ ref })answers with the original messages of that region, capped at 8000 tokens so a recall cannot refill the window the summary just freed. A ref is an ordinal over the branch (E3= the third model-visible entry), recomputed from the branch and the newest cut point, so it survives a reload and a fork with no schema change.session_before_compactcan now post-process a summary it did not write: the event is dispatched a second time withreplacedSummarywhen no handler built one, which is what lets the appendix land on the Codex-style summary (#767) -
Added opt-in
compaction.growthGateTokens. Automatic threshold compaction now waits for enough estimated context growth since the last compaction, so a threshold that is barely exceeded cannot produce a second summary right after one finished. The default0keeps the existing threshold-only behavior (issue #767) -
The
pi-imagemodule registersgenerate_image, the first caller ofmodelRegistry.generateImages(). It picks an image model for the session's own provider when there is one (a ChatGPT OAuth session draws with its own subscription, otherwise the first available image model), returns the image as a tool result, and writes it to the path the model asked for, taking the extension from the returned format. Its guideline lets the model draw on its own when the task's output includes an image file, not only when the user asks for one (#757) -
generate_imageaccepts optionalaspectRatio(e.g."16:9") andsize(e.g."2K") arguments and forwards them to image providers. Values are passed through unchanged, so an unsupported value is reported by the provider (issue #893)
Changed
-
todotool result cards foradd,done,undone, andclearno longer echo the full step list beneath the count summary;liststill renders all steps (issue #908) -
Unattended sessions (
print,json,rpc) now fail closed on shell calls when a configured sandbox launcher is missing, instead of running commands unsandboxed; interactive sessions keep the warning (issue #803) -
Context token estimation (
estimateTokens, message codecs,estimateContextTokens) now useso200k_base(gpt-tokenizer) instead ofchars / 4orchars / 3.5and excludes opaquethinkingSignaturepayloads, preventing severe underestimates on code, JSON, and CJK text (issue #763) -
mcpsubagent calls now run with only the singlemcp__<server>__<tool>tool and--mcp-only-prompt --no-context-filesinstead of inheritingread, the coding-assistant system prompt, andAGENTS.md(issue #800) -
Cloudflare Workers AI and Cloudflare AI Gateway default models now target
@cf/zai-org/glm-5.3(issue #822) -
Qwen Token Plan Individual now lists
qwen4-maxinstead of the retiredqwen4-max-preview(upstream22f5f2995) -
Together drops reasoning-effort overrides for deprecated models; every listed Together reasoning model takes the Together thinking toggle (upstream
e459be65a) -
GitHub Copilot Claude and GPT-6 models preserve the prompt cache across thinking-level and tool changes: Claude uses mid-conversation effort and tool changes, GPT-6 uses
configuration_updateitems, and Claude models declare 5-minute and 1-hour cache lifetimes for warming (upstreamd5b453814) -
meatis folded into thegittool asgit action=diffwithmode=raw|reading. Thepi-meatmodule and build component are removed; the compiler and chunker now live underpi-git-tools/src/vendor/.mode=readingstill requirespi-subagent-mini(issue #870) -
The git tools are now one
gittool withaction=status|diff|log|branch, andweb_search,read_page, and the DeepWiki tools are now onewebtool withaction=search|fetch|wiki_structure|ask_repo. Thepi-deepwikimodule is merged intowebsearch;/deepwikinow prefills awebcall (issue #852) -
The
codex-compactionmodule is renamed tocompactionand moved fromsrc/modules/codex-compaction/intosrc/core/compaction/. The session machinery it replaced lives there as*-core.tsfiles; the module registry, buildconfig component, and test imports use the new name (issue #842) -
fullembeds the TUI native prebuilds and photon wasm again; the on-demand sidecar download, its release tarball, the GitHub/AtomGit mirror URLs, theNANOPI_OFFLINEhost probe, and--sidecars-outare removed. First image read and first clipboard use need no network (issue #840) -
The machine hostname is now shown on its own line under the welcome box directory and as a
Hostname:row in/status. The standalonepi-hostnamemodule is removed (issue #835)
Fixed
-
The
/planexit prompt now reachesnanopi webuisessions through the structured-input card, so approving submits the plan for execution instead of requiring a manual mode switch (issue #903) -
Fixed OpenRouter image models billing image tokens at the text rate or not at all, ignoring choice errors and non-stop
finish_reason, and missing provider-reportedusage.cost(upstreamccda1f74b,596540d43) -
Fixed GitHub Copilot models on
openai-completionslosing their reasoning state between turns by preservingreasoning_opaqueon thinking blocks and replaying it withreasoning_text(upstreamede8bdca0) -
Antigravity
/loginnow matches the officialagyclient's authorization flow (PKCE S256,statevalidation,cloud-platform/userinfo.email/aicodescopes) and sends matching client headers onloadCodeAssist/onboardUser(issue #825) -
Error codes like
my_plugin_request_too_large_flagno longer trigger context-overflow compaction; only standalonerequest_too_largeand HTTP 413 do (upstream32c7f6d7b) -
Completed retry backoffs remove their abort listeners, and
createProvidermerges fetched model catalogs once per publish instead of pergetModel()/getModels()call (upstream51ba3ab5b,073b0bae8) -
Provider errors reporting "Connection closed.", bare Node socket codes (
ECONNRESET,EPIPE,ETIMEDOUT, ...), "connection reset by peer", and five additional transport failure patterns now enter the retry classifier (upstream9b88b94e2,4699b5b26, issue #743) -
openai-completionssends reasoning-model system messages with thedeveloperrole only onapi.openai.com(andsystemon Groq and other compatible hosts), non-type schema nodes fall back to non-strict for OpenAI, and non-strict Anthropic tool schemas keep rootadditionalProperties(upstreamb82477b7b,406e719a6,aa47cedce) -
CRLF SSE frames split across chunks no longer drop
event:fields, and failed OAuth token exchanges name missing/invalid fields without echoing raw token responses -
Google discrete thinking selects from the model's
thinkingLevelMap(supportinggemini-4-hydrogenxhigh,gemini-4-argon, andgemini-4-carbon) and maps@google/genai3.3.0FinishReasonvalues (MISSING_THOUGHT_SIGNATURE,ESCALATION,PUP_LIMITED_DISABLED,MODEL_ARMOR) to"error"(issue #723, issue #731) -
Azure catalog clones preserve 272k+ long-context pricing tiers and give GPT-6 models (
gpt-6-astra,gpt-6-sol,gpt-6-luna,gpt-6.1-sol) their 1.05McontextWindow; Kimi K3cacheWritebills at $3/MTok (issue #743, issue #750) -
Endpoint provider detection and attribution match exact hostnames via
matchesHostnameinstead ofbaseUrl.includes(...), Anthropic OAuth addsprompt=loginand appendsdeepestCause(error)on connection errors, andmergeStreamingArgumentObjectguards__proto__/constructor/prototypekeys (issue #743, issue #796) -
SettingsList(/settings) uses the configuredtui.select.confirmandtui.select.cancelkeys in its hint (upstreamb882d08f3), and interactive selectors (/model,/login,/scoped-models,/resume,/effort,/settings) keep selection when non-editing keys leave the search unchanged (issue #783) -
Right-click paste no longer inserts the clipboard twice in Tabby on Windows (upstream
165c70df9) -
Repeated prompts in Up-arrow history move to the front instead of duplicating, and pressing Enter on an absolute-path autocomplete menu completes the path instead of submitting (upstream
06a20368a,9a7cfba47) -
Markdown after an unclosed
$before a number (such as+$50) no longer renders the rest of the paragraph raw,hyperlink()caps OSC 8 URLs at 8192 characters, bracketed-paste end markers and LaTeXnormalizeScriptValue()scan linearly, andparseDiffLine()scans linearly without regex backtracking (upstream362bf6f1b,6ca01d1e9,da7e26cc8, issue #796) -
Kitty image IDs stay within the signed 32-bit range for Konsole, and appending in-viewport Kitty images skips full-screen redraws (upstream
ed0f27d62,fd68df1cf) -
An aborted agent run ends at the turn boundary even when
finishTurnreturnscontinue -
Session discovery and writes surface read/write failures instead of returning an empty list or advancing in-memory state past a failed write;
readwithlimitstops streaming once the page is full;/treeempty search displays the query andclear searchhint -
grepwaits to stopripgrepuntil a match past the trailing-context window proves results were cut off, preventing intermittent missingSearch stopped earlynotices (issue #747) -
ModelRuntime.getProviderAuthStatus()marks unresolved stored!commandcredentials as unresolved instead of configured (issue #816) -
Restored
tool-result-storeinbuildconfig.jsonmoduleBundlesso single-file and flavored builds bundlerecall_tool_result(issue #775) -
ask_user_questionnow decodes double-encoded tool arguments before schema validation. A resumed session whosequestionsarray or its elements were serialized as JSON strings opens the dialog instead of failing validation (upstream#244, issue #885) -
Fixed HTML export inserting viewer scripts and CSS with
String.replacestring replacements, which expanded$$and$&in template.js and highlight.js and showed the cost without its dollar sign (upstream41da1a524) -
Fixed WSL detection in terminals that start the shell without WSL environment variables: keybindings, footer branch polling and clipboard now share one check that falls back to
/proc/version(upstreame4ed3d610) -
Fixed
app.message.followUp(Alt+Enter) ignoring an open autocomplete menu and queuing the half-typed text; it now applies the selected suggestion like Enter (upstream27157503e) -
Fixed key hints that named hardcoded keys: the extension editor and session rename name
tui.input.submit,/hotkeysnamestui.select.cancelfor autocomplete, and session and submenu selectors follow remapped keys (upstreamb882d08f3) -
Retry and compaction status rows shimmer again like the working row: a module can register a status renderer for those kinds, the host keeps the countdown text, and each row advances its own band at 30fps. The renderer receives
kindin its state; existing working-only registrations keep their behavior (issue #877) -
The working row shows a breathing dot before its shimmer text, growing from a point into a blue-to-purple star on a 2.4s cycle. It now starts at column 0, aligned with the dots on tool rows such as
• Running(issue #906) -
Sign in with ChatGPT accepts the single
.onboarding_entrypoint=life_sciencessuffix OpenAI appends to the OAuth callbackstatefor some accounts. Other suffixes and repeated suffixes still fail withOAuth state mismatch, and the authorization request is unchanged (issue #854) -
pi-fake-opencodefollows opencode2api's latest free-tier shaping rules: client tools now travel under the plainmcp_<digest>namespace instead ofclint_, which the tier learned to refuse with 429, and top-level client tool descriptions use NBSP instead of ASCII spaces, which the tier also rejects. Parameter descriptions and official tool definitions stay verbatim (#841) -
recall_contextloads without startup errors again. The three recall strategies now live inside onecodex-compactionmodule, whose singlerecall_contexttool dispatches by ref shape:[rN]citations, Key FactscNrNrefs, and replaced-regionE<n>refs all work from one tool call (issue #832) -
In-context compaction now replays the captured next-turn request, including tool declarations, request metadata, and the resolved API key. A provider that keys its cache on any of those fields no longer drops the cached prefix and falls back to a paid standalone summary (issue #830)
-
The bash tool on Windows now finds Git for Windows installed outside Program Files: it asks the
git.exeonPATHfor its installation (git var GIT_SHELL_PATH, Git 2.47+) and uses that Git Bash before the WSL launcherSystem32\bash.exe(upstreame8ee38887) -
Copies on Wayland pass an explicit
text/plainMIME type towl-copy, so clipboard managers such as Klipper no longer discard text whose inferred type was e.g.application/x-ruby(upstream2d8133085) -
Sessions with more entries after the last compaction than fit in a function call's arguments now build their context instead of throwing
RangeError: Maximum call stack size exceeded(upstreamcb1205e46) -
Invalid
models.jsonis reported as a warning in services diagnostics, so print, JSON, and RPC modes name the cause instead of failing with "Model not found" (upstreameee9f85fc) -
The
!command cancel hint names the configured interrupt key instead oftui.select.cancelor a hardcoded Esc (upstream745338811) -
The RPC JSONL reader and session file loader scan only newly read text, so a line larger than the read chunk is not rescanned on every chunk (upstream
da7e26cc8) -
Terminal restore sequences are flushed before CLI exit: interactive shutdown,
--resumecancellation, and startup selectors now wait for queued stdout/stderr writes (at most one second), so the cursor, bracketed paste, and Kitty keyboard state are not left behind when the process exits (upstream7c05885bc) -
Unscoped syntax-highlighted text uses the theme foreground again, so tool previews stay readable when the terminal and nanopi use contrasting color themes (upstream
562da75f9) -
An external
SIGTSTP(kill -TSTP) now follows the same suspend path as Ctrl+Z, restoring the terminal and redrawing onfg; the listener is tied to terminal ownership so a child that owns the terminal afterwards is suspended normally (upstreame4f50d76d,3107a58d2) -
readkeeps the non-vision image warning in the tool details renderer instead of the tool result text: switching to a vision model no longer sends an image with a stale note saying the model cannot see it (upstream4be4cb4f5) -
Truncated
read,grep,findandlsresults are saved under the agent dir instead of being lost: the tool result carries arecall_tool_resultref and a path, and the new module reads the stored text back in 50KB pages so one oversized log can no longer spend the whole context on the way back (issue #767) -
/retryworks on the failure auto-retry gave up on: every attempt that loop made is omitted from the model projection, so the branch held no replayable response and the command answered "No failed response to retry" right after a visible failure. The turn is repeated with a fresh retry budget now, and the failure returns to the transcript so a second/retrystill has something to replay -
A grep match inside a file with NUL bytes is reported as a binary match: a minified bundle, a
git showdump, or a UTF-16 document printed as ordinary source rows, so the answer looked like source code the model could quote. The rows are still returned, and a notice says how many of them are inside binary content (#763) -
A bash or tool-output temp file is closed once, on every exit path, and its write completion is awaited: a failed write used to surface as an unhandled
errorevent (or not at all) while the caller got a truncated log path back -
The grep tool aborts during tool lookup and path probing, not only once ripgrep is running: an interrupt that landed before the child existed left the search to finish on its own, and a child killed by the abort was no longer reported as a ripgrep exit failure
-
Project trust stops its ancestor walk at the user's home directory: a stray
.agents/skillsabove it (/home,/) is user territory, and treating it as project context put every checkout underneath behind a trust prompt -
RpcClient.promptAndWaitreturns as soon as a prompt the session handled itself reportshandled, instead of waiting out the event timeout for anagent_settledthat will never arrive -
pi-fake-opencodereplays each lane's own identity instead of one shape for both: the 2.x lanes (/inference,/zen/go) send the conversation affinity inx-opencode-session,x-session-affinityandX-Session-Idwith the client's own session inx-opencode-session-id, and stop sendingx-opencode-request, which the v2 gate answers with 403FreeTierError; a forked session keeps its child id while affinity stays on the parent. The 1.x/zenlane gains the AI SDK'sAccept: */*and a provider-utils version that depends on the wire protocol (4.0.23chat,4.0.40responses,4.0.46anthropic) instead of a fixed one. The 1.x prompt and tool set are now their own captures rather than the 2.x pair with names substituted: eleven tools (bash,task,todowritewhere the 2.x CLI hasshell,subagent,question), a different description and schema behind every shared name, nostrictfield on any of them (issue #725)
Removed
-
DeepWiki research is removed from the
webtool:action=wiki_structure,action=ask_repo, the/deepwikicommand and theDEEPWIKI_MCP_URLoverride no longer exist. Search and fetch are unchanged (issue #861) -
Removed the
pi-output-compactmodule, its/output-compactioncommand, and its build component. Tool output is no longer rewritten before entering the model context (issue #886) -
Removed Qoder entirely: the startup/
/qoder-checkindaily check-in, themodule/qoder-checkinbuild component, Qoder provider docs and theNANOPI_QODER_CHECKINswitch. The browser sign-in was already removed; now/qoder-checkindoes not exist and no Qoder credential is read (issue #855) -
Removed the install-telemetry and analytics shell:
core/telemetry.ts, the first-time setup dialog,enableInstallTelemetry,enableAnalytics, andtrackingIdare gone. Provider attribution headers were never telemetry and stay, behindenableProviderAttribution(defaulttrue) andNANOPI_PROVIDER_ATTRIBUTION, which replacesNANOPI_TELEMETRY(issue #896)