- Apply replaceTabs to all text rendering paths in task tool (output,
task section, context, review explanations, finding bodies)
- Strip <swarm_context> block from expanded task view since it is the
shared context duplicated across every task
todo_write renderResult used truncateToWidth with Ellipsis.Omit which
silently drops content, and the empty-todos fallback returned a raw
component that bypassed width handling entirely. Switched all paths
to return Text(text, 0, 0) which applies wrapTextWithAnsi at render
time, preserving full todo content on narrow terminals.
Ask tool renderResult returned raw line arrays that bypassed the Text
component's word wrapping, causing a TUI crash when user input exceeded
terminal width. Switched all renderResult code paths to return
Text(text, 0, 0) which applies wrapTextWithAnsi at render time.
- Fixed schema normalization in Google provider to handle array-valued type fields by converting them to single type with nullable flag.
- Refactored version parsing in install script to use bash parameter expansion instead of IFS field splitting.
- Changed variable declarations from let to var in theme module global scope.
- Added terminal breadcrumb tracking to remember the last session per terminal, enabling `--continue` to work correctly with concurrent sessions in different terminals.
- Implemented `getTerminalId()` function to identify the current terminal using TTY device path or environment variables (Kitty, tmux, macOS Terminal, Windows Terminal).
- Implemented `writeTerminalBreadcrumb()` function to persist terminal-to-session mappings in the agent directory.
- Implemented `readTerminalBreadcrumb()` function to retrieve the last session for the current terminal, scoped to the current working directory.
- Modified session initialization to write breadcrumbs when loading or creating sessions, ensuring terminal context is preserved.
- Removed unused import of resolveToCwd from path-utils module.
- Removed unused resolveArtifactsDir function that was not called elsewhere.
- Prefixed unused ctx parameter with underscore to indicate intentional non-usage.
- Changed screenshot format to always use PNG instead of supporting JPEG with quality parameter.
- Changed default extract_readable format from text to markdown.
- Changed screenshot storage to use temporary directory with Snowflake IDs instead of artifacts directory.
- Changed ResizedImage interface to return buffer as Uint8Array with lazy-loaded base64 data getter for improved memory efficiency.
- Removed JPEG quality parameter from screenshot options.
- Removed ability to save screenshots to custom paths or artifacts directory.
- Fixed tab character display in error messages and bash tool output by applying replaceTabs() sanitization.
- Added TUI rendering sanitization documentation to AGENTS.md with guidelines for sanitizing text in tool renderers.
- Applied replaceTabs() function to error text in patch shared module to ensure proper tab-to-space conversion.
- Applied replaceTabs() function to bash tool output lines in both expanded and collapsed display modes.
- Renamed XML tag `<important>` to `<caution>` across system prompts and tool documentation for improved semantic clarity.
- Collapsed multi-line function calls to single lines in diff component formatting for improved code conciseness.
- Consolidated emoji guideline into critical section in write tool documentation.
- Fixed whitespace visualization in CHANGELOG diff output and corrected incomplete text.
- Fixed patch applicator to preserve indentation in context-only hunks by skipping unnecessary adjustments when pattern equals actual content.
- Implemented linear regression-based tab width inference to correctly convert space-indented diffs to tab-indented files using ax+b model.
- Added regression tests for context-only hunk handling and space-to-tab indentation conversion with offset models.
- Updated patch tool documentation to emphasize never using edit operations for indentation or formatting fixes.
- Added visualization of leading whitespace (indentation) in diff output with dim glyphs--tabs display as ` -> ` and spaces as `·` for improved readability.
- Implemented visualizeIndent() function to normalize and display indentation patterns, collapsing 3-space groups into tab arrows and marking individual spaces with middle dots.
- Fixed tab character rendering in tool output previews and code cell displays by converting tabs to spaces for consistent terminal display.
- Applied replaceTabs() function across patch rendering, write tool output, and code cell output to ensure uniform tab handling.
- Fixed `newSession()` to properly await session manager operations for full initialization.
- Changed session formatting to use XML structure instead of YAML for tools and tool invocations.
- Added formatArgsAsXml() helper function to serialize objects as XML parameter elements.
- Removed trailing whitespace from task.md prompt file.
- Added regression test for AgentSession.newSession() to verify proper session switching and artifact isolation.
- Fixed background color stability in output blocks when inner content contains SGR reset sequences, preventing background color from being cleared mid-line.
- Fixed spurious ellipsis appended to output lines that were already padded to terminal width by trimming trailing spaces before truncation check.
- Improved hash function to include string length in hash computation for better collision resistance.
- Removed getCursorPosition() method from Component interface and implementations, eliminating hardware cursor positioning support.
- Changed PI_HARDWARE_CURSOR environment variable default from implicit true to explicit '1' with fallback pattern.
- Changed PI_CLEAR_ON_SHRINK environment variable default from implicit false to explicit '0' with fallback pattern.
- Added screen clearing on TUI startup to prevent shell prompts from bleeding into first rendered frame.
- Refactored full-render logic into reusable fullRender() helper function.
- Added BlobStore class for content-addressed storage of large binary data externalized from session files.
- Added getBlobsDir() function to retrieve the path to the blob store directory.
- Added blob reference format (blob:sha256:<hash>) for tracking externalized image data in sessions.
- Changed image persistence to externalize images >=1KB to content-addressed blob store instead of compressing inline, reducing JSONL file size.
- Changed session loading to automatically resolve blob references back to base64 image data.
- Changed session forking to resolve blob references in copied entries to ensure data integrity.
- Added automatic image compression to screenshot tool using the same resizing logic as pasted images, reducing API payload size while maintaining quality.
- Enhanced screenshot output to display compression details including final dimensions and MIME type when images are resized.
- Extracted Alt+Enter follow-up message handling from inline editor callback into dedicated handleFollowUp() method.
- Moved follow-up keybinding registration to use new handleFollowUp() method instead of inline callback.
- Implemented width-aware text truncation across all tool renderers to respect terminal width constraints and prevent output overflow.
- Enhanced render caching to include width parameter for cache invalidation when terminal width changes, improving cache accuracy.
- Migrated truncateToWidth function imports from render-utils to centralized tui module for better code organization.
- Introduced Hasher utility for generating width-aware cache keys in calculator, find, grep, todo-write, and write tools.
- Optimized box component rendering to only truncate lines that exceed content width, reducing unnecessary truncation operations.
- Added ModeChangeEntry type export to public API for tracking agent mode transitions.
- Added mode and modeData fields to SessionContext to track active agent mode state across sessions.
- Added appendModeChange() method to SessionManager for recording mode transition entries.
- Added plan mode state restoration from session entries when resuming interactive mode sessions.
- Updated HTML export filter to treat mode_change entries as settings entries alongside model changes and thinking level changes.
- Added type validation for tool arguments in HTML export template with error handling for invalid values.
- Replaced ASCII ellipsis characters (three dots '...') with Unicode ellipsis character ('...') throughout the codebase for improved typography.
- Adjusted string truncation logic to account for single-character Unicode ellipsis instead of three-character ASCII ellipsis, reducing reserved space from 3 to 1 character in truncation calculations.
- Updated truncation offsets in multiple files (session-manager, agent, executor, footer) to preserve 2 additional characters before ellipsis due to more compact Unicode representation.
- Implemented caching for tool output block rendering to avoid redundant computations on re-renders.
- Enhanced read tool grouping to prevent coalescing across narrative boundaries (text/thinking blocks between tool calls).
- Improved string preview formatting to detect multi-line strings and display line counts with ellipsis indicators.
- Refactored tool execution component to use reactive render state tracking for better state management.
- Enhanced error handling in tool renderers with logging for failures.
- Fixed truncation indicator to use ellipsis character instead of verbose suffix.
- Made shell command execution in configuration values asynchronous to prevent blocking the TUI, improving responsiveness during long-running operations.
- Added deduplication of concurrent shell command executions to prevent redundant processing when the same command is requested multiple times simultaneously.
- Enhanced git URL parsing with credential stripping and validation of URI-encoded hash fragments to improve security and robustness.
- Improved @ prefix normalization for path syntaxes to correctly handle well-known patterns while preserving literal paths like '@my-file.txt'.
- Refactored prompt cache key calculation in OpenAI responses to improve code clarity and ensure cache retention is only set when a cache key exists.
- Fixed task executor to properly handle agents calling `submit_result` with null data by treating it as missing and attempting to extract output from conversation text rather than silently failing.
- Added documentation caution in task.md about schema vs agent mismatch causing null output, with guidance on using `schema` parameter to override built-in schemas.
- Added warning message when subagent calls submit_result with null data to help diagnose schema mismatch issues.
- Added support for puppeteer query handlers (aria/, text/, xpath/, pierce/) in selector parameters across all browser actions.
- Added automatic normalization of legacy p- prefixed selectors (p-aria/, p-text/, p-xpath/, p-pierce/) to modern puppeteer query handler syntax.
- Added enhanced actionability checking for click operations, validating visibility, pointer events, opacity, viewport intersection, and element occlusion.
- Fixed click action to properly handle text/ query handlers with timeout and retry logic instead of failing immediately.
- Fixed viewport application to only apply when in headless mode or when explicitly requested, preventing conflicts in headed browser mode.
- Extracted stream abort handling into dedicated `createAbortableStream` utility function for reuse across stream operations.
- Refactored `sanitizeBinaryOutput` to handle surrogate pairs correctly and filter additional control characters (DEL and C1 control block) with lazy array allocation.
- Simplified JSONL parsing by replacing manual buffer management with new `pullJSONL` generator method in ConcatSink class.
- Removed unused `createSanitizerStream` and `createTextDecoderStream` helper functions that are no longer needed.
- Refactored `readSseJson` to use generator-based line processing with fast-path optimization for OpenAI-style done markers.
- Updated stdio transport to use new `readJsonl` utility instead of manual JSON parsing with TextDecoder.
- Extracted stream parsing utilities into reusable functions in pi-utils package (readLines, readJsonl, parseJsonlLenient, readSseJson).
- Replaced manual buffer management with ConcatSink class for efficient stream handling across multiple modules.
- Simplified SSE stream parsing in google-gemini-cli provider by using readSseJson utility instead of manual reader setup.
- Refactored MCP stdio transport to use readLines utility for cleaner line-based stream processing.
- Updated RPC client and mode to use readJsonl utility, removing duplicate JSONL parsing logic.
- Optimized buffer allocations by using allocUnsafe where data is immediately populated and reusing empty buffer instances.
- Migrated authentication storage from JSON-based (auth.json) to database-based (agent.db) format across test files and configuration.
- Simplified auth storage discovery in sdk.ts by removing manual path construction and fallback logic in favor of centralized getAgentDbPath() function.
- Removed dbPath instance property from AuthStorage class as database path is now managed centrally.
- Updated environment variable precedence documentation to reflect agent.db instead of auth.json as the lowest priority source.
- Removed OAuth provider section header comments from multiple test files for cleaner test organization.
- Added support for JSON and JSONC configuration file formats without requiring migration to YAML.
- Reorganized web search provider system to use individual provider classes in separate files under providers/ directory.
- Moved SearchProvider base class and SearchParams interface to dedicated providers/base.ts module.
- Consolidated provider management logic into provider.ts, replacing provider-info.ts.
- Updated web search execution to pass maxOutputTokens, numSearchResults, and temperature parameters to providers.
- Changed Perplexity search context size from 'high' to 'medium' and increased default max tokens from 4096 to 8192.
- Updated Anthropic and Gemini search providers to support max_tokens and temperature parameters.
- Removed legacy auth.json file-based authentication migration system and simplified AuthStorage to use only agent.db for credential storage.
- Simplified AuthStorage API by removing authPath and fallbackPaths parameters, now accepting only dbPath for improved startup performance.
- Deleted storage-migration.ts module containing legacy JSON-to-SQLite migration logic that is no longer needed.
- Removed getAuthPath() configuration function from config.ts as auth.json file-based storage is no longer supported.
- Renamed web search types and functions to remove 'Web' prefix for broader applicability (WebSearchProvider -> SearchProviderId, WebSearchResponse -> SearchResponse, WebSearchTool -> SearchTool, etc.).
- Refactored web search provider system from object-based configuration to class-based architecture with abstract SearchProvider base class and concrete provider implementations.
- Refactored ModelRegistry to use direct constructor instantiation instead of discoverModels() helper function, simplifying model discovery pattern.
- Refactored config system to use new ConfigFile class with schema validation, caching, and multi-format support (JSON, JSONC, YAML).
- Simplified Exa API key discovery to check environment variables only, removing .env file reading logic.