* fix: use vscode.env.asExternalUri for web OAuth callbacks
In VS Code Web (Codespaces, code serve-web), OAuth callbacks using
http://127.0.0.1:PORT break because the extension host runs remotely.
Changes:
- getCallbackUrl now accepts a path parameter
- Desktop: uses vscode://extension-id/path directly
- Web (UIKind.Web): uses vscode.env.asExternalUri() for web-reachable URL
- Updated all callers (/auth, /openrouter, /hicap, /requesty, MCP) to
pass path and use URL+searchParams for proper encoding
- Added regression test asserting web callback URL is not 127.0.0.1
- AuthHandler (localhost HTTP) now only used by CLI/standalone mode
* fix: use URL.searchParams for proper callback URL encoding
Callers were using template literal interpolation to embed callback URLs
into query strings, which breaks when the URL contains special characters
(e.g. from asExternalUri with query params). Use URL+searchParams.set()
which automatically encodes values.
* chore: revert unrelated whitespace change in account.proto
* revert: remove non-essential URL encoding changes in auth callers
Keep only the core fix (getCallbackUrl path parameter + asExternalUri for web).
Revert the URL+searchParams encoding improvement to minimize diff.
* fix: URL-encode callback_url in auth callers, add encoding test
In VS Code Web, callback URLs from asExternalUri can contain their own
query params (?tkn=...&extra=...). String-interpolating them into
callback_url= causes everything after the first & to be parsed as
top-level params, truncating the callback URL.
Use URL + searchParams.set() in openrouter, hicap, and requesty callers.
Replace tautology test with deterministic round-trip encoding assertions.
* fix: use vscode.env.asExternalUri for auth callback URLs in VS Code Web
The OAuth callback redirect was broken in VS Code Web (code serve-web)
environments because the callback URL used a raw vscode:// URI scheme,
which the OS would route to the local desktop VS Code app instead of
the web instance.
This change wraps both getCallbackUrl() and getIdeRedirectUri() with
vscode.env.asExternalUri() which properly transforms URIs based on the
environment:
- Desktop VS Code: unchanged (vscode://...)
- VS Code Remote SSH: adds remote authority for proper routing
- VS Code Web: transforms to HTTPS URL that routes through the web server
Fixes#5109 (remaining callback redirect issue)
Related: #2152
* fix: use HTTP-based auth callback for VS Code Web mode
In VS Code Web (code serve-web), vscode:// URIs redirect to the desktop
app instead of staying in the browser. This change uses AuthHandler
(local HTTP server) for the auth callback in web mode, matching how
CLI/standalone already handles auth.
- getCallbackUrl: use AuthHandler when UIKind.Web
- getIdeRedirectUri: return empty in web mode to avoid vscode:// redirect
* fix: add fallback for openExternal RPC for JetBrains compatibility
The openExternal host bridge RPC is not implemented in the JetBrains
plugin, causing sign-in to fail silently. This adds a fallback to the
'open' npm package when the host RPC fails with UNIMPLEMENTED.
Fixes#9164, #9137, #9138
- Add stdinIsTTY check to shouldUsePlainTextMode() - Ink requires raw mode on stdin
- Only error on empty stdin when no prompt is provided (allows: cline 'prompt' < /dev/null)
- Fixes crash in GitHub Actions and other CI environments
- Cline CLI 2.0 now available. Install with `npm install -g cline`
- Anthopic Opus 4.6
- Minimax-2.1 and Kimi-k2.5 now available for free for a limited time promo
- Codex-5.3 through OpenAI Codex provider
- Fix read file tool to support reading large files
- Fix decimal input crash in OpenAI Compatible price fields (#8129)
- Fix build complete handlers when updating the api config
- Fixed missing provider from list
- Fixed Favorite Icon / Star from getting clipped in the task history view
- Make skills always enabled and remove feature toggle setting
Co-authored-by: Arafatkatze <arafat.da.khan@gmail.com>
* feat: add Claude Opus 4.6 model support with 1M context window
Adds support for Claude Opus 4.6, Anthropic's latest model with:
- 200K base context window with optional 1M context variant
- Tiered pricing for >200K context (2x input/output pricing)
- Extended thinking/reasoning support
- Prompt caching support
Changes:
- Added model definitions for Anthropic, Bedrock, and Vertex providers
- Added OpenRouter 1M variant support
- Updated thinking models lists across all provider UIs
- Added context window switcher for Opus 4.6
- Updated JP cross-region inference models list
* feat: update featured model to Opus 4.6 in model picker
* chore: add changeset for Claude Opus 4.6
* fix: correct Opus 4.6 model IDs (no date suffix)
---------
Co-authored-by: Robin Newhouse <robin@cline.bot>
* fix: use vscode.env.openExternal for auth in remote environments
Fixes#5109
The OAuth authentication flow was broken in VS Code Server and remote
environments because the code used the npm 'open' package directly, which
tries to launch a browser on the server itself (which has no display).
This change routes browser URL opening through VS Code's native
vscode.env.openExternal() API via the HostBridge pattern, which properly
forwards URLs to the user's local machine in remote environments.
Changes:
- Added openExternal RPC to proto/host/env.proto
- Created VS Code handler using vscode.env.openExternal()
- Updated src/utils/env.ts to use HostProvider.env.openExternal()
- Added openExternal to CLI CliEnvServiceClient (uses npm 'open')
- Added openExternal to CLI ACPEnvServiceClient (uses npm 'open')
Related issues: #5394, #2152, #7971
* chore: add changeset for vscode server auth fix
* refactor: extract shared openUrlInBrowser utility for CLI
* add auth option to get API-KEY for hicap from hicap dashboard website
* remove default hicap model selection
* change url hicap get api keys, add useEffect when update hicapApiKey
* add changeset
* fix(cli): prevent hang when spawned without TTY
When the CLI is spawned as a child process without a TTY (e.g., from
spawn() in smoke tests or CI), process.stdin.isTTY is false even when
nothing is piped to stdin. This caused readStdinIfPiped() to wait up
to 5 minutes for input that would never arrive.
Fix by using fs.fstatSync(0) to check if stdin is actually a FIFO
(pipe) or file before waiting. This correctly handles:
- Spawned processes without TTY → returns immediately
- Actual piped input (echo "x" | cline) → waits and reads
- stdin from /dev/null → returns immediately
* chore: add changeset
* test(cli): add tests for stdin type detection
* feat: display markdown table in UI
Simplify the handlePartialBlock method in AttemptCompletionHandler by:
- Removing conditional logic for command vs no-command cases
- Always displaying partial result if present
- Deferring command handling to the final execution step
This fixes an issue where attempt completion response doesn't get streamed to the UI during partial result.
Also replaced react-remark with react-markdown and remark-gfm dependencies to MarkdownBlock in UI for enhanced markdown rendering support with GitHub Flavored Markdown features, including displaying table.
* add changeset
* Update src/core/task/tools/handlers/AttemptCompletionHandler.ts
handlePartialBlock hard-codes the partial flag to true when calling uiHelpers.say(...). For consistency with other tool handlers and to avoid incorrect behavior if this method is ever invoked with a non-partial block, pass block.partial through instead.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Robin Newhouse <robin@cline.bot>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix: decimal input crash in OpenAI Compatible price fields (#8129)
* refactor: use type-safe parsePrice helper for decimal input handling
Replace the `as any` type bypass with a proper parsePrice utility function
that safely handles edge cases (empty string, lone dot, invalid input)
while maintaining type safety. Adds unit tests for the helper.
---------
Co-authored-by: Robin Newhouse <robin@cline.bot>
* feat(skills): Make skills always enabled and remove feature toggle setting
- Remove skillsEnabled from state-keys.ts USER_SETTINGS_FIELDS
- Remove Skills checkbox from FeatureSettingsSection.tsx
- Remove skillsEnabled handling from updateSettings.ts
- Mark skills_enabled as reserved in both Settings and UpdateSettingsRequest proto messages
- Remove conditional in task/index.ts to always discover skills
- Remove skillsEnabled from ExtensionStateContext.tsx default state
- Remove skillsEnabled from ExtensionMessage.ts interface
- Remove skillsEnabled from controller/index.ts state building
- Always show skills tab in ClineRulesToggleModal.tsx
- Remove experimental note from docs/features/skills.mdx
Follows the same pattern as hooks removal (PR #8777).
* fix: Show error message when skill creation fails
Display error to user instead of silently logging when creating a workspace
skill fails (e.g., when no workspace folder is open).
* Fix: LiteLLM thinking configuration not showing for models (#8342)
* fix: add supportsReasoning to LiteLLM proto serialization
The model ID key fix alone wasn't sufficient - supportsReasoning was
being lost during the proto serialization cycle when saving/loading
model info. This adds the field to all relevant conversion functions.
---------
Co-authored-by: ClineXDiego <diego@cline.bot>
Co-authored-by: Robin Newhouse <robin@cline.bot>
Add two new CLI auth providers for headless setups and map their
configuration fields. Fix auth menu/provider status to use the
workspace-backed auth instance so the configured provider displays
correctly.
* feat(hooks): Run hooks from cwd of the workspace repo root.
* feat(hooks): npm run changeset
* feat(hooks): Make hooks execute in their respective repo's root dir.
* feat(hooks): Improvements as per Cline's code review feedback.
* changeset version bump
* Updating CHANGELOG.md format
* release(3.55.0): Version bump and update WhatsNewModal
* feat(settings): Support linking to recommended or free model picker.
* Send to cline provider
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: cline-test <132302818+candieduniverse@users.noreply.github.com>
Co-authored-by: Arafatkatze <arafat.da.khan@gmail.com>
* feat: add MCP prompts support
Implement support for MCP prompts as defined in the MCP spec (2025-06-18):
- Add McpPrompt and McpPromptArgument types to shared types
- Update proto definitions with prompt messages
- Update McpHub to fetch prompts list and get individual prompts
- Add prompts to system prompt component for AI awareness
- Add McpPromptRow UI component for displaying prompts
- Update ServerRow with Prompts tab showing available prompts
- Add slash command integration (/mcp:<server>:<prompt>)
- Update regex patterns to support colons in command names
MCP prompts are user-controlled templates that can be invoked via
slash commands to inject contextual messages into the conversation.
* style: alphabetize imports in mcp-server-conversion.ts
Reorder imports to follow project convention of alphabetical ordering.
* feat: add MCP prompts to slash command autocomplete
Wire up mcpServers to SlashCommandMenu so MCP prompt commands appear
in the autocomplete dropdown with their own "MCP Prompts" section.
* test: add unit tests for MCP prompt slash commands
- Add webview slash-commands.test.ts testing getMcpPromptCommands,
getMatchingSlashCommands, and validateSlashCommand with MCP servers
- Add backend slash-commands tests for formatMcpPromptResponse and
parseSlashCommands MCP handling
- Export formatMcpPromptResponse for testability
- Add "mcp_prompt" to telemetry captureSlashCommandUsed types
* test: update snapshots and fix backend tests for MCP prompts
- Update system prompt snapshots to include MCP prompts section
- Remove backend tests requiring StateManager initialization
(tests for unknown server, no fetcher, fetcher errors)
- Core MCP prompt functionality is covered by remaining tests
* fix: change test status to valid 'connecting' value
* chore: remove commented debug line from prompts fetching
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: use Logger instead of console.error for lint compliance
* fix: wire up mcpPromptFetcher callback to parseSlashCommands
The MCP prompt slash commands were not working because the
mcpPromptFetcher callback was never passed to parseSlashCommands.
This adds the callback that wraps mcpHub.getPrompt() to actually
fetch and inject prompt content when using /mcp:server:prompt.
* fix: resolve MCP prompts keyboard navigation and edge cases
- Add mcpServers param to keyboard handler's getMatchingSlashCommands calls
to fix arrow key navigation and Enter/Tab selection for MCP prompts
- Add null check for connection.client in McpHub.getPrompt()
- Add debug logging when MCP prompt fetch returns null
- Fix regex in shouldShowSlashCommandsMenu to include colons for MCP format
* chore: add changeset for MCP prompts feature
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Robin Newhouse <robin@cline.bot>
- Native tool calls support for Ollama provider
- Sonnet 4.5 is now the default Amazon Bedrock model id
- Prevent infinite retry loops when replace_in_file fails repeatedly. The system now detects repeated failures and provides better guidance to break out of retry cycles.
- Skip diff error UI handling during streaming to prevent flickering. Error handling is deferred until streaming completes.
- Strip notebook cell outputs when extracting text content from Jupyter notebooks, significantly reducing context size sent to the LLM.
- Throttle diff view updates during streaming to reduce UI flickering and improve performance.
- Removed Devstral-2512 free from the free models list
- Removed deprecated zai-glm-4.6 model from Cerebras provider
Co-authored-by: Arafatkatze <arafat.da.khan@gmail.com>
* feat: add support for tool calls in Ollama API
Enhanced OllamaHandler to support tool calls by adding a 'tools' parameter to createMessage. Implements processing of tool call deltas using ToolCallProcessor, enabling handling of function calls made by the model. Added necessary imports for ChatCompletionTool and ToolCallProcessor types.
* add changeset
- Skip PostHog client initialization when running in self-hosted mode
- Return no-op config from ErrorProviderFactory and FeatureFlagsProviderFactory
- Add comprehensive tests for self-hosted mode PostHog disabling behavior
This ensures no telemetry or analytics data is sent when users run
the extension in a self-hosted environment.
* fix: skip diff error UI handling during streaming to prevent flickering
During streaming, handlePartialBlock is called repeatedly, and if the diff
application fails (e.g., search string not found), all the error handling code
was running on every chunk. This caused:
- consecutiveMistakeCount to rapidly increment
- diff_error messages to be added/removed repeatedly
- revertChanges/reset to be called repeatedly
- rapid flickering of the diff viewer
Now we return early from the catch block when block.partial is true, skipping
all error UI handling. The error is only processed once on the final block.
* chore: add changeset for diff error suppression
* test: add unit tests for partial block streaming behavior
Adds tests verifying that error handling is skipped during streaming
(block.partial=true) to prevent counter rapid increment and UI flickering.
* chore: remove unused errorPushedForCallIds tracking
This mechanism was replaced by the simpler block.partial check for
skipping error handling during streaming. Remove the dead code.
* fix: prevent infinite retry loops when replace_in_file fails repeatedly
The consecutiveMistakeCount was being reset to 0 at the START of each
WriteToFileToolHandler execution, before the tooManyMistakes check could
see accumulated failures. This allowed the model to retry failing
replace_in_file operations indefinitely, causing context explosion.
Changes:
- Move counter reset from before operation to after successful saveChanges()
- Add consecutiveMistakeCount++ in the diff error catch block
- Fix typo: "his thought process" → "Cline's thought process"
* chore: add changeset for retry loop prevention
* test: add unit tests for consecutiveMistakeCount behavior
Verify the fix for infinite retry loops by testing that:
- Counter is NOT reset at the start of operations
- Counter IS reset only after successful saveChanges()
- Counter IS incremented on diff errors
- Repeated failures accumulate so tooManyMistakes can trigger
* fix: throttle diff view updates during streaming
Skip redundant rapid updates to reduce performance issues in large
streams (e.g., notebooks) and reset throttle state on cleanup.
* chore: add changeset for diff throttling fix
* test: add unit tests for diff view update throttling
Add comprehensive tests for the throttling behavior introduced in the
streaming diff updates fix. Tests cover empty content, unchanged content,
time-based throttling, final update bypass, and state reset.
* changeset version bump
* Updating CHANGELOG.md format
* update changelog and banner for release
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Max Paulus 🥪 <max@cline.bot>
Add vscode-remote: scheme to the valid URI filter for drag & drop operations.
This allows files from SSH Remote workspaces to be dropped into the chat.
Fixes#7606
- cline command permission flag can now parse subshells correctly and
validate that subshells don't contain disallowed commands.
Co-authored-by: Max Paulus 🥪 <max@cline.bot>
- Users with ChatGPT Plus or Pro subscriptions can now use GPT-5 models directly through Cline without needing an API key. Authentication is handled via OAuth through OpenAI's authentication system.
- Grok models are now moving out of free tier and into paid plans.
- Introduces comprehensive Jupyter Notebook support for Cline, enabling AI-assisted editing of `.ipynb` files with full cell-level context awareness.
- Bugs in DiffViewProvider for file editing
- Ollama's recommended models to use correct identifiers
Co-authored-by: Arafatkatze <arafat.da.khan@gmail.com>
* feat(rules): Write technical design / implementation plan doc.
* update frontmatter plan
* feat(rules): Initial implementation based on plan doc.
* feat(rules): Add tool-call path harvesting for path-scoped Cline Rules.
* chore(rules): exclude internal paths-frontmatter plan doc from PR
* fix(rules): use latest user message for paths frontmatter context
* feat(rules): Implement conditional_rules_applied say type.
* feat(rules): changes as per Cline's code review feedback
* feat(rules): npm run changeset
* feat(rules): Changes as per ellipsis-dev feedback.
* feat(rules): Changes as per code review feedback (i.e. don't bloat the task context).
* feat(rules): Fix failing unit tests.