- Threaded Settings parameter through renderUrl and renderHtmlToText functions for dependency injection.
- Changed settings import from default export to type-only import in fetch.ts.
- Added vi.clearAllMocks() calls to test setup hooks for proper mock isolation.
- Added Parallel AI provider integration for web search with fast and research modes.
- Added Parallel extract API for URL content and YouTube video extraction with fallback support.
- Added /login parallel command and PARALLEL_API_KEY environment variable authentication.
- Added providers.parallelFetch configuration setting to control Parallel extract usage.
- Integrated Parallel provider into web search priority order between Exa and Kagi.
- Updated HTML-to-text and YouTube scrapers to prefer Parallel extract over fallback providers.
- Corrected buffer-to-base64 conversion by wrapping raw buffers with Buffer.from() to ensure proper encoding across image processing utilities.
- Updated 6 buffer conversion calls in fetch, image-input, and image-resize modules for consistency.
- Simplified hashline tool documentation by consolidating workflow and checklist sections into concise opening guidance.
- Reorganized examples to emphasize block-boundary shapes (a) and (b) with clearer bad/good comparisons.
- Removed redundant rules section and integrated key constraints into critical section for single source of truth.
- Clarified hashline tool documentation to distinguish behavior of `lines` field across `replace`, `prepend`, and `append` operations.
- Refined `edits[n].pos` description to specify 'first line' for replace operation.
- Fixed line normalization to trim trailing whitespace and strip carriage returns instead of removing all whitespace.
- Fixed no-op detection to check array length equality before comparing lines, preventing false classification of multi-line expansions.
- Added clarification to hashline tool documentation on `replace` operation semantics and `lines` boundary constraints.
- Added test case validating single-line to multi-line expansion behavior and firstChangedLine calculation.
- Extracted diagnostic message formatting into reusable `formatGroupedDiagnosticMessages()` utility function.
- Consolidated diagnostic output formatting across lsp/index.ts and tools/output-meta.ts to use shared utility.
- Added `DIAG_PATH_RE` regex pattern to parse diagnostic message format with file path, line, and column.
- Added `/copy` command subcommands (code, all, cmd, last) for flexible code block and command copying.
- Added support for copying last executed bash or python command via `/copy cmd` subcommand.
- Refactored handleCopyCommand() to route subcommands with dedicated private methods for each copy operation.
- Added regex-based code block extraction from markdown with fallback warnings for missing blocks.
- Changed eager todo reminder message role from 'developer' to 'custom' with customType field for better message categorization.
- Removed userRequest parameter from eager todo prelude generation to simplify prompt template rendering.
- Updated eager todo prompt to avoid redundant todo_write calls unless task state materially changed.
- Modified eager todo reminder message to use string content with display: false property instead of array format.
- Refactored eager todo injection from recursive prompt call to prepended message pattern.
- Removed state fields for todo injection tracking and consolidated logic into message composition.
- Added prependMessages option to promptWithMessage for composing messages before main prompt.
- Updated system prompt to require todo creation before substantive work on user requests.
- Fixed race condition where outer prompt would continue after user abort during eager todo's inner prompt by checking generation counter before proceeding.
- Added optional `assignment` field to task result and progress interfaces to track raw per-task assignment text separately from full templated task.
- Updated task rendering to display assignment text instead of full task template when available, improving clarity of task display.
- Modified task section rendering to show trimmed assignment text with fallback to task field if assignment is not available.
- Propagated assignment field through task executor, template renderer, and result objects to maintain consistency across task processing pipeline.
- Fixed OSC 11 background color detection to handle partial escape sequences that arrive mid-buffer, preventing user input from being swallowed.
- Fixed race condition where overlapping OSC 11 queries would be incorrectly cancelled by DA1 sentinels from previous queries by implementing a query queueing mechanism.
- Refactored OSC 11 query handling to use queuing instead of immediate restart, improving robustness of terminal appearance detection.
- Added comprehensive test coverage for terminal appearance detection including partial buffer handling, query queueing, and debouncing behavior.
- Added test cases for theme auto-detection to verify terminal-reported appearance takes precedence over environment variables and platform-specific detection.
* fix(path): PI_CONFIG_DIR discovery
* refactor: centralize agent dir name into getConfigAgentDirName()
- Add getConfigAgentDirName() to utils/dirs.ts as single source of truth
- Replace duplicated "/agent" suffix construction in helpers.ts and config.ts
- Let biome format mcp/manager.ts canonically
---------
Co-authored-by: can1357 <me@can.ac>
- Added optional `details` field to TodoItem type for storing implementation specifics, file paths, and edge cases.
- Enhanced todo item display to show multi-line details with automatic indentation in interactive and reminder modes.
- Updated eager-todo system prompt to enforce separation of short task content (5-10 words) from detailed implementation information.
- Extended TodoWriteTool to support creating and updating tasks with details field via add_task and update operations.
- Added comprehensive test coverage for details field handling across todo operations (replace, add_task, update).
- Fixed path resolution to accept bare directory names without trailing slashes in comma/space-separated path lists.
- Added existence check for bare path tokens before rejecting them as invalid, allowing directory names like 'packages' to be resolved correctly.
- Added test case verifying grep tool accepts bare space-separated directory names without trailing slashes.
- Added 'todo.eager' configuration setting to automatically create a comprehensive todo list after the first user message.
- Added 'buildNamedToolChoice' utility function to build provider-aware tool choice constraints for named tools.
- Modified tool choice resolution to support per-turn tool choice overrides via consumeNextToolChoiceOverride() method.
- Implemented eager todo enforcement mechanism that injects a synthetic prompt to encourage todo creation when conditions are met.
- Extracted tool choice building logic into reusable utility module for better code organization.
- Added comprehensive test coverage for eager todo enforcement functionality in AgentSession.
- Corrected error messages in ast-edit, ast-grep, grep, and find tools to reference the correct scope path variable instead of incorrect variable names.
- Added support for comma/space-separated path lists in find, grep, ast_grep, and ast_edit tools, allowing users to search multiple directories with a single query (e.g., 'apps/,packages/,phases/' or 'apps/ packages/ phases/').
- Added resolveMultiSearchPath and resolveMultiFindPattern utility functions to path-utils for intelligent parsing and resolution of multi-path search inputs with automatic common base path detection.
- Updated tool documentation for find, grep, ast_grep, and ast_edit to clarify that path parameters accept files, directories, glob patterns, or comma/space-separated path lists.
- Refactored path resolution logic in find, grep, ast_grep, and ast_edit tools to use unified multi-path handling with intelligent delimiter detection (comma or whitespace).
- Exported `submitInteractiveInput()` function for programmatic submission of user input in interactive mode.
- Fixed continue special path to skip optimistic submission state check for already-started prompts.
- Added 2 test cases covering continue submission behavior and optimistic state cancellation.
#resolveAuthConfig only refreshed tokens within the 5-minute pre-expiry
window, so the onAuthError retry path reused stale credentials when
tokens were revoked, clocks skewed, or expires was missing. Add a
forceRefresh parameter and pass true from the auth error handler so
401/403 always triggers an unconditional refresh attempt.
* Add OAuth token refresh for MCP connections
Proactive refresh with 5-minute buffer before token expiry, plus
retry on 401/403 with automatic token refresh for HTTP transports.
Persist tokenUrl, clientId, and clientSecret in auth config so
refresh can happen without re-prompting the user.
* docs(coding-agent): updated CHANGELOG for MCP OAuth token refresh
writeTerminalBreadcrumb used void Bun.write() — discarding the promise.
When parallel tasks write the same breadcrumb file concurrently on
Windows, Bun.write fails with EBUSY. The discarded promise rejects
unhandled, crashing the process.
Replace void with .catch(() => {}) to properly swallow best-effort
failures.
Co-authored-by: Miroslav Drbal <miroslav.drbal@gendigital.com>
- Preserved text signature metadata (id and phase) when building OpenAI native history during session compaction.
- Added test case validating that codex assistant text signature metadata is correctly preserved in remote compaction history.
- Extracted OpenAI Responses API stream processing logic into shared module with 424 lines of reusable utilities.
- Consolidated text signature encoding, tool call normalization, and message conversion functions into openai-responses-shared module.
- Refactored openai-responses.ts and azure-openai-responses.ts to delegate stream processing to shared processResponsesStream() helper.
- Removed 473 lines of duplicated stream event handling and utility functions across OpenAI provider implementations.
- Added `onPayload` callback option to intercept and transform provider request payloads before transmission across agent and AI packages.
- Added structured text signature metadata with phase information to OpenAI and Azure OpenAI providers for enhanced response tracking.
- Added `before_provider_request` extension event to coding-agent for chaining payload transformations across multiple handlers.
- Improved error messages in `response.failed` events with detailed error codes, messages, and incomplete reasons from provider responses.
When the OpenAI responses stream stalls (e.g. with github-copilot/
gpt-5.4), the error message "stream stalled while waiting for the
next event" is now recognized as a retryable transient error.
Two locations updated:
- packages/ai/src/utils/retry.ts: add "stream stall" to
TRANSIENT_MESSAGE_PATTERN (used by provider-level retry logic)
- packages/coding-agent/src/session/agent-session.ts: add
"stream stall" to #isRetryableErrorMessage() regex (used by
agent-session retry loop for both thrown errors and error
AssistantMessages)
Fixes#348
Co-authored-by: GitHub User <user@example.com>
- Added `modelId` parameter to `getApiKey()` for model-specific credential selection.
- Implemented plan-based account prioritization for OpenAI Codex Pro models, preferring Pro plan accounts.
- Added `AuthApiKeyOptions` type to support model-specific authentication configuration.
- Added helper functions for OpenAI Codex Pro model detection and plan-based ranking logic.
- Added background model discovery with provider status tracking and 24-hour model caching to improve startup performance.
- Changed model discovery timeout from 3000ms to 250ms and deferred blocking refresh to background operations for faster initialization.
- Fixed model discovery to preserve cached models when providers are unavailable or unauthenticated.
- Added validation in Kitty key formatting to reject unsupported modifiers and improved error handling.
- Reorganized CI workflow to run TypeScript linting in check job and conditional Rust checks in native job matrix.
- Updated system prompt and tool guidance to recommend combined investigation-and-edit workflows and maintainable code practices.
- Removed provider parameter from web search tool schema; provider selection now handled internally.
- Removed deprecated no_fallback option from search parameters; fallback behavior is now automatic.
- Renamed SearchParams type to SearchToolParams and introduced SearchQueryParams for CLI queries.
- Updated executeSearch() to accept SearchQueryParams with optional provider selection.
- Introduced SubmittedUserInput type to track submission state including cancelled and started flags. Added startPendingSubmission, cancelPendingSubmission, markPendingSubmissionStarted, and finishPendingSubmission methods to manage the lifecycle of user input submissions. Enhanced escape key handling to prioritize canceling pending optimistic submissions before aborting active sessions.
- Extracted loading animation lifecycle management into centralized ensureLoadingAnimation() method.
- Consolidated duplicate loading animation setup across event-controller and interactive-mode into single reusable method.
- Updated showError() to properly clean up loading animation state when errors occur.
- Added comprehensive test coverage for InputController escape key behavior with optimistic submission.
- Imported buildSessionContext from session-manager module.
- Replaced inline session context object with buildSessionContext factory call in test assertion.