·
9 commits
to main
since this release
This release adds several new features including background agent synchronization, native Anthropic compaction, expanded Gemini capabilities, OpenAI provider options, and a WebAssembly shared runtime, alongside numerous bug fixes for token accounting, streaming usage, and cost tracking.
What's New
- Adds
wait_background_agentstool that performs an all-settled join on a caller-supplied list of task IDs, waiting up to a configurable timeout and returning an ordered result array - Adds native Anthropic conversation compaction with replay guards and prefix mismatch controls, opt-in progress updates, strict tool argument enforcement, cache diagnostics, and request-context secret redaction
- Adds
cache_diagnostics,preserve_reasoning, andnative_tool_searchprovider opts for OpenAI's Responses API - Adds native Gemini text embeddings support, enabling RAG use-cases on Gemini via the dedicated embeddings API
- Adds support for Gemini service tiers via
provider_opts.service_tier, including flex tier with extended idle timeout handling - Adds support for Gemini URL Context via
provider_opts.url_context: true, allowing the model to fetch and reason over public URLs at inference time - Adds Docker Model Runner model metadata and context limit discovery via the
/engines/_configureendpoint, enabling auto-compaction and context gauge support for DMR models - Replaces the WebAssembly bespoke event loop with the shared
embeddedchat-backed agent runtime, adding portable tools, in-memory storage, egress proxy, session-scoped MCP OAuth token stores, and opt-in cloud provider builds
Improvements
- Defers TUI frame composition while the terminal is blurred, avoiding unnecessary rendering work during unfocused sessions
Bug Fixes
- Fixes deferred tail buffer not being cleared when a different assistant message becomes the active owner, preventing old content from bleeding into new message output
- Fixes Gemini native tool-call IDs being stripped instead of preserved, and fixes tool-response name matching to prevent malformed conversation history
- Fixes Gemini native tool-call
ProviderIDnot being preserved in the WASM accumulator - Fixes session compaction not drawing from the session's cost or token budgets, allowing spend beyond configured ceilings
- Fixes TUI animations continuing to run in unfocused and detached (tmux) sessions
- Fixes empty, refused, or reasoning-only assistant responses being skipped even when the provider reported billable usage
- Fixes OpenAI WebSocket pool allowing a single idle connection to be shared across concurrent streaming requests, which could corrupt both responses
- Fixes concurrent map and slice access on session model-state fields (
AgentModelOverrides,CustomModelsUsed) causing data races - Fixes unsafe concurrent
CloseandNext/retry calls on WebSocket and Anthropic streams - Fixes runtime streams being abandoned before fully drained, which could release streaming locks or turn tokens prematurely
- Fixes cache tokens not being counted toward
max_tokenstoken budgets; previously only input+output tokens were counted, allowing cache-heavy calls to bypass configured limits - Fixes Gemini tool-use input tokens (
ToolUsePromptTokenCount) being dropped, understating token usage and cost - Fixes Anthropic streaming input token counts and cache read/write metrics being dropped because they were read from
message_deltainstead of the accumulated usage object - Fixes per-call telemetry costs being reported incorrectly; previously cumulative session cost was emitted before the current call was charged
- Fixes context limits not being bounded before narrowing to int in the runtime
- Fixes deferral state not being preserved across session reloads for tools
- Fixes Bedrock SDK bearer authentication scheme configuration
- Fixes concurrent indexing usage accounting in RAG
Technical Changes
- Refactors external reference name and config import suffix parsing to use
strings.CutLast - Simplifies test sleep-and-wait pairs using Go 1.27's
synctest.Sleep - Simplifies composite literals in runtime and config packages using Go 1.27 promoted fields
- Adds
Lint/ExclusiveStreamLeaseanalyzer to detect shared WebSocket stream leases - Adds
Lint/SessionStateAccessorscop to require session model-state accessors - Adds
Lint/StreamCloseSafetycop to detect unsafe stream close access - Adds lint detection for abandoned runtime streams
- Consolidates and deduplicates documentation across custom commands, thinking/task budgets, provider credentials, MCP configuration, server CLI flags, generated media, provider inheritance examples, and tool concepts
What's Changed
- refactor: parse reference names and import suffixes with strings.CutLast by @dgageot in #4325
- test: simplify sleep-and-wait pairs with synctest.Sleep by @dgageot in #4323
- refactor: simplify literals with Go 1.27 promoted fields by @dgageot in #4324
- docs: update CHANGELOG.md for v1.141.0 by @docker-read-write[bot] in #4326
- chore(deps): bump openai-go/v3 to v3.61.0 by @dgageot in #4327
- fix: preserve final TUI responses across deferred message transitions by @dgageot in #4328
- feat: add wait_background_agents join tool by @dgageot in #4330
- docs: consolidate custom command documentation by @dgageot in #4331
- docs: consolidate thinking and task budget references by @dgageot in #4332
- docs: centralize provider credential reference by @dgageot in #4333
- docs: separate MCP and shared tool configuration references by @dgageot in #4334
- fix(gemini): preserve native tool-call IDs and fix tool-response matching by @dgageot in #4339
- docs: centralize server CLI flag tables by @dgageot in #4335
- docs: consolidate generated media documentation by @dgageot in #4336
- docs: reuse provider inheritance examples by @dgageot in #4337
- docs: link tool concepts to the canonical catalog by @dgageot in #4338
- fix: charge compaction to shared session budgets by @dgageot in #4343
- feat(dmr): discover model metadata and context limits by @dgageot in #4340
- feat(openai): add cache_diagnostics, preserve_reasoning, and native_tool_search provider opts by @dgageot in #4355
- fix: report per-call costs in telemetry by @dgageot in #4341
- feat: support native Gemini text embeddings by @dgageot in #4350
- feat(anthropic): native compaction, progress updates, strict tools, cache diagnostics, and secret redaction by @dgageot in #4354
- feat: support Gemini service tiers by @dgageot in #4348
- fix(app): guard session model state with an accessor cop by @dgageot in #4347
- fix(tui): pause animations in unfocused and detached sessions by @dgageot in #4344
- fix(runtime): retain costs for empty assistant responses by @dgageot in #4345
- feat: support Gemini URL Context by @dgageot in #4349
- perf(tui): defer frame composition while blurred by @dgageot in #4342
- fix(openai): lease WebSocket connections exclusively by @dgageot in #4346
- fix: account for Gemini tool-use input tokens by @dgageot in #4359
- fix(runtime): count cache tokens toward token budgets by @dgageot in #4358
- fix: preserve Anthropic streaming input and cache usage by @dgageot in #4360
- test(tui): fix ordering race in TestThemeWatcher_WatchUserTheme by @aheritier in #4305
- fix: drain runtime streams before releasing turn ownership by @dgageot in #4353
- chore(deps): bump anyio from 4.9.0 to 4.14.2 in /examples/dhi/dhi_mcp_server in the pip group across 1 directory by @dependabot[bot] in #4361
- docs: auto-update for merged PRs (2026-09-19) by @aheritier in #4362
- feat(wasm): shared runtime, portable tools, in-memory storage, egress proxy, and cloud provider builds by @dgageot in #4357
- docs: auto-update for merged PRs (2026-09-21) by @aheritier in #4367
Full Changelog: v1.141.0...v1.142.0