Repository navigation
Building blocks for long-running coding and work agents: session compaction, a sandboxed shell, rule-based permissions, and sturdier file, MCP and memory tools.
Breaking:
tool/bash: a background command no longer stops at the foreground timeout. It runs until it exits,kill_shellorClose, unlessWithBackgroundTimeoutis set.tool/file: the read tool returns thecat -ntext as a plain string, not{"content": ...}.ReadOutputis deprecated.vectorstore/qdrant: writes wait until applied.WithWait(false)restores the old behaviour.
Deprecated: WithSummarization in memory/simple, jsonfile, psql and nats. Use agent.SetCompaction instead. bash.MaxOutputChars is an alias of bash.DefaultMaxOutputChars.
Highlights:
- Compaction:
agent.SetCompactionwithagent.NewSummaryCompactorsummarizes older history when the prompt passes a token threshold, or after a context-length error.Agent.Compactcompacts on demand. Snapshots are stored by every memory backend, so the next run starts from the summary. Compaction events are inRunStream, and the summary model's usage counts inResult.Summary. - New tools:
tool/permission(allow, ask and deny rules for tool calls, with bash command lines parsed bymvdan.cc/sh),tool/web(web_fetchwith an SSRF guard) andtool/todo(a task list for long runs). - Bash: a bubblewrap sandbox runner, a pluggable
Runner, environment options, opt-in persistent shell state, streamed output, and background shells with their own lifetime and output cap. - File:
multi_edit, a read-before-write guard, read output capped and paged,WithReadOnlyRoots, glob and grep that fit real repositories. - Agent: caps on parallel tool calls with exclusive tools run alone, recovery from tool panics, the session saved after each iteration, tool calls cut at the output limit not run,
SetLLM. - LLM: context-length and retryable provider errors are classified,
llm.WithMaxOutputTokens,llm.EstimateTokens, and streaming kept through every middleware. Retry now retries only errors a retry can fix. - Providers: Anthropic caches the whole conversation and has a higher default
max_tokens. OpenAI keepsreasoning_contentand sends tool-result images correctly. - MCP: tool errors are reported, images are passed through, tool names are made valid for providers, and
WithMaxOutputCharscaps results.
What's Changed
Full Changelog: v2.2.0...v2.3.0