This release removes the session_plan toolset, adds audio/video/image input and output capability handling, expands hook functionality with new builtins and sequential pipelines, and includes several bug fixes and safety improvements.
Breaking Changes
- Removes the
session_plantoolset, including its tool handlers, stream event, plans service, TUI/plansbrowser, and--session/--scopeaddressing on theplanscommand
What's New
- Adds detection and filtering of audio/video input modalities per request model, stripping unsupported media parts and preserving provider-specific fallbacks
- Adds
output_capabilities.imagemodel override to resolve image output capability from models.dev metadata - Adds guard for image-output requests across Google (gateway, direct Gemini API, and Vertex) surfaces, rejecting incompatible custom tools and structured output before dispatch
- Adds
add_contextbuiltin hook for dependency-free Go template-based context injection into the model's conversation - Adds sequential pipeline execution for
pre_tool_use,before_llm_call, andtool_response_transformhooks, replacing the previous concurrent first-rewrite-wins strategy - Adds 56 new safe and 27 new destructive shell safety patterns, covering Git read operations, GitHub CLI queries, Go tooling,
rg/ripgrep, and common inspection commands
Bug Fixes
- Fixes Gemini keepalive SSE events (
event: keepalivewithdata: {}) being passed to the SDK parser, causing parse failures; these frames are now dropped at the transport layer - Fixes image-output-capable models being incorrectly excluded from session title generation
- Fixes shell metacharacter detection and corrects
gh/rgpattern classifications - Fixes SQLite stores not being closed deterministically on Windows, causing
TempDircleanup failures in tests - Fixes
pkg/sessionimporting the SQLite driver, keeping the package free of that dependency
Technical Changes
- Adds request-shape diagnostics for Gemini image requests (excluding prompt, schema, media-payload, and credential fields)
- Adds shared UTF-8-safe display-name sanitization helpers
- Classifies Gemini API 400 errors into bounded actionable categories
- Adds documentation tip for injecting session ID into model context using a
session_starthook
What's Changed
- docs: update CHANGELOG.md for v1.136.0 by @docker-read-write[bot] in #4202
- fix: drop Gemini keepalive SSE events before SDK parsing by @dgageot in #4203
- feat(plan)!: remove the session_plan toolset by @trungutt in #4199
- docs: add tip for injecting session ID with a session_start hook by @dgageot in #4205
- feat(hooks): add add_context builtin for dependency-free template context injection by @dgageot in #4206
- feat(hooks): sequential pipeline for pre_tool_use, before_llm_call, and tool_response_transform by @dgageot in #4207
- feat(#3996): resolve and filter input media per request model by @aheritier in #4016
- fix(#3996): diagnose Gemini requests and sanitize API failures by @aheritier in #4017
- feat(#3996): resolve image output capability from models.dev by @aheritier in #4019
- feat(#3996): guard image-output requests across Google surfaces by @aheritier in #4020
- fix(#3996): keep image-output models eligible for session titles by @aheritier in #4021
- fix(#3996): filter gateway SSE keepalives and test image requests by @aheritier in #4022
- feat(safety): expand shell safety patterns and harden substitution checks by @dgageot in #4209
- fix(tui): close SQLite stores deterministically so Windows can delete t.TempDir by @aheritier in #4210
Full Changelog: v1.136.0...v1.137.0