* Remove pricing/enterprise and Roo Code for pages
* Remove cloud team and router pages
* Refine homepage hero and CTA sections
* nav
* more footer
* Fix knip by removing orphaned web files
feat(bedrock): add Cohere Embed v4 model and improve credential handling
- Add cohere.embed-v4:0 (1536-dim) to Bedrock embedding model profiles
- Add v4-specific request format (embedding_types: ["float"]) and response
parsing (embeddings.float[0]) in BedrockEmbedder
- Replace fromEnv() with fromNodeProviderChain() for default credential
chain when no AWS profile is specified, supporting SSO, IMDS, ECS, and
other credential sources with built-in memoization
- Add unit tests for Cohere v4 request/response handling, credential
provider selection, and v3 regression coverage
Fixes#11823
feat(cli): add create-with-session-id support
rename public task id flag to --create-with-session-id
validate session ids as UUIDs for create/resume and stdin start.taskId
add integration coverage for create+resume loading correct session
* Allow selecting a specific shell
Add --terminal-shell CLI flag to specify which shell ExecaTerminalProcess
uses for inline command execution. The shell path is validated at the CLI
layer and passed through the standard settings mechanism (BaseTerminal
static getter/setter), matching how all other CLI terminal settings flow
through the system.
* test(cli): make shell path access test cross-platform
In CLI runtime, stdin harnesses expect command lifetime to be governed
solely by commandExecutionTimeout (user setting), not model-provided
background timeouts. Extract resolveAgentTimeoutMs() and return 0 when
ROO_CLI_RUNTIME=1.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
feat(cli): support images in stdin stream start and message commands
Add optional `images` field (array of base64 data URIs) to the `start` and
`message` CLI stdin stream commands, allowing callers to attach images to
prompts. The images are validated, forwarded through the extension host, and
included in queued messages.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Propagate the command exit code through the JSON event emitter so CLI
consumers can distinguish between successful and failed command
executions without parsing output text.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
fix: forward task configuration through stdin-prompt-stream protocol
The stdin-prompt-stream `start` command only accepted `prompt` — any
`configuration` passed via the cloud worker's StartNewTask was silently
dropped. This meant custom modes (e.g. `ask-artifacts`), disabled tools,
and other task-level settings never reached the extension when running
via the CLI harness.
Changes:
- Add optional `configuration` field to the `start` stdin command
- Parse and forward it in `runStdinStreamMode`
- Thread it through `ExtensionHost.runTask` → `newTask` webview message
→ `ClineProvider.createTask` (which already calls `setValues`)
- Add `taskConfiguration` field to `WebviewMessage` type
Backward-compatible: older CLIs ignore the extra field; older workers
that don't send `configuration` trigger no change in behavior.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: cte <cestreich@gmail.com>
* fix(cli): streaming deltas, task ID propagation, cancel recovery, and misc fixes
- Stream tool_use ask messages (command, tool, mcp) as structured deltas
instead of full snapshots in json-event-emitter
- Generate task ID upfront and propagate through runTask/createTask so
currentTaskId is available in extension state immediately
- Wait for resumable state after cancel before processing follow-up
messages to prevent race conditions in stdin-stream
- Add ROO_CODE_DISABLE_TELEMETRY=1 env var to disable cloud telemetry
- Provide valid empty JSON Schema for custom tools without parameters
to fix strict-mode API validation
- Skip paths outside cwd in RooProtectedController to avoid RangeError
- Silently handle abort during exponential backoff retry countdown
- Enable customTools experiment in extension host
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: add start() to TaskStub in single-open-invariant test
The ClineProvider.createTask change to call task.start() after
addClineToStack requires the test's TaskStub mock to have this method.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
When the CLI is configured with the Roo provider, proactively fetch
and warm the model list during activation so that model information
is available before the first prompt is sent. The warmup has a 10s
timeout and failures are logged only in debug mode so they never
block normal operation.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* changeset version bump
* Revise CHANGELOG for recent version updates
Updated changelog for versions 3.50.4 to 3.48.0, including new features, fixes, and improvements.
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* feat: add MiniMax M2.5 model and set as default
* fix: update MiniMax M2.5 contextWindow to 204_800
* Delete .changeset/add-minimax-m25.md
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* feat: restore Unbound as a provider
* Adds translations
* fix: add unbound to ClineProvider test expectations
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Pass --template="" to git init and strip GIT_TEMPLATE_DIR from the
environment so system/user git hooks and other template files never
get copied into the shadow repository used for checkpoints.
Co-authored-by: Roo Code <roomote@roocode.com>
* fix(bedrock): enable prompt caching for custom ARN and default to ON
- Set supportsPromptCache to true for custom-arn model info in useSelectedModel.ts
- Change awsUsePromptCache default from false to true using nullish coalescing
- Add tests for custom-arn prompt caching support
Closes#10846
* fix(bedrock): align backend awsUsePromptCache default with UI (?? true)
The backend treated undefined awsUsePromptCache as falsy (OFF) while the
UI checkbox defaulted to true via nullish coalescing. This caused the UI
to show prompt caching as ON but the backend to keep it OFF for new users.
Apply the same ?? true default in the backend so both sides agree.
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: add visual feedback to copy button in task actions
The copy button now shows a checkmark for 2 seconds after copying to provide visual feedback.
Fixes#11401
* fix: change Check icon import name in TaskActions and update test
- Fix Check icon import name from Check to CheckIcon for consistency in TaskActions.tsx
- Add test to verify check icon is shown when showCopyFeedback is true
- Mock useCopyToClipboard hook in TaskActions.spec.tsx to test copy button functionality
This change resolves the import inconsistency and adds a test to ensure the copy button correctly shows a check icon after successful copy.
* feat: show aggregated +/− line counts in FileChangesPanel header
* feat(FileChangesPanel): show merged diff relative to final file state
* fix(webview): restrict readFileContent to paths inside the workspace
* fix: add workspace-boundary validation to readFileContent to prevent path traversal
* fix(tests): mock isPathOutsideWorkspace in readFileContent spec
* fix(tests): mock isPathOutsideWorkspace in readFileContent spec
* fix: use path.resolve/path.sep in readFileContent test mock for cross-platform compatibility
The isPathOutsideWorkspace mock used hardcoded Unix-style path comparisons
(/mock/workspace with forward slashes), which fails on Windows where
path.resolve() produces paths with drive letters (C:\mock\workspace\...).
Replace manual string normalization with path.resolve() and path.sep so the
mock behaves correctly on both Windows and Unix.
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: disable apply_diff and enable edit tool for Vertex and Gemini providers
* feat: disable apply_diff and enable edit tool for Anthropic provider
* feat: disable apply_diff and enable edit tool for Anthropic Vertex provider
* fix: remove out-of-scope Anthropic/Anthropic-Vertex changes
The PR scope is Gemini and Vertex providers only. Reverting the
Anthropic and Anthropic-Vertex tool preference changes that were
not part of the stated scope.
---------
Co-authored-by: Roo Code <roomote@roocode.com>
feat: add `timeout` parameter to `execute_command` tool
Allow the agent to specify a per-command timeout in seconds. When
exceeded, the command continues running in the background (like clicking
"Run in Background") and the output collected so far is returned,
rather than aborting. This is useful for long-running processes like dev
servers or file watchers that may never exit on their own.
The agent timeout runs independently of the user-configured abort
timeout — the user timeout remains active as a safety net even after
the agent moves on.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: remove Roomote Control from extension
Remove all Roomote Control (remote control) functionality:
- Remove BridgeOrchestrator and entire bridge directory from @roo-code/cloud
- Remove remoteControlEnabled, featureRoomoteControlEnabled from extension state
- Remove extensionBridgeEnabled from CloudUserInfo and user settings
- Remove roomoteControlEnabled from organization/user feature schemas
- Remove enableBridge from Task and ClineProvider
- Remove remote control toggle from CloudView UI
- Remove remoteControlEnabled message handler
- Remove extension bridge disconnect on logout/deactivate
- Update CloudTaskButton to show for all logged-in users
- Remove remote control translation strings from all locales
- Update all related tests
CLO-765
* fix: remove dead getOrganizationMetadata and unused socket.io-client dep
* Readmes
* Readmes
* Types
* fix: remove leftover Roomote Control references from locale READMEs and stale BridgeOrchestrator mock
* Removes cloudtaskbutton
* fix: remove orphaned qrcode packages and dead openInCloud translation keys
* pnpmlock
* Revert these
* Revert these
* Revert these
* Remove socket.io
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: cte <cestreich@gmail.com>
Changed the settings search results to be the same width as the search input. This ensures the results dropdown does not overflow outside of the parent panel.
* chore: remove integration test files
* chore: remove integration test job from CI workflow
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
* feat(cli): add NDJSON stdin protocol, list subcommands, and modularize run.ts
Overhaul the stdin prompt stream from raw text lines to a structured NDJSON
command protocol (start/message/cancel/ping/shutdown) with requestId
correlation, ack/done/error lifecycle events, and queue telemetry. Add list
subcommands (commands, modes, models) for programmatic discovery. Extract
stdin stream logic from run.ts into stdin-stream.ts and add shared isRecord
guard utility. Includes unit tests for all new modules.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(core): fix Task.ts bug affecting CLI operation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add per-task file-based history store for cross-instance safety
Implement TaskHistoryStore service that stores each task's HistoryItem
as an individual JSON file in its existing task directory. This prevents
silent data loss when multiple VS Code windows write to the shared
globalState taskHistory array concurrently.
Key changes:
- New TaskHistoryStore class with per-task file writes via safeWriteJson
- Index file (_index.json) for fast startup reads
- Reconciliation logic to detect and fix drift between instances
- fs.watch for cross-instance reactivity
- Debounced index writes (2s window) for streaming performance
- Migration from globalState on first startup
- Write-through to globalState during transition period
- Fallback lookups from globalState for backward compatibility
Files created:
- src/core/task-persistence/TaskHistoryStore.ts
- src/core/task-persistence/__tests__/TaskHistoryStore.spec.ts
- src/core/task-persistence/__tests__/TaskHistoryStore.crossInstance.spec.ts
Files modified:
- src/shared/globalFileNames.ts (added historyItem, historyIndex)
- src/core/task-persistence/index.ts (export TaskHistoryStore)
- src/core/webview/ClineProvider.ts (integrate store, remove write lock)
- Test files updated for new store-based approach
* fix: address review feedback - reconcile lock, init promise, write-through serialization
- reconcile() now runs through withLock() to prevent interleaving with
upsert/delete at async boundaries
- Added initialized promise so callers can await store readiness before
reading (getStateToPostToWebview now awaits it)
- Write-through to globalState now happens inside the store lock via
onWrite callback, preventing concurrent call races on the transition
period fallback
- Removed separate updateGlobalState("taskHistory") calls from
ClineProvider since the onWrite callback handles it serialized
* fix: add TaskHistoryStore to task-persistence mock in Task.persistence.spec.ts
The test mocks task-persistence with an explicit factory that was
missing the new TaskHistoryStore export, causing all 9 tests to fail
with "No TaskHistoryStore export is defined on the mock".
* perf: debounce globalState write-through to avoid full-array writes on every mutation
Instead of writing the entire HistoryItem[] array to globalState on
every upsert/delete (expensive with 5000+ tasks), the write-through
is now debounced with a 5-second window. Per-task file writes remain
immediate (~200 bytes each). The globalState is flushed on dispose
to ensure no data loss on shutdown.
This makes the hot path during streaming (token count updates) write
only the per-task file, not the full array.
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* fix(chat): stabilize rehydration scroll-to-bottom convergence
* fix(chat): preserve user escape hatch during initial settle
* refactor(chat): reduce scroll fix PR scope and remove debug plumbing
* fix(chat): redesign rehydration scroll lifecycle
* refactor(chat): extract scroll lifecycle into useScrollLifecycle hook
- Extract ~400 lines of scroll lifecycle logic from ChatView.tsx into
a dedicated useScrollLifecycle hook, reducing ChatView scroll-related
refs from ~17 to 0 and making the logic testable in isolation.
- Reduce INITIAL_LOAD_SETTLE_HARD_CAP_MS from 10s to 5s. If rehydration
takes longer, there is likely a rendering performance issue worth
investigating separately.
- Document the scrollToIndex reversal: PR #6780 removed scrollToIndex
due to jitter from stale numeric indices. The "LAST" constant used
here resolves at call time, avoiding that issue.
- All 6 existing scroll regression tests pass unchanged.
* fix(chat): harden scroll lifecycle pointer intent and settle phase fallback
* test(chat): stabilize ChatView scroll debug repro flake
* refactor(chat): simplify hydration scroll lifecycle
* fix(chat): start existing task at latest message bottom
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: add per-workspace indexing opt-in and stop/cancel control
- Add codeIndexWorkspaceEnabled flag in workspaceState (default: false)
- Thread AbortController/AbortSignal through orchestrator → scanner
- Add Stop Indexing button and Stopping state to UI
- Fix handleSettingsChange() to abort active scan when disabling toggle
- Add translations for all 18 locales
* fix: correct abort handling in indexing scanner and orchestrator
- Re-throw AbortError in scanner's file processing catch block to prevent
abort signals from being silently swallowed as file errors
- Reorder stopWatcher() before setSystemState() in orchestrator abort
catch path to ensure watcher cleanup before state transition
- Update scanner test to assert AbortError propagation on mid-scan abort
* fix: optimize workspace check ordering, translate new i18n keys, fix abort handling
- Move workspace-enabled check before _recreateServices() in initialize()
to avoid creating Qdrant/embedder connections for disabled workspaces
- Translate new i18n keys (indexingStopped, indexingStoppedPartial, stopping,
stopIndexingButton, stoppingButton, workspaceToggleLabel,
workspaceDisabledMessage) in all 17 non-English locales
- Re-throw AbortError in scanner catch block to prevent silent swallowing
- Reorder stopWatcher() before setSystemState() in orchestrator abort path
- Update scanner test to assert AbortError propagation on mid-scan abort
- Fix recoverFromError test for workspace-enabled check ordering
* fix: per-folder enablement key, abort-safe dispose and back-pressure, translate i18n
Addresses 0xMink review feedback:
- Store workspace enablement keyed by folder path to support multi-root
workspaces (codeIndexWorkspaceEnabled:<path> instead of single boolean)
- Add test proving folder A enabled does not enable folder B
- dispose() now calls stopIndexing() to abort orphaned scans on folder removal
- Scanner back-pressure loop checks abort signal to avoid spin-waiting
- Move workspace-enabled check before _recreateServices() in initialize()
- Translate new i18n keys in all 17 non-English locales
- Fix abort handling in orchestrator and scanner catch blocks
* fix: flush debounced cache writes on abort to preserve indexing progress
* feat: add global auto-enable default for backward-compatible workspace indexing
* fix: stop/start indexer when auto-enable default changes effective state
* fix: URI-keyed enablement, throw AbortError in back-pressure, stopWatcher on early-return
* fix: iterate all managers when auto-enable default changes in multi-root workspaces
---------
Co-authored-by: James Mtendamema <jmtendamema@geologicai.com>
* Add file changes panel per conversation
Closes#11493
* Add unit tests for file changes and consolidate specs in src/__tests__
Closes#11493
* fix(chat): only show approved file diffs in conversation panel
Replace the incorrect Sonnet 4.6 Bedrock ID with the AWS-supported
model ID in the model registry and Bedrock capability lists.
Remove references to the deprecated dated ID and update Bedrock
tests to validate the corrected Sonnet 4.6 identifier.
* fix: await MCP server initialization before returning McpHub instance
MCP tools were unavailable on the first task turn when started via IPC
because McpHub's constructor fired initializeGlobalMcpServers() and
initializeProjectMcpServers() without awaiting them. getInstance()
returned a hub with servers still in "connecting" state.
Store the combined initialization promise and expose waitUntilReady(),
then await it in McpServerManager.getInstance() so the hub is only
returned after all servers have connected or timed out.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: assign McpHub instance only after waitUntilReady() resolves
Closes race condition where concurrent callers of getInstance() could
receive a hub that has not finished initialization. The hub is now
created in a local variable and only assigned to this.instance after
waitUntilReady() completes.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Roo Code <roomote@roocode.com>
* changeset version bump
* fix: update changelog-config to support multi-line entries and restore full v3.48.0 CHANGELOG
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Update 1M context locale copy for Claude 4 models
Refresh 1M context beta descriptions so locale text matches
current model support in Anthropic, Bedrock, and Vertex.
Use a shorter model scope string to keep UI copy readable and
easier to maintain while staying accurate.
* Add Anthropic Claude Sonnet 4.6 support across providers
Add model definitions and capability flags for Anthropic, Bedrock,
Vertex, OpenRouter, and Vercel AI Gateway.
Update Anthropic handler and UI model selection logic to support Claude
Sonnet 4.6 1M context behavior and tier pricing.
Add focused tests for provider handlers, fetchers, and selected-model
hooks.
Keep Bedrock UI tier pricing parity as-is because this is a
pre-existing issue for Opus 4.6 and will be handled separately.
Reference:
- https://www.anthropic.com/news/claude-sonnet-4-6
- https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison
* Delete .changeset/soft-carpets-hunt.md
---------
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
* feat(web): add blog section with 4 initial posts
Implements MKT-66 through MKT-74:
Content Layer (MKT-67):
- Markdown files in src/content/blog with Zod-validated frontmatter
- Pacific Time scheduling evaluated at request-time (no deploy needed)
- gray-matter for parsing, react-markdown + remark-gfm for rendering
Blog Pages (MKT-68, MKT-69):
- Index page at /blog with dynamic SSR
- Post page at /blog/[slug] with dynamic SSR
- Breadcrumb navigation and prev/next post navigation
SEO (MKT-70):
- Full OpenGraph and Twitter card metadata
- Schema.org JSON-LD (Article, BreadcrumbList, CollectionPage)
- Canonical URLs pointing to roocode.com/blog
Analytics (MKT-74):
- PostHog blog_post_viewed and blog_index_viewed events
- Referrer tracking for attribution
Navigation (MKT-72):
- Updated nav-bar and footer to link to internal /blog
- Blog link in Resources dropdown
Sitemap (MKT-71):
- Dynamic blog paths with PT scheduling check
Initial Posts:
- PRDs Are Becoming Artifacts of the Past (Jan 12)
- Code Review Got Faster, Not Easier (Jan 19)
- Vibe Coders Build and Rebuild (Jan 26)
- Async Agents Change the Speed vs Quality Calculus (Feb 2)
* fix(test): update HistoryPreview tests to match refactored component
The HistoryPreview component was refactored to use useGroupedTasks and
TaskGroupItem instead of rendering TaskItem directly. This updates the
test file to properly mock the new dependencies:
- Mock useGroupedTasks hook to provide grouped task data
- Mock TaskGroupItem instead of TaskItem
- Update assertions to test for task groups instead of individual tasks
* feat(blog): add Vercel-inspired patterns and Tone of Voice alignment
- Add reading time display to blog posts
- Create BlogPostCTA component with 4 variants (default, extension, cloud, enterprise)
- Add zebra striping to tables in blog posts
- Add CTA to blog landing and paginated pages
- Remove 'Posted' prefix from dates
- Update blog description: 'How teams use agents to iterate, review, and ship PRs with proof'
- Add BlogPostList and BlogPagination components
- Add 100+ new blog posts from content pipeline
* feat(blog): add source badges for podcast content (Office Hours, After Hours, Roo Cast)
- Add BlogSource type to types.ts
- Export BlogSource from blog index
- Add SourceBadge component to BlogPostList with colored badges
- Each podcast has distinct color: blue (Office Hours), purple (After Hours), emerald (Roo Cast)
* feat(blog): add source field to all blog posts (Roo Cast, Office Hours, After Hours)
- Add add-blog-sources.ts script to build title→source mapping
- Updated 122 blog posts with correct podcast sources
- Sources: Roo Cast (52), Office Hours (62), After Hours (8)
* feat(blog): add source badges with consistent styling
- Add source field to Zod validation schema
- Source badges use same styling as tag badges (rounded, greyscale)
- Badges display on /blog landing page for Office Hours, After Hours, Roo Cast
* feat(blog): improve schema.org structured data for SEO
- Change @type from Article to BlogPosting (more specific)
- Add image property using OG image URL
- Add wordCount for AEO optimization
* feat(blog): timestamped YouTube quotes + attribution polish
* chore(blog): update 'Series A team' to 'Series A - C team' and fix 'Tovin' to 'Tovan'
- Changed 22 instances of 'Series A team' to 'Series A - C team' across 20 blog posts
- Changed 12 instances of 'Tovin' to 'Tovan' across 4 blog posts
This broadens the messaging to better represent teams that Roo Code serves (Series A through C).
* ci: retry CI after timeout
* blog: featured posts + copy edits
* blog: remove draft posts from web content
* fix(blog): loop HTML tag stripping to prevent incomplete sanitization
The single-pass .replace(/<[^>]+>/g, "") in calculateReadingTime() was
flagged by CodeQL as vulnerable to incomplete multi-character sanitization.
Input like "<scr<script>ipt>" would still contain "<script" after one pass.
Added a stripHtmlTags() helper that loops the replacement until stable,
plus a final pass to remove any remaining angle brackets.
* fix(blog): replace iterative HTML tag stripping with single-pass angle bracket removal
The CodeQL scanner flagged the iterative stripHtmlTags function for
incomplete multi-character sanitization. The regex /<[^>]+>/g only
matches complete tags, so partial fragments like <script (without a
closing >) could survive intermediate loop iterations.
Since this function is only used for word counting in
calculateReadingTime, replace the multi-step approach with a simple
single-pass removal of all < and > characters. This eliminates the
incomplete sanitization pattern entirely.
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Michael Preuss <michael@roocode.com>
Added strict validation for the `follow_up` parameter to
check for presence and type (Array). Added test cases
covering missing, null, and invalid type scenarios.
Refactored parameter error handling into a helper method to reduce
duplication.
* Add stdin stream mode for the cli
* fix: clear jsonEmitter state between tasks in stdin-prompt-stream mode
* fix: use consistent user role for prompt echo partials in stream-json mode
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* fix: correct Bedrock model ID for Claude Opus 4.6 (#11232)
Remove the :0 suffix from the Claude Opus 4.6 model ID to match
the correct AWS Bedrock model identifier.
The model ID was "anthropic.claude-opus-4-6-v1:0" but should be
"anthropic.claude-opus-4-6-v1" per AWS Bedrock documentation.
Fixes#11231
Co-authored-by: Roo Code <roomote@roocode.com>
* fix: guard against empty-string baseURL in provider constructors (#11233)
When the 'custom base URL' checkbox is unchecked in the UI, the setting
is set to '' (empty string). Providers that passed this directly to their
SDK constructors caused 'Failed to parse URL' errors because the SDK
treated '' as a valid but broken base URL override.
- gemini.ts: use || undefined (was passing raw option)
- openai-native.ts: use || undefined (was passing raw option)
- openai.ts: change ?? to || for fallback default
- deepseek.ts: change ?? to || for fallback default
- moonshot.ts: change ?? to || for fallback default
Adds test coverage for Gemini and OpenAI Native constructors verifying
empty-string baseURL is coerced to undefined.
* fix: make defaultTemperature required in getModelParams to prevent silent temperature overrides (#11218)
* fix: DeepSeek temperature defaulting to 0 instead of 0.3
Pass defaultTemperature: DEEP_SEEK_DEFAULT_TEMPERATURE to getModelParams() in
DeepSeekHandler.getModel() to ensure the correct default temperature (0.3)
is used when no user configuration is provided.
Closes#11194
* refactor: make defaultTemperature required in getModelParams
Make the defaultTemperature parameter required in getModelParams() instead
of defaulting to 0. This prevents providers with their own non-zero default
temperature (like DeepSeek's 0.3) from being silently overridden by the
implicit 0 default.
Every provider now explicitly declares its temperature default, making the
temperature resolution chain clear:
user setting → model default → provider default
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* feat: batch consecutive tool calls in chat UI with shared utility (#11245)
* feat: group consecutive list_files tool calls into single UI block
Consolidate consecutive listFilesTopLevel/listFilesRecursive ask messages
into a single 'Roo wants to view multiple directories' block, matching the
existing read_file batching pattern.
* chore: add missing translation keys for all locales
* refactor: consolidate duplicate listFiles batch-handling blocks in ChatRow
Merge the separate listFilesTopLevel and listFilesRecursive case blocks
into a single combined case with shared batch-detection logic, selecting
the icon and translation key based on the tool type. This removes the
duplicated isBatchDirRequest check and BatchListFilesPermission render.
* feat: batch consecutive file-edit tool calls into single UI block
Add edit-file batching in ChatView groupedMessages that consolidates
consecutive editedExistingFile, appliedDiff, newFileCreated,
insertContent, and searchAndReplace asks into a single BatchDiffApproval
block. Move batchDiffs detection in ChatRow above the switch statement
so it applies to any file-edit tool type.
* refactor: extract batchConsecutive utility, fix batch UI issues
- Extract generic batchConsecutive() utility from 3 identical while-loops
- Fix React key collisions in BatchListFilesPermission, BatchFilePermission, BatchDiffApproval
- Normalize language prop to "shellsession" (was "shell-session" for top-level)
- Remove unused _batchedMessages property from synthetic messages
- Remove dead didViewMultipleDirectories i18n key from all 18 locale files
- Add batch button text for listFilesTopLevel/listFilesRecursive
- Add batchConsecutive utility tests (6 cases)
* fix: audit improvements for batch tool-call UI
- Make batchConsecutive() generic instead of ClineMessage-specific
- Add batch-aware button text for edit-file batches ("Save All"/"Deny All")
- Add dedicated list-batch/edit-batch i18n keys (stop reusing read-batch)
- Add JSON.parse defense-in-depth in all three synthesizers
- Fix mixed list_files batch icon to default to FolderTree
- Add 6 missing test cases (all-match, immutability, spy, single-dir)
* chore: minor type cleanup (out-of-scope housekeeping)
- Trim unused recursive/isOutsideWorkspace from DirPermissionItem interface
- Remove 4 pre-existing `as any` casts in ChatView.tsx:
- window cast → precise inline type
- checkpoint bracket access → removed unnecessary casts
- condensing message → `as ClineMessage`
- debounce cancel → `.clear()` (correct API)
- Update BatchListFilesPermission test data to match trimmed interface
* i18n: add list-batch and edit-batch translations for all locales
* feat: add IPC query handlers for commands, modes, and models (#11279)
Add GetCommands, GetModes, and GetModels to the IPC protocol so external
clients can fetch slash commands, available modes, and Roo provider models
without going through the internal webview message channel.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add lock toggle to pin API config across all modes in workspace (#11295)
* feat: add lock toggle to pin API config across all modes in workspace
Add a lock/unlock toggle inside the API config selector popover (next to
the settings gear) that, when enabled, applies the selected API
configuration to all modes in the current workspace.
- Add lockApiConfigAcrossModes to ExtensionState and WebviewMessage types
- Store setting in workspaceState (per-workspace, not global)
- When locked, activateProviderProfile sets config for all modes
- Lock icon in ApiConfigSelector popover bottom bar next to gear
- Full i18n: English + 17 locale translations (all mention workspace scope)
- 9 new tests: 2 ClineProvider, 2 handler, 5 UI (77 total pass)
* refactor: replace write-fan-out with read-time override for lock API config
The original lock implementation used setModeConfig() fan-out to write the
locked config to ALL modes globally. Since the lock flag lives in workspace-
scoped workspaceState but modeApiConfigs are in global secrets, this caused
cross-workspace data destruction.
Replaced with read-time guards:
- handleModeSwitch: early return when lock is on (skip per-mode config load)
- createTaskWithHistoryItem: skip mode-based config restoration under lock
- activateProviderProfile: removed fan-out block
- lockApiConfigAcrossModes handler: simplified to flag + state post only
- Fixed pre-existing workspaceState mock gap in ClineProvider.spec.ts and
ClineProvider.sticky-profile.spec.ts
* fix: validate Gemini thinkingLevel against model capabilities and handle empty streams (#11303)
* fix: validate Gemini thinkingLevel against model capabilities and handle empty streams
getGeminiReasoning() now validates the selected effort against the model's
supportsReasoningEffort array before sending it as thinkingLevel. When a
stale settings value (e.g. 'medium' from a different model) is not in the
supported set, it falls back to the model's default reasoningEffort.
GeminiHandler.createMessage() now tracks whether any text content was
yielded during streaming and handles NoOutputGeneratedError gracefully
instead of surfacing the cryptic 'No output generated' error.
* fix: guard thinkingLevel fallback against 'none' effort and add i18n TODO
The array validation fallback in getGeminiReasoning() now only triggers
when the selected effort IS a valid Gemini thinking level but not in
the model's supported set. Values like 'none' (explicit no-reasoning
signal) are no longer overridden by the model default.
Also adds a TODO for moving the empty-stream message to i18n.
* fix: track tool_call_start in hasContent to avoid false empty-stream warning
Tool-only responses (no text) are valid content. Without this,
agentic tool-call responses would incorrectly trigger the empty
response warning message.
* chore(cli): prepare release v0.0.53 (#11425)
* feat: add GLM-5 model support to Z.ai provider (#11440)
* chore: regenerate pnpm-lock.yaml
* fix: resolve type errors and remove AI SDK test contamination
* docs: update progress.txt with rebuilt Batch 2 status
---------
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* fix: add image content support to MCP tool responses (#10874)
Co-authored-by: Roo Code <roomote@roocode.com>
* fix: transform tool blocks to text before condensing (EXT-624) (#10975)
* refactor(read_file): Codex-inspired read_file refactor EXT-617 (#10981)
* feat: allow import settings in initial welcome screen (#10994)
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* fix(code-index): remove deprecated text-embedding-004 and migrate to gemini-embedding-001 (#11038)
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
* chore: treat extension .env as optional (#11116)
* fix: sanitize tool_use_id in tool_result blocks to match API history (#11131)
Tool IDs from providers like Gemini/OpenRouter contain special characters
(e.g., 'functions.read_file:0') that are sanitized when saving tool_use
blocks to API history. However, tool_result blocks were using the original
unsanitized IDs, causing ToolResultIdMismatchError.
This fix ensures tool_result blocks use sanitizeToolUseId() to match the
sanitized tool_use IDs in conversation history.
Fixes EXT-711
* fix: queue messages during command execution instead of losing them (#11140)
* IPC fixes for task cancellation and queued messages (#11162)
* feat: add support for AGENTS.local.md personal override files (#11183)
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
* fix(cli): resolve race condition causing provider switch during mode changes (#11205)
When using slash commands with `mode:` frontmatter (e.g., `/cli-release`
with `mode: code`), the CLI would fail with "Could not resolve
authentication method" from the Anthropic SDK, even when using a
non-Anthropic provider like `--provider roo`.
Root cause: In `markWebviewReady()`, the `webviewDidLaunch` message was
sent before `updateSettings`, creating a race condition. The
`webviewDidLaunch` handler's "first-time init" sync would read
`getState()` before CLI-provided settings were applied to the context
proxy. Since `getState()` defaults `apiProvider` to "anthropic" when
unset, this default was saved to the provider profile. When a slash
command triggered `handleModeSwitch()`, it found this corrupted profile
with `apiProvider: "anthropic"` (but no API key) and activated it,
overwriting the CLI's working roo provider configuration.
Fix:
1. Reorder `markWebviewReady()` to send `updateSettings` before
`webviewDidLaunch`, ensuring the context proxy has CLI-provided
values when the initialization handler runs.
2. Guard the first-time init sync with `checkExistKey(apiConfiguration)`
to prevent saving a profile with only the default "anthropic"
fallback and no actual API keys configured.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* chore: remove dead toolFormat code from getEnvironmentDetails (#11207)
Remove the toolFormat constant and <tool_format> line from environment
details output. Native tool calling is now the only supported protocol,
making this code unnecessary.
Fixes#11206
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: extract translation and merge resolver modes into reusable skills (#11215)
* feat: extract translation and merge resolver modes into reusable skills
- Add roo-translation skill with comprehensive i18n guidelines
- Add roo-conflict-resolution skill for intelligent merge conflict resolution
- Add /roo-translate slash command as shortcut for translation skill
- Add /roo-resolve-conflicts slash command as shortcut for conflict resolution skill
The existing translate and merge-resolver modes are preserved. These new skills
and commands provide reusable access to the same functionality.
Closes CLO-722
* feat: add guidances directory with translator guidance file
- Add .roo/guidances/roo-translator.md for brand voice, tone, and word choice guidance
- Update roo-translation skill to reference the guidance file
The guidance file serves as a placeholder for translation style guidelines
that will be interpolated at runtime.
* fix: rename guidances directory to guidance (singular)
* fix: remove language-specific section from translator guidance
The guidance file should focus on brand voice, tone, and word choice only.
* fix: remove language-specific guidelines section from skill file
* Update .roo/skills/roo-translation/SKILL.md
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
* feat: add Claude Opus 4.6 support across all providers (#11224)
* feat: add Claude Opus 4.6 support across all providers
Add Claude Opus 4.6 (claude-opus-4-6) model definitions and 1M context
support across Anthropic, Bedrock, Vertex AI, OpenRouter, and Vercel AI
Gateway providers.
- Anthropic: 128K max output, /5 pricing, 1M context tiers
- Bedrock: anthropic.claude-opus-4-6-v1:0 with 1M context + global inference
- Vertex: claude-opus-4-6 with 1M context tiers
- OpenRouter: prompt caching + reasoning budget sets
- Vercel AI Gateway: Opus 4.5 and 4.6 added to capability sets
- UI: 1M context checkbox for Opus 4.6 on all providers
- i18n: Updated 1M context descriptions across 18 locales
Also adds Opus 4.5 to Vercel AI Gateway (previously missing) and
OpenRouter maxTokens overrides for Opus 4.5/4.6.
Closes#11223
* fix: apply tier pricing when 1M context is enabled on Bedrock
When awsBedrock1MContext is enabled for tiered models like Opus 4.6,
also apply the 1M tier pricing (inputPrice, outputPrice, cache prices)
instead of only updating contextWindow. This ensures cost calculations
and UI display use the correct >200K rates.
* feat: add gpt-5.3-codex model to OpenAI Codex provider (#11225)
feat: add gpt-5.3-codex model and make it default for OpenAI Codex provider
Co-authored-by: Roo Code <roomote@roocode.com>
* fix: prevent parent task state loss during orchestrator delegation (#11281)
* fix: make removeClineFromStack() delegation-aware to prevent orphaned parent tasks (#11302)
* fix: make removeClineFromStack() delegation-aware to prevent orphaned parent tasks
When a delegated child task is removed via removeClineFromStack() (e.g., Clear
Task, navigate to history, start new task), the parent task was left orphaned
in "delegated" status with a stale awaitingChildId. This made the parent
unresumable without manual history repair.
This fix captures parentTaskId and childTaskId before abort/dispose, then
repairs the parent metadata (status -> active, clear awaitingChildId) when
the popped task is a delegated child and awaitingChildId matches.
Parent lookup + updateTaskHistory are wrapped in try/catch so failures are
non-fatal (logged but do not block the pop).
Closes#11301
* fix: add skipDelegationRepair opt-out to removeClineFromStack() for nested delegation
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* fix(reliability): prevent webview postMessage crashes and make dispose idempotent (#11313)
* fix(reliability): prevent webview postMessage crashes and make dispose idempotent
Closes: #11311
1. postMessageToWebview() now catches rejections from
webview.postMessage() so that messages sent after the webview is
disposed do not surface as unhandled promise rejections.
2. dispose() is guarded by a _disposed flag so that repeated calls
(e.g. during rapid extension deactivation) are no-ops.
3. CloudService mock in ClineProvider.spec.ts updated to include
off() — a pre-existing gap exposed by the new dispose test.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: add early _disposed check in postMessageToWebview
Skip the postMessage call entirely when the provider is already disposed,
avoiding unnecessary try/catch execution. Added test coverage for this path.
* chore: trigger CI
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* fix: resolve race condition in new_task delegation that loses parent task history (#11331)
* fix: resolve race condition in new_task delegation that loses parent task history
When delegateParentAndOpenChild creates a child task via createTask(), the
Task constructor fires startTask() as a fire-and-forget async call. The child
immediately begins its task loop and eventually calls saveClineMessages() →
updateTaskHistory(), which reads globalState, modifies it, and writes back.
Meanwhile, delegateParentAndOpenChild persists the parent's delegation
metadata (status: 'delegated', delegatedToId, awaitingChildId, childIds) via
a separate updateTaskHistory() call AFTER createTask() returns.
These two concurrent read-modify-write operations on globalState race: the
last writer wins, overwriting the other's changes. When the child's write
lands last, the parent's delegation fields are lost, making the parent task
unresumable when the child finishes.
Fix: create the child task with startTask: false, persist the parent's
delegation metadata first, then manually call child.start(). This ensures
the parent metadata is safely in globalState before the child begins writing.
* docs: clarify Task.start() only handles new tasks, not history resume
* fix: serialize taskHistory writes and fix delegation status overwrite race (#11335)
Add a promise-chain mutex (withTaskHistoryLock) to serialize all
read-modify-write operations on taskHistory, preventing concurrent
interleaving from silently dropping entries.
Reorder reopenParentFromDelegation to close the child instance
before marking it completed, so the abort path's stale 'active'
status write no longer overwrites the 'completed' state.
Covered by new tests: RPD-04/05/06, UTH-02/04, and a full mutex
concurrency suite.
* Fix task resumption in the API module (#11369)
* chore: clean up repo-facing mode rules (#11410)
* fix: add maxReadFileLine to ExtensionState type for webview compatibility
---------
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: 0xMink <dennis@dennismink.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* fix: cancel backend auto-approval timeout when auto-approve is toggled off mid-countdown (#11439)
Co-authored-by: Sannidhya <sann@Sannidhyas-MacBook-Pro.local>
* fix: prevent chat history loss during cloud/settings navigation (#11371) (#11372)
Co-authored-by: Sannidhya <sann@Sannidhyas-MacBook-Pro.local>
* fix: preserve pasted images in chatbox during chat activity (#11375)
Co-authored-by: Roo Code <roomote@roocode.com>
* fix: resolve chat scroll anchoring and task-switch scroll race condit… (#11385)
* fix: avoid zsh process-substitution false positives in assignments (#11365)
* fix(editor): make tab close best-effort in DiffViewProvider.open (#11363)
* fix(checkpoints): canonicalize core.worktree comparison to prevent Windows path mismatch failures (#11346)
* fix: prevent double notification sound playback (#11283)
* fix: prevent false unsaved changes prompt with OpenAI Compatible headers (#8230) (#11334)
fix: prevent false unsaved changes prompt with OpenAI Compatible headers
Mark automatic header syncs in ApiOptions and OpenAICompatible as
non-user actions (isUserAction: false) and enhance SettingsView change
detection to skip automatic syncs with semantically equal values.
Root cause: two components (ApiOptions and OpenAICompatible) manage
openAiHeaders state and automatically sync it back on mount/remount.
These syncs were treated as user changes, triggering a false dirty state.
Co-authored-by: Robert McIntyre <robertjmcintyre@users.noreply.github.com>
* fix: remove noisy console.warn logs from NativeToolCallParser (#11264)
Remove two console.warn messages that fire excessively when loading tasks
from history:
- 'Attempting to finalize unknown tool call' in finalizeStreamingToolCall()
- 'Received chunk for unknown tool call' in processStreamingChunk()
The defensive null-return behavior is preserved; only the log output is removed.
* refactor: remove footgun prompting (file-based system prompt override) (#11387)
* refactor: delete orphaned per-provider caching transform files (#11388)
* feat: add disabledTools setting to globally disable native tools (#11277)
* feat: add disabledTools setting to globally disable native tools
Add a disabledTools field to GlobalSettings that allows disabling specific
native tools by name. This enables cloud agents to be configured with
restricted tool access.
Schema:
- Add disabledTools: z.array(toolNamesSchema).optional() to globalSettingsSchema
- Add disabledTools to organizationDefaultSettingsSchema.pick()
- Add disabledTools to ExtensionState Pick type
Prompt generation (tool filtering):
- Add disabledTools to BuildToolsOptions interface
- Pass disabledTools through filterSettings to filterNativeToolsForMode()
- Remove disabled tools from allowedToolNames set in filterNativeToolsForMode()
Execution-time validation (safety net):
- Extract disabledTools from state in presentAssistantMessage
- Convert disabledTools to toolRequirements format for validateToolUse()
Wiring:
- Add disabledTools to ClineProvider getState() and getStateToPostToWebview()
- Pass disabledTools to all buildNativeToolsArrayWithRestrictions() call sites
EXT-778
* fix: check toolRequirements before ALWAYS_AVAILABLE_TOOLS
Moves the toolRequirements check before the ALWAYS_AVAILABLE_TOOLS
early-return in isToolAllowedForMode(). This ensures disabledTools
can block always-available tools (switch_mode, new_task, etc.) at
execution time, making the validation layer consistent with the
filtering layer.
* feat: add support for .agents/skills directory (#11181)
* feat: add support for .agents/skills directory
This change adds support for discovering skills from the .agents/skills
directory, following the Agent Skills convention for sharing skills
across different AI coding tools.
Priority order (later entries override earlier ones):
1. Global ~/.agents/skills (shared across AI coding tools, lowest priority)
2. Project .agents/skills
3. Global ~/.roo/skills (Roo-specific)
4. Project .roo/skills (highest priority)
Changes:
- Add getGlobalAgentsDirectory() and getProjectAgentsDirectoryForCwd()
functions to roo-config
- Update SkillsManager.getSkillsDirectories() to include .agents/skills
- Update SkillsManager.setupFileWatchers() to watch .agents/skills
- Add tests for new functionality
* fix: clarify skill priority comment to match actual behavior
* fix: clarify skill priority comment to explain Map.set replacement mechanism
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* feat(history): render nested subtasks as recursive tree (#11299)
* feat(history): render nested subtasks as recursive tree
* fix(lockfile): resolve missing ai-sdk provider entry
* fix: address review feedback — dedupe countAll, increase SubtaskRow max-h
- HistoryView: replace local countAll with imported countAllSubtasks from types.ts
- SubtaskRow: increase nested children max-h from 500px to 2000px to match TaskGroupItem
* perf(refactor): consolidate getState calls in resolveWebviewView (#11320)
* perf(refactor): consolidate getState calls in resolveWebviewView
Replace three separate this.getState().then() calls with a single
await this.getState() and destructuring. This avoids running the
full getState() method (CloudService calls, ContextProxy reads, etc.)
three times during webview view resolution.
* fix: keep getState consolidation non-blocking to avoid delaying webview render
---------
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* fix: harden command auto-approval against inline JS false positives (#11382)
* feat: rename search_and_replace tool to edit and unify edit-family UI (#11296)
* Revert "refactor: delete orphaned per-provider caching transform files (#11388)"
This reverts commit 13a45b0361.
* chore: regenerate built-in-skills.ts with updated formatting
* fix: add missing maxReadFileLine property to test baseState
The ExtensionState type now requires maxReadFileLine property (added in commit 63e3f769a).
Update the test to include this property with the default value of -1 (unlimited reading).
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* feat: add pnpm serve command for code-server development (#10964)
Co-authored-by: Roo Code <roomote@roocode.com>
* chore: remove Feature Request from issue template options (#11141)
Co-authored-by: Roo Code <roomote@roocode.com>
* refactor(docs-extractor): simplify mode to focus on raw fact extraction (#11129)
* Add cli support for linux (#11167)
* fix: replace heredocs with echo statements in cli-release workflow (#11168)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Drop MacOS-13 cli support (#11169)
* fix(cli): correct example in install script (#11170)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add Kimi K2.5 model to Fireworks provider (#11177)
* feat(cli): improve dev experience and roo provider API key support (#11203)
- Allow --api-key and ROO_API_KEY env var for the roo provider instead of
requiring cloud auth token
- Switch dev/start scripts to use tsx for running directly from source
without building first
- Fix path resolution (version.ts, extension.ts, extension-host.ts) to
work from both source and bundled locations
- Disable debug log file (~/.roo/cli-debug.log) unless --debug is passed
- Update README with complete env var table and dev workflow docs
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Roo Code CLI v0.0.50 (#11204)
* Roo Code CLI v0.0.50
* docs(cli): add --exit-on-error to changelog
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* feat(cli): update default model from Opus 4.5 to Opus 4.6 (#11273)
Co-authored-by: Roo Code <roomote@roocode.com>
* feat(web): replace Roomote Control with Linear Integration in cloud features grid (#11280)
Co-authored-by: Roo Code <roomote@roocode.com>
* Add linux-arm64 for the roo cli (#11314)
* chore: clean up repo-facing mode rules (#11410)
* Make CLI auto-approve by default with require-approval opt-in (#11424)
Co-authored-by: Roo Code <roomote@roocode.com>
* Add new code owners to CODEOWNERS file
* Update next.js (#11108)
* feat(web): Replace bespoke navigation menu with shadcn navigation menu (#11117)
Co-authored-by: Roo Code <roomote@roocode.com>
---------
Co-authored-by: SannidhyaSah <sah_sannidhya@outlook.com>
Co-authored-by: Sannidhya <sann@Sannidhyas-MacBook-Pro.local>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: 0xMink <dennis@dennismink.com>
Co-authored-by: Robert McIntyre <robertjmcintyre@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Revert to pre-AI-SDK state (commit 67e568f6b)
This commit reverts the codebase to the state before AI SDK migration work began.
Target commit: 67e568f6b - refactor: replace fetch_instructions with skill tool and built-in skills (#10913)
Date: January 29, 2026
This removes approximately 152 commits of AI SDK migration work.
A follow-up PR will add back bug fixes and features that are unrelated to AI SDK.
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* feat: extract translation and merge resolver modes into reusable skills
- Add roo-translation skill with comprehensive i18n guidelines
- Add roo-conflict-resolution skill for intelligent merge conflict resolution
- Add /roo-translate slash command as shortcut for translation skill
- Add /roo-resolve-conflicts slash command as shortcut for conflict resolution skill
The existing translate and merge-resolver modes are preserved. These new skills
and commands provide reusable access to the same functionality.
Closes CLO-722
* feat: add guidances directory with translator guidance file
- Add .roo/guidances/roo-translator.md for brand voice, tone, and word choice guidance
- Update roo-translation skill to reference the guidance file
The guidance file serves as a placeholder for translation style guidelines
that will be interpolated at runtime.
* fix: rename guidances directory to guidance (singular)
* fix: remove language-specific section from translator guidance
The guidance file should focus on brand voice, tone, and word choice only.
* fix: remove language-specific guidelines section from skill file
* Update .roo/skills/roo-translation/SKILL.md
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
* fix: race conditions in subtask delegation system
Comprehensive fix for race conditions and error handling gaps in the subtask
delegation system. Addresses multiple failure modes that could leave parent
tasks permanently stuck in 'delegated' status, causing nested subtasks to hang.
Key fixes:
- Remove initialStatus from taskMetadata rebuild (eliminates status overwrites)
- Persist delegation metadata to per-task files (resolves globalState eviction)
- Add delegationInProgress mutex guard (prevents concurrent delegation ops)
- TOCTOU race fixes with fresh re-reads before writes
- Abort-aware pWaitFor predicate (prevents false 60s timeout on user input)
- Remove silent .catch(() => {}) — all errors now logged unless task is aborting
- Single-attempt delegation with parent repair on failure (no retry band-aids)
- Cancel debouncedEmitTokenUsage in dispose() (prevents zombie callbacks)
- new_task isolation truncation for parallel tool calls
* fix: write all 6 delegation fields in every saveDelegationMeta call site
* fix: align delegation tests with single-attempt implementation (no retry)
* feat: migrate LiteLLM provider to AI SDK (@ai-sdk/openai-compatible)
- Replace raw OpenAI SDK (RouterProvider) with Vercel AI SDK's
createOpenAICompatible via OpenAICompatibleHandler base class
- Retain dynamic model fetching from LiteLLM server via /v1/model/info
- Use centralized getModelMaxOutputTokens() to cap output tokens at 20%
of context window, preventing overflow errors
- Remove LiteLLM-specific workarounds (Gemini thought signature injection,
prompt cache control headers) now handled by the proxy or AI SDK
- Rewrite tests to mock AI SDK (streamText, generateText) instead of
raw OpenAI SDK
* fix: call fetchModel() in completePrompt() before execution
Addresses review feedback - completePrompt() now fetches models
before executing to ensure correct model info for token limits,
matching the behavior of createMessage().
* fix: make removeClineFromStack() delegation-aware to prevent orphaned parent tasks
When a delegated child task is removed via removeClineFromStack() (e.g., Clear
Task, navigate to history, start new task), the parent task was left orphaned
in "delegated" status with a stale awaitingChildId. This made the parent
unresumable without manual history repair.
This fix captures parentTaskId and childTaskId before abort/dispose, then
repairs the parent metadata (status -> active, clear awaitingChildId) when
the popped task is a delegated child and awaitingChildId matches.
Parent lookup + updateTaskHistory are wrapped in try/catch so failures are
non-fatal (logged but do not block the pop).
Closes#11301
* fix: add skipDelegationRepair opt-out to removeClineFromStack() for nested delegation
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* refactor: migrate LM Studio provider to Vercel AI SDK
Migrate LmStudioHandler from raw OpenAI SDK to Vercel AI SDK via
OpenAICompatibleHandler base class.
Changes:
- Extend OpenAICompatibleHandler instead of BaseProvider
- Use createOpenAICompatible from @ai-sdk/openai-compatible
- Use streamText/generateText from ai package
- Add extractReasoningMiddleware for <think> tag extraction parity
- Pass draft_model via providerOptions for speculative decoding
- Remove unused getLmStudioModels function (active version in fetchers/)
- Update all tests to mock AI SDK instead of OpenAI SDK
* fix: wrap completePrompt with handleAiSdkError for consistent error handling
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Replace @anthropic-ai/vertex-sdk with @ai-sdk/google-vertex/anthropic,
using streamText/generateText from the Vercel AI SDK for consistent
provider behavior.
Changes:
- Use createVertexAnthropic from @ai-sdk/google-vertex/anthropic
- Use streamText/generateText instead of direct Anthropic API calls
- Add AI SDK transform utilities for message/tool conversion
- Handle cache control via AI SDK providerOptions
- Handle thinking/reasoning via providerOptions.anthropic.thinking
- Add thought signature and redacted thinking block tracking
- Set isAiSdkProvider() to return true
- Remove unused deps: @anthropic-ai/vertex-sdk, google-auth-library
- Rewrite tests to mock AI SDK instead of @anthropic-ai/vertex-sdk
* Latest main branch snapshot from API
* feat: add dedicated Azure OpenAI provider using @ai-sdk/azure package
* feat: add Azure provider UI component and translations
* feat: add Azure provider translations for all locales
* chore: add missing Azure placeholder translations
* Delete .changeset/azure-ai-sdk-migration.md
* fix: add Azure provider validation for onboarding workflow
- Add azureApiKey to SECRET_STATE_KEYS for proper configuration detection
- Add Azure validation case in validateModelsAndKeysProvided
- Add validation translations for azureResourceName and azureDeploymentName across all 18 locales
This fixes the issue where the Finish button does nothing when setting up Azure provider in the onboarding workflow.
* feat(azure): add model metadata, model picker, rename to Azure AI Foundry
- Add static model metadata for 29 Azure models (from models.dev)
with Roo-specific flags (reasoning, tools, verbosity) matching
openAiNativeModels
- Add model picker dropdown to Azure provider settings for model
capability detection (context window, max tokens, pricing)
- Rename provider label from 'Azure OpenAI' to 'Azure AI Foundry'
across all 18 locales
- Make API key optional (supports Azure managed identity / Entra ID)
- Update default API version from 2024-08-01-preview to 2025-04-01-preview
- Fix maxOutputTokens validation (filter invalid values <= 0)
- Handler separates deployment name (API calls) from model ID
(capability lookup) with azureDefaultModelInfo (gpt-4o) fallback
- Remove unhelpful 'Get Azure AI Foundry Access' button
- Prevent stale model IDs from other providers carrying over
- Suppress validation errors on fresh provider selection
* fix(azure): add missing isAiSdkProvider() override for reasoning block preservation
* Azure Fixes for Hannes
* Quick Fix for Respones API Only (for Hannes)
* fix: use explicit azureOpenAiDefaultApiVersion fallback when apiVersion is empty
Addresses review feedback: the UI placeholder shows '2025-04-01-preview' via
azureOpenAiDefaultApiVersion, so the handler should use the same constant as
fallback instead of silently deferring to the SDK's internal default.
* fix: remove stale Cerebras references (retired provider)
* fix: add missing retiredProviderMessage translations for all locales
* fix: do not map promptCacheMissTokens to cacheWriteTokens for Azure
Azure uses OpenAI-compatible caching which does not report cache write
tokens separately. promptCacheMissTokens represents tokens NOT found in
cache (processed from scratch), not tokens written to cache. This aligns
the Azure handler with the OpenAI native handler behavior.
---------
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* feat: migrate OpenAI Native provider to @ai-sdk/openai
Replace the raw OpenAI SDK (openai) usage in OpenAiNativeHandler with
@ai-sdk/openai and AI SDK's streamText/generateText, following the same
pattern used by other migrated providers (Groq, xAI, Fireworks, etc.).
Key changes:
- Use createOpenAI from @ai-sdk/openai with provider.responses() for
the Responses API
- Use streamText/generateText from ai for streaming and completions
- Pass OpenAI-specific features via providerOptions.openai (store,
reasoningEffort, reasoningSummary, textVerbosity, serviceTier,
promptCacheRetention, parallelToolCalls, include)
- Capture responseId, serviceTier, and encrypted reasoning content
from providerMetadata after streaming
- Preserve getEncryptedContent() and getResponseId() for Task.ts
- Preserve service tier pricing adjustment in cost calculation
- Mark as isAiSdkProvider: true
- Eliminate ~1100 lines of manual SSE parsing, raw fetch fallback,
and event handling code
- Rewrite all 3 test files to use AI SDK mocking pattern
* fix: remove non-existent cacheWriteTokens from providerMetadata
The OpenAI Responses API does not report cache write tokens separately.
Remove the reference to providerMetadata?.openai?.cacheWriteTokens which
does not exist in the @ai-sdk/openai provider metadata schema.
* fix: filter standalone encrypted reasoning items from messages
Task.ts buildCleanConversationHistory injects standalone reasoning items
with { type: 'reasoning', encrypted_content: '...' } into the messages
array. These have no 'role' property and would be silently dropped by
convertToAiSdkMessages. Filter them explicitly to prevent confusion.
Note: Encrypted reasoning content round-tripping for stateless continuity
is a known limitation of the AI SDK migration. The @ai-sdk/openai
provider does not support injecting raw Responses API reasoning items.
Plain-text reasoning round-tripping works correctly via isAiSdkProvider().
* fix: restore reasoning round-trip for OpenAI Responses API via AI SDK
- Strip plain-text reasoning blocks from assistant messages before
convertToAiSdkMessages() to eliminate 'Non-OpenAI reasoning parts'
warnings from @ai-sdk/openai Responses provider
- Re-inject encrypted reasoning items as AI SDK reasoning parts with
providerOptions.openai.itemId and reasoningEncryptedContent, restoring
reasoning continuity that was silently broken after the migration
- Restructure createMessage() into a 5-step pipeline:
collect → filter → strip → convert → inject
- Add 21 new tests for both plain-text stripping and encrypted
reasoning injection
---------
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
* fix: resolve race condition in new_task delegation that loses parent task history
When delegateParentAndOpenChild creates a child task via createTask(), the
Task constructor fires startTask() as a fire-and-forget async call. The child
immediately begins its task loop and eventually calls saveClineMessages() →
updateTaskHistory(), which reads globalState, modifies it, and writes back.
Meanwhile, delegateParentAndOpenChild persists the parent's delegation
metadata (status: 'delegated', delegatedToId, awaitingChildId, childIds) via
a separate updateTaskHistory() call AFTER createTask() returns.
These two concurrent read-modify-write operations on globalState race: the
last writer wins, overwriting the other's changes. When the child's write
lands last, the parent's delegation fields are lost, making the parent task
unresumable when the child finishes.
Fix: create the child task with startTask: false, persist the parent's
delegation metadata first, then manually call child.start(). This ensures
the parent metadata is safely in globalState before the child begins writing.
* docs: clarify Task.start() only handles new tasks, not history resume
* fix(reliability): prevent webview postMessage crashes and make dispose idempotent
Closes: #11311
1. postMessageToWebview() now catches rejections from
webview.postMessage() so that messages sent after the webview is
disposed do not surface as unhandled promise rejections.
2. dispose() is guarded by a _disposed flag so that repeated calls
(e.g. during rapid extension deactivation) are no-ops.
3. CloudService mock in ClineProvider.spec.ts updated to include
off() — a pre-existing gap exposed by the new dispose test.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: add early _disposed check in postMessageToWebview
Skip the postMessage call entirely when the provider is already disposed,
avoiding unnecessary try/catch execution. Added test coverage for this path.
* chore: trigger CI
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Add a promise-chain mutex (withTaskHistoryLock) to serialize all
read-modify-write operations on taskHistory, preventing concurrent
interleaving from silently dropping entries.
Reorder reopenParentFromDelegation to close the child instance
before marking it completed, so the abort path's stale 'active'
status write no longer overwrites the 'completed' state.
Covered by new tests: RPD-04/05/06, UTH-02/04, and a full mutex
concurrency suite.
fix: prevent false unsaved changes prompt with OpenAI Compatible headers
Mark automatic header syncs in ApiOptions and OpenAICompatible as
non-user actions (isUserAction: false) and enhance SettingsView change
detection to skip automatic syncs with semantically equal values.
Root cause: two components (ApiOptions and OpenAICompatible) manage
openAiHeaders state and automatically sync it back on mount/remount.
These syncs were treated as user changes, triggering a false dirty state.
Co-authored-by: Robert McIntyre <robertjmcintyre@users.noreply.github.com>
* refactor: migrate Anthropic provider to @ai-sdk/anthropic
Replace the raw @anthropic-ai/sdk implementation with @ai-sdk/anthropic
(Vercel AI SDK) for consistency with other providers (Bedrock, DeepSeek,
Mistral, etc.).
Changes:
- Replace Anthropic() client with createAnthropic() from @ai-sdk/anthropic
- Replace manual stream parsing with streamText() + processAiSdkStreamPart()
- Replace client.messages.create() with generateText() for completePrompt()
- Use convertToAiSdkMessages() and convertToolsForAiSdk() for format conversion
- Handle prompt caching via AI SDK providerOptions (cacheControl on messages)
- Handle extended thinking via providerOptions.anthropic.thinking
- Add getThoughtSignature() and getRedactedThinkingBlocks() for thinking
signature round-tripping (matching Bedrock pattern, improves on original
which had a TODO for this)
- Add isAiSdkProvider() returning true
- Update tests to mock @ai-sdk/anthropic and ai instead of raw SDK
* fix: address PR review - remove apiKey fallback and use system+systemProviderOptions pattern
* refactor: remove 9 low-usage providers (Phase 0)
Remove Cerebras, Chutes, DeepInfra, Doubao, Featherless, Groq,
Hugging Face, IO Intelligence, and Unbound providers from the codebase.
Each provider removal includes: handler, tests, model definitions,
type schemas, UI settings components, fetchers, i18n references,
and all wiring in shared registration/config files.
- Delete 42 provider-specific files (handlers, tests, fetchers, UI components)
- Remove @ai-sdk/cerebras and @ai-sdk/groq npm dependencies
- Clean provider references from 68 shared files across src/, packages/types/,
webview-ui/, and apps/cli/
- Remove ~490 dead i18n translation keys across 36 locale files
- Add docs/ai-sdk-migration-guide.md with updated migration status
- All TypeScript checks pass, 6505 tests pass with 0 failures
* feat: show retired-provider message for removed provider profiles
Preserve API profiles that reference removed providers instead of
silently stripping their apiProvider. When a user selects a profile
configured for a retired provider, the settings UI now shows an
empathetic message explaining the removal instead of the provider
configuration form.
- Add retiredProviderNames array and isRetiredProvider() helper to
packages/types/src/provider-settings.ts
- Update ProviderSettingsManager sanitization to preserve retired
providers (only strip truly unknown values)
- Update ContextProxy sanitization to preserve retired providers
- Render retired-provider message in ApiOptions.tsx when selected
provider is in the retired list
- Add tests for sanitization, ContextProxy, and UI behavior
* feat: add retired-provider warning banner in chat view
* Revert "feat: add retired-provider warning banner in chat view"
This reverts commit dd593e1056.
* feat: show retired-provider message as inline chat response
* fix: show retired provider warning on home screen
Move WarningRow outside {task && ...} conditional so it renders
regardless of task state. Preserve user input on retired provider
intercept so text isn't lost when switching providers.
- Move showRetiredProviderWarning WarningRow to unconditional render
area near ProfileViolationWarning
- Remove setInputValue/setSelectedImages clearing from retired
provider early return in handleSendMessage
- Delete unused RetiredProviderWarning.tsx (dead code)
* fix: address PR review — passthrough retired-provider fields and i18n strings
- Use passthrough() in saveConfig() and load() so legacy provider-specific
fields (e.g. groqApiKey, deepInfraModelId) are preserved instead of
silently stripped by strict Zod parse()
- Move hardcoded English strings in ApiOptions.tsx and ChatView.tsx to
i18n translation keys (settings:providers.retiredProviderMessage,
chat:retiredProvider.{title,message,openSettings})
- Update tests to assert legacy provider-specific fields survive
save and load round-trips
* i18n: add retired-provider translations for all 17 locales
Translate providers.retiredProviderMessage (settings) and
retiredProvider.{title,message,openSettings} (chat) into ca, de, es,
fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW.
* test: update ApiOptions retired-provider test to expect i18n key
* feat: group consecutive list_files tool calls into single UI block
Consolidate consecutive listFilesTopLevel/listFilesRecursive ask messages
into a single 'Roo wants to view multiple directories' block, matching the
existing read_file batching pattern.
* chore: add missing translation keys for all locales
* refactor: consolidate duplicate listFiles batch-handling blocks in ChatRow
Merge the separate listFilesTopLevel and listFilesRecursive case blocks
into a single combined case with shared batch-detection logic, selecting
the icon and translation key based on the tool type. This removes the
duplicated isBatchDirRequest check and BatchListFilesPermission render.
* feat: batch consecutive file-edit tool calls into single UI block
Add edit-file batching in ChatView groupedMessages that consolidates
consecutive editedExistingFile, appliedDiff, newFileCreated,
insertContent, and searchAndReplace asks into a single BatchDiffApproval
block. Move batchDiffs detection in ChatRow above the switch statement
so it applies to any file-edit tool type.
* refactor: extract batchConsecutive utility, fix batch UI issues
- Extract generic batchConsecutive() utility from 3 identical while-loops
- Fix React key collisions in BatchListFilesPermission, BatchFilePermission, BatchDiffApproval
- Normalize language prop to "shellsession" (was "shell-session" for top-level)
- Remove unused _batchedMessages property from synthetic messages
- Remove dead didViewMultipleDirectories i18n key from all 18 locale files
- Add batch button text for listFilesTopLevel/listFilesRecursive
- Add batchConsecutive utility tests (6 cases)
* fix: audit improvements for batch tool-call UI
- Make batchConsecutive() generic instead of ClineMessage-specific
- Add batch-aware button text for edit-file batches ("Save All"/"Deny All")
- Add dedicated list-batch/edit-batch i18n keys (stop reusing read-batch)
- Add JSON.parse defense-in-depth in all three synthesizers
- Fix mixed list_files batch icon to default to FolderTree
- Add 6 missing test cases (all-match, immutability, spy, single-dir)
* chore: minor type cleanup (out-of-scope housekeeping)
- Trim unused recursive/isOutsideWorkspace from DirPermissionItem interface
- Remove 4 pre-existing `as any` casts in ChatView.tsx:
- window cast → precise inline type
- checkpoint bracket access → removed unnecessary casts
- condensing message → `as ClineMessage`
- debounce cancel → `.clear()` (correct API)
- Update BatchListFilesPermission test data to match trimmed interface
* i18n: add list-batch and edit-batch translations for all locales
* feat: add task header highlight setting for visual status indication
Add a 'Task Header Highlight' toggle under Settings > UI that colors the
task header based on its current state:
- Green (--vscode-charts-green) when task completes (completion_result)
- Yellow (--vscode-charts-yellow) when user attention is needed (follow-up
questions, tool approvals, etc.)
The highlight is skipped for subtasks and partial/streaming messages,
matching the same defensive logic used by sound notifications.
CSS classes with !important and --vscode-foreground variable overrides
ensure all child text, icons, SVGs, and the context progress bar use
appropriate contrasting colors.
Includes tests (37 passing) and translations for all 18 locales.
* fix: address review feedback - accessibility contrast and deduplicated logic
- Replace theme-dependent --vscode-charts-green/yellow backgrounds with
hardcoded colors (#15803d, #ca8a04) that guarantee WCAG AA 4.5:1 contrast
- Extract shared lastRelevantMessage useMemo to deduplicate findLastIndex
filtering between isTaskComplete and highlightClass
* perf(refactor): consolidate getState calls in resolveWebviewView
Replace three separate this.getState().then() calls with a single
await this.getState() and destructuring. This avoids running the
full getState() method (CloudService calls, ContextProxy reads, etc.)
three times during webview view resolution.
* fix: keep getState consolidation non-blocking to avoid delaying webview render
---------
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* chore(cli): prepare release v0.0.52
* Update CHANGELOG for build cleanup and Linux support
Removed unused dependency from build configuration and added Linux support.
* fix: validate Gemini thinkingLevel against model capabilities and handle empty streams
getGeminiReasoning() now validates the selected effort against the model's
supportsReasoningEffort array before sending it as thinkingLevel. When a
stale settings value (e.g. 'medium' from a different model) is not in the
supported set, it falls back to the model's default reasoningEffort.
GeminiHandler.createMessage() now tracks whether any text content was
yielded during streaming and handles NoOutputGeneratedError gracefully
instead of surfacing the cryptic 'No output generated' error.
* fix: guard thinkingLevel fallback against 'none' effort and add i18n TODO
The array validation fallback in getGeminiReasoning() now only triggers
when the selected effort IS a valid Gemini thinking level but not in
the model's supported set. Values like 'none' (explicit no-reasoning
signal) are no longer overridden by the model default.
Also adds a TODO for moving the empty-stream message to i18n.
* fix: track tool_call_start in hasContent to avoid false empty-stream warning
Tool-only responses (no text) are valid content. Without this,
agentic tool-call responses would incorrectly trigger the empty
response warning message.
* feat(history): render nested subtasks as recursive tree
* fix(lockfile): resolve missing ai-sdk provider entry
* fix: address review feedback — dedupe countAll, increase SubtaskRow max-h
- HistoryView: replace local countAll with imported countAllSubtasks from types.ts
- SubtaskRow: increase nested children max-h from 500px to 2000px to match TaskGroupItem
* feat: add lock toggle to pin API config across all modes in workspace
Add a lock/unlock toggle inside the API config selector popover (next to
the settings gear) that, when enabled, applies the selected API
configuration to all modes in the current workspace.
- Add lockApiConfigAcrossModes to ExtensionState and WebviewMessage types
- Store setting in workspaceState (per-workspace, not global)
- When locked, activateProviderProfile sets config for all modes
- Lock icon in ApiConfigSelector popover bottom bar next to gear
- Full i18n: English + 17 locale translations (all mention workspace scope)
- 9 new tests: 2 ClineProvider, 2 handler, 5 UI (77 total pass)
* refactor: replace write-fan-out with read-time override for lock API config
The original lock implementation used setModeConfig() fan-out to write the
locked config to ALL modes globally. Since the lock flag lives in workspace-
scoped workspaceState but modeApiConfigs are in global secrets, this caused
cross-workspace data destruction.
Replaced with read-time guards:
- handleModeSwitch: early return when lock is on (skip per-mode config load)
- createTaskWithHistoryItem: skip mode-based config restoration under lock
- activateProviderProfile: removed fan-out block
- lockApiConfigAcrossModes handler: simplified to flag + state post only
- Fixed pre-existing workspaceState mock gap in ClineProvider.spec.ts and
ClineProvider.sticky-profile.spec.ts
* refactor: migrate baseten provider to AI SDK
* refactor(baseten): migrate to native @ai-sdk/baseten package
Replace OpenAICompatibleHandler with dedicated @ai-sdk/baseten package,
following the same pattern used by other native AI SDK providers (groq,
deepseek, etc.). This uses createBaseten() for provider initialization
and extends BaseProvider directly instead of the generic OpenAI-compatible
handler.
Add GetCommands, GetModes, and GetModels to the IPC protocol so external
clients can fetch slash commands, available modes, and Roo provider models
without going through the internal webview message channel.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add disabledTools setting to globally disable native tools
Add a disabledTools field to GlobalSettings that allows disabling specific
native tools by name. This enables cloud agents to be configured with
restricted tool access.
Schema:
- Add disabledTools: z.array(toolNamesSchema).optional() to globalSettingsSchema
- Add disabledTools to organizationDefaultSettingsSchema.pick()
- Add disabledTools to ExtensionState Pick type
Prompt generation (tool filtering):
- Add disabledTools to BuildToolsOptions interface
- Pass disabledTools through filterSettings to filterNativeToolsForMode()
- Remove disabled tools from allowedToolNames set in filterNativeToolsForMode()
Execution-time validation (safety net):
- Extract disabledTools from state in presentAssistantMessage
- Convert disabledTools to toolRequirements format for validateToolUse()
Wiring:
- Add disabledTools to ClineProvider getState() and getStateToPostToWebview()
- Pass disabledTools to all buildNativeToolsArrayWithRestrictions() call sites
EXT-778
* fix: check toolRequirements before ALWAYS_AVAILABLE_TOOLS
Moves the toolRequirements check before the ALWAYS_AVAILABLE_TOOLS
early-return in isToolAllowedForMode(). This ensures disabledTools
can block always-available tools (switch_mode, new_task, etc.) at
execution time, making the validation layer consistent with the
filtering layer.
* feat: migrate Bedrock provider to AI SDK
Replace the raw AWS SDK (@aws-sdk/client-bedrock-runtime) Bedrock handler
with the Vercel AI SDK (@ai-sdk/amazon-bedrock). Reduces provider from
1,633 lines to 575 lines (65% reduction).
Key changes:
- Use streamText()/generateText() instead of ConverseStreamCommand/ConverseCommand
- Use createAmazonBedrock() with native auth (access key, secret, session,
profile via credentialProvider, API key, VPC endpoint as baseURL)
- Reasoning config via providerOptions.bedrock.reasoningConfig
- Anthropic beta headers via providerOptions.bedrock.anthropicBeta
- Thinking signature captured from providerMetadata.bedrock.signature
on reasoning-delta stream events
- Thinking signature round-tripped via providerOptions.bedrock.signature
on reasoning parts in convertToAiSdkMessages()
- Redacted thinking captured from providerMetadata.bedrock.redactedData
- isAiSdkProvider() returns true for reasoning block preservation
- Keep: getModel, ARN parsing, cross-region inference, cost calculation,
service tier pricing, 1M context beta
Tests: 83 tests skipped (mock old AWS SDK internals, need rewrite for
AI SDK mocking). 106 tests pass. 0 tests fail.
* fix: address review feedback for Bedrock AI SDK migration
- Wire usePromptCache into AI SDK via providerOptions.bedrock.cachePoint
on system prompt and last two user messages
- Remove debug logger.info that fires on every stream event with
providerMetadata
- Tighten isThrottlingError to match 'rate limit' instead of broad
'rate'/'limit' substrings that false-positive on context length errors
- Use shared handleAiSdkError utility for consistent error handling
with status code preservation for retry logic
* fix: bedrock AI SDK migration - fix usage metrics, rewrite tests, remove dead code
- Fix reasoningTokens always 0 (usage.details?.reasoningTokens → usage.reasoningTokens)
- Fix cacheReadInputTokens always 0 (read from usage.inputTokenDetails instead of providerMetadata)
- Fix invokedModelId not extracted for prompt router cost calculation
- Rewrite all 6 skipped bedrock test suites for AI SDK mocking pattern (140 tests pass)
- Remove dead code: bedrock-converse-format.ts, cache-strategy/ (6 files, ~2700 lines)
* chore: remove dead @anthropic-ai/bedrock-sdk dep and stale AWS SDK mocks
* chore: update pnpm-lock.yaml after removing @anthropic-ai/bedrock-sdk
* fix: compute cache point indices from original Anthropic messages before AI SDK conversion
The previous approach naively targeted the last 2 user messages in the
post-conversion AI SDK array, but convertToAiSdkMessages() splits user
messages containing tool_results into separate tool + user messages,
causing cache points to land on the wrong messages (tiny text fragments
instead of the intended meaty user turns).
Now we identify the last 2 user messages in the original Anthropic
message array (matching the Anthropic provider's caching strategy) and
build a parallel-walk mapping to apply cachePoint to the correct
corresponding AI SDK message.
* perf: optimize prompt caching with 3-point message strategy + anchor for 20-block window
Previous approach only cached the last 2 user messages (using 2 of 4
available cache checkpoints for messages). This left significant cache
savings on the table for longer conversations.
New strategy uses up to 3 message cache points (+ 1 system = 4 total):
- Last user message: write to cache for next request
- Second-to-last user message: read from cache for current request
- Anchor message at ~1/3 position: ensures the 20-block lookback window
from the second-to-last breakpoint hits a stable cache entry, covering
all assistant/tool messages in the middle of the conversation
Also extracted the parallel-walk mapping logic into a reusable
applyCachePointsToAiSdkMessages() helper method.
Industry benchmarks show 70-95% token cache rates are achievable;
this change should significantly improve our 39% baseline for longer
multi-turn conversations.
* chore: remove stale bedrock-sdk external, fix arnInfo property name, remove unused exports
---------
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* fix: DeepSeek temperature defaulting to 0 instead of 0.3
Pass defaultTemperature: DEEP_SEEK_DEFAULT_TEMPERATURE to getModelParams() in
DeepSeekHandler.getModel() to ensure the correct default temperature (0.3)
is used when no user configuration is provided.
Closes#11194
* refactor: make defaultTemperature required in getModelParams
Make the defaultTemperature parameter required in getModelParams() instead
of defaulting to 0. This prevents providers with their own non-zero default
temperature (like DeepSeek's 0.3) from being silently overridden by the
implicit 0 default.
Every provider now explicitly declares its temperature default, making the
temperature resolution chain clear:
user setting → model default → provider default
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* refactor: migrate featherless provider to AI SDK
* fix: merge consecutive same-role messages in featherless R1 path
convertToAiSdkMessages does not merge consecutive same-role messages
like convertToR1Format did. When the system prompt is prepended as a
user message and the conversation already starts with a user message,
DeepSeek R1 can reject the request.
Add mergeConsecutiveSameRoleMessages helper that collapses adjacent
Anthropic messages sharing the same role before AI SDK conversion.
Includes a test that verifies no two successive messages share a role.
Migrates the IO Intelligence provider from legacy BaseOpenAiCompatibleProvider
(direct openai SDK) to OpenAICompatibleHandler (Vercel AI SDK).
- Extends OpenAICompatibleHandler instead of BaseOpenAiCompatibleProvider
- Uses getModelParams for model parameter resolution
- Updates tests to mock ai module's streamText/generateText
Remove two console.warn messages that fire excessively when loading tasks
from history:
- 'Attempting to finalize unknown tool call' in finalizeStreamingToolCall()
- 'Received chunk for unknown tool call' in processStreamingChunk()
The defensive null-return behavior is preserved; only the log output is removed.
* changeset version bump
* Update CHANGELOG for version 3.47.3
Updated version number and removed redundant patch changes for 3.47.3.
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Remove the "Enable URL context" and "Enable Grounding with Google search"
checkboxes from Gemini and Vertex provider settings, along with:
- enableUrlContext and enableGrounding fields from provider settings schemas
- URL context and Google Search tool injection in completePrompt methods
- Associated translation keys from all 18 locale files
- Related test cases updated to reflect the removal
- simplifySettings prop removed from Gemini and Vertex components
(it was only used for the removed checkboxes in those components)
Co-authored-by: Roo Code <roomote@roocode.com>
* changeset version bump
* Update CHANGELOG for version 3.47.2
Updated version number and added patch changes for 3.47.2.
* Update CHANGELOG for version 3.47.1
Updated changelog for version 3.47.1 with fixes and cleanup.
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* fix: capture and round-trip thinking signature for Bedrock Claude models
Bedrock handler streams reasoning text from Claude's extended thinking but
never captures the cryptographic signature. This causes 400 errors on
multi-turn conversations with tool use: 'Expected thinking or
redacted_thinking, but found tool_use'.
Changes:
- bedrock.ts: Capture reasoningContent.signature from Converse API stream
deltas, implement getThoughtSignature() so Task.ts stores it as a proper
thinking content block
- bedrock-converse-format.ts: Convert thinking blocks to Bedrock's
reasoningContent format with signature, skip reasoning/redacted_thinking/
thoughtSignature blocks that aren't valid for the API
* fix: add redacted_thinking round-trip, fix interface types, add tests
Address PR review feedback:
- Update ContentBlockDeltaEvent interface to include signature and
redactedContent fields (removes type assertions)
- Add 6 tests for thinking/reasoning block conversions in
bedrock-converse-format.ts
Also add redacted_thinking round-trip support:
- bedrock.ts: Capture redactedContent from stream deltas, base64 encode,
expose via getRedactedThinkingBlocks()
- Task.ts: Insert redacted_thinking blocks after thinking block in
assistant messages
- bedrock-converse-format.ts: Convert redacted_thinking blocks back to
reasoningContent.redactedContent (base64 → Uint8Array)
PR #11180 migrated Gemini/Vertex providers to the AI SDK and deleted
gemini-format.ts which contained the working thought signature round-trip
logic (originally added in PR #10590). This broke all Gemini 3 tool use
with a 400 error: 'Function call is missing a thought_signature'.
Changes:
- Gemini/Vertex handlers: capture thoughtSignature from providerMetadata
on tool-call stream events, expose via getThoughtSignature()
- convertToAiSdkMessages(): extract thoughtSignature content blocks from
history, attach as providerOptions on first tool-call part (per Gemini 3
parallel call rules)
- Add 3 tests verifying thought signature round-trip behavior
* feat: add support for .agents/skills directory
This change adds support for discovering skills from the .agents/skills
directory, following the Agent Skills convention for sharing skills
across different AI coding tools.
Priority order (later entries override earlier ones):
1. Global ~/.agents/skills (shared across AI coding tools, lowest priority)
2. Project .agents/skills
3. Global ~/.roo/skills (Roo-specific)
4. Project .roo/skills (highest priority)
Changes:
- Add getGlobalAgentsDirectory() and getProjectAgentsDirectoryForCwd()
functions to roo-config
- Update SkillsManager.getSkillsDirectories() to include .agents/skills
- Update SkillsManager.setupFileWatchers() to watch .agents/skills
- Add tests for new functionality
* fix: clarify skill priority comment to match actual behavior
* fix: clarify skill priority comment to explain Map.set replacement mechanism
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* changeset version bump
* Update CHANGELOG for version 3.47.1
Updated changelog for version 3.47.1 with patch changes.
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
When the 'custom base URL' checkbox is unchecked in the UI, the setting
is set to '' (empty string). Providers that passed this directly to their
SDK constructors caused 'Failed to parse URL' errors because the SDK
treated '' as a valid but broken base URL override.
- gemini.ts: use || undefined (was passing raw option)
- openai-native.ts: use || undefined (was passing raw option)
- openai.ts: change ?? to || for fallback default
- deepseek.ts: change ?? to || for fallback default
- moonshot.ts: change ?? to || for fallback default
Adds test coverage for Gemini and OpenAI Native constructors verifying
empty-string baseURL is coerced to undefined.
Remove the :0 suffix from the Claude Opus 4.6 model ID to match
the correct AWS Bedrock model identifier.
The model ID was "anthropic.claude-opus-4-6-v1:0" but should be
"anthropic.claude-opus-4-6-v1" per AWS Bedrock documentation.
Fixes#11231
Co-authored-by: Roo Code <roomote@roocode.com>
Remove three functions from appendEnvironmentDetails.ts that were
defined and tested but never imported or called in production code:
- stripAppendedEnvironmentDetails (exported, 0 call sites)
- stripEnvDetailsFromText (private helper)
- stripEnvDetailsFromToolResult (private helper)
Also removes the corresponding describe block (7 tests) from the
spec file. The remaining 19 tests pass.
* changeset version bump
* Update CHANGELOG for version 3.47.0 release
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* refactor(task): append environment details into existing blocks
Add appendEnvironmentDetails() helper that merges environment details
into the last text block or tool_result instead of adding a standalone
trailing text block.
This avoids message shapes that can break interleaved-thinking models
like DeepSeek reasoner, which expect specific message structures.
Changes:
- Add appendEnvironmentDetails() and removeEnvironmentDetailsBlocks() helpers
- Update Task.resumeAfterDelegation() to use the helper
- Update Task.recursivelyMakeClineRequests() to use the helper
- Add comprehensive unit tests (26 test cases)
* fix: use named import for Anthropic SDK to match codebase convention
Remove the toolFormat constant and <tool_format> line from environment
details output. Native tool calling is now the only supported protocol,
making this code unnecessary.
Fixes#11206
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: add Claude Opus 4.6 support across all providers
Add Claude Opus 4.6 (claude-opus-4-6) model definitions and 1M context
support across Anthropic, Bedrock, Vertex AI, OpenRouter, and Vercel AI
Gateway providers.
- Anthropic: 128K max output, /5 pricing, 1M context tiers
- Bedrock: anthropic.claude-opus-4-6-v1:0 with 1M context + global inference
- Vertex: claude-opus-4-6 with 1M context tiers
- OpenRouter: prompt caching + reasoning budget sets
- Vercel AI Gateway: Opus 4.5 and 4.6 added to capability sets
- UI: 1M context checkbox for Opus 4.6 on all providers
- i18n: Updated 1M context descriptions across 18 locales
Also adds Opus 4.5 to Vercel AI Gateway (previously missing) and
OpenRouter maxTokens overrides for Opus 4.5/4.6.
Closes#11223
* fix: apply tier pricing when 1M context is enabled on Bedrock
When awsBedrock1MContext is enabled for tiered models like Opus 4.6,
also apply the 1M tier pricing (inputPrice, outputPrice, cache prices)
instead of only updating contextWindow. This ensures cost calculations
and UI display use the correct >200K rates.
* fix(ai-sdk): preserve reasoning parts in message conversion
* fix(ai-sdk): convert message-level reasoning_content to reasoning part
* fix(task): remove invalid openai-compatible from reasoning allowlist
* feat: add isAiSdkProvider() method for dynamic AI SDK provider detection
- Add isAiSdkProvider() method to ApiHandler interface
- Default implementation in BaseProvider returns false
- Override to return true in 11 AI SDK providers:
deepseek, fireworks, mistral, groq, xai, cerebras,
sambanova, huggingface, gemini, vertex, openai-compatible
- Update Task.ts to use dynamic detection instead of hardcoded Set
- Add method to FakeAIHandler and update test mocks
* fix: handle reasoning parts in flattenAiSdkMessagesToStringContent
- Strip reasoning parts when flattening messages for string-only models
- Allow flattening when message contains only text and reasoning parts
- Add tests for reasoning part handling in string-only model contexts
This addresses the review feedback about ensuring flattenAiSdkMessagesToStringContent
works correctly when reasoning parts are present (e.g., SambaNova DeepSeek).
---------
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* fix(ai-sdk): preserve reasoning parts in message conversion
* fix(ai-sdk): convert message-level reasoning_content to reasoning part
* fix(task): remove invalid openai-compatible from reasoning allowlist
When using slash commands with `mode:` frontmatter (e.g., `/cli-release`
with `mode: code`), the CLI would fail with "Could not resolve
authentication method" from the Anthropic SDK, even when using a
non-Anthropic provider like `--provider roo`.
Root cause: In `markWebviewReady()`, the `webviewDidLaunch` message was
sent before `updateSettings`, creating a race condition. The
`webviewDidLaunch` handler's "first-time init" sync would read
`getState()` before CLI-provided settings were applied to the context
proxy. Since `getState()` defaults `apiProvider` to "anthropic" when
unset, this default was saved to the provider profile. When a slash
command triggered `handleModeSwitch()`, it found this corrupted profile
with `apiProvider: "anthropic"` (but no API key) and activated it,
overwriting the CLI's working roo provider configuration.
Fix:
1. Reorder `markWebviewReady()` to send `updateSettings` before
`webviewDidLaunch`, ensuring the context proxy has CLI-provided
values when the initialization handler runs.
2. Guard the first-time init sync with `checkExistKey(apiConfiguration)`
to prevent saving a profile with only the default "anthropic"
fallback and no actual API keys configured.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* feat: migrate Gemini and Vertex providers to AI SDK
- Migrate GeminiHandler from @google/genai to @ai-sdk/google
- Create standalone VertexHandler using @ai-sdk/google-vertex
- Use shared AI SDK utilities (streamText, generateText, convertToAiSdkMessages)
- Support thinkingConfig via providerOptions.google.thinkingConfig
- Support Google Search and URL Context grounding tools
- Preserve cost calculation with tiered pricing
- Remove gemini-format.ts (AI SDK handles message conversion)
EXT-643
* fix: remove unused import and implement allowedFunctionNames tool filtering
- Remove unused handleAiSdkError import from gemini.ts
- Implement tool filtering based on allowedFunctionNames in both
GeminiHandler and VertexHandler createMessage methods
- Filter tools before converting to AI SDK format to restrict
model access to only allowed functions
- Allow --api-key and ROO_API_KEY env var for the roo provider instead of
requiring cloud auth token
- Switch dev/start scripts to use tsx for running directly from source
without building first
- Fix path resolution (version.ts, extension.ts, extension-host.ts) to
work from both source and bundled locations
- Disable debug log file (~/.roo/cli-debug.log) unless --debug is passed
- Update README with complete env var table and dev workflow docs
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Tool IDs from providers like Gemini/OpenRouter contain special characters
(e.g., 'functions.read_file:0') that are sanitized when saving tool_use
blocks to API history. However, tool_result blocks were using the original
unsanitized IDs, causing ToolResultIdMismatchError.
This fix ensures tool_result blocks use sanitizeToolUseId() to match the
sanitized tool_use IDs in conversation history.
Fixes EXT-711
* feat(condense): add smart code folding with tree-sitter signatures
At context condensation time, use tree-sitter to generate folded code
signatures (function definitions, class declarations) for files read
during the conversation. Each file is included as its own <system-reminder>
block in the condensed summary, preserving structural awareness without
consuming excessive tokens.
- Add getFilesReadByRoo() method to FileContextTracker
- Create generateFoldedFileContext() using tree-sitter parsing
- Update summarizeConversation() to accept array of file sections
- Each file gets its own content block in the summary message
- Add comprehensive test coverage (12 tests)
* fix: skip tree-sitter error strings in folded file context
- Add isTreeSitterErrorString helper to detect error messages
- Skip files that return error strings instead of embedding them
- Add test for error string handling
* refactor: move generateFoldedFileContext() inside summarizeConversation()
- Update summarizeConversation() to accept filesReadByRoo, cwd, rooIgnoreController instead of pre-generated sections
- Move folded file context generation inside summarizeConversation() (lines 319-339)
- Update ContextManagementOptions type and manageContext() to pass new parameters
- Remove generateFoldedFileContext from Task.ts imports - folding now handled internally
- Update all tests to use new parameter signature
- Reduces Task.ts complexity by moving folding logic to summarization module
* fix: prioritize most recently read files in folded context
Files are now sorted by roo_read_date descending before folded context
generation, so if the character budget runs out, the most relevant
(recently read) files are included and older files are skipped.
* refactor: improve code quality in condense module
- Convert summarizeConversation to use options object instead of 11 positional params
- Extract duplicated getFilesReadByRoo error handling into helper method
- Remove unnecessary re-export of generateFoldedFileContext
- Update all test files to use new options object pattern
* fix: address roomote feedback - batch error logging and early budget exit
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
fix: prevent false validation error for local Ollama models
The validation logic was checking against an empty router models object
that was initialized but never populated for Ollama. This caused false
validation errors even when models existed locally.
Now only validates against router models if they actually contain data,
preventing the false error when using local Ollama models.
Fixes ROO-581
Co-authored-by: Roo Code <roomote@roocode.com>
- Modified VsCodeLmHandler.internalCountTokens() to create temporary cancellation tokens when needed
- Token counting now works both during and outside of active requests
- Added 4 new tests to verify the fix and prevent regression
- Resolves issue where VS Code LM API users experienced context overflow errors
* Taskheader
* Subtask messages
* View subtask
* subtasks in history items
* i18n
* Table
* Lighter visuals
* bug
* fix: Align tests with implementation behavior
* refactor: extract CircularProgress component from TaskHeader
- Created reusable CircularProgress component for displaying percentage as a ring
- Moved inline SVG calculation from TaskHeader.tsx to dedicated component
- Added comprehensive tests for CircularProgress component (14 tests)
- Component supports customizable size, strokeWidth, and className
- Includes proper accessibility attributes (progressbar role, aria-valuenow)
* chore: update StandardTooltip default delay to 600ms
As mentioned in the PR description, increased the tooltip delay to 600ms
for less intrusive tooltips. The delay is still configurable via the
delay prop for components that need a different value.
---------
Co-authored-by: Roo Code <roomote@roocode.com>
- Remove getToolDescription() method from MultiSearchReplaceDiffStrategy
- Remove getToolDescription() from DiffStrategy interface
- Remove unused ToolDescription type from shared/tools.ts
- Remove unused eslint-disable directive
- Update test mocks to remove getToolDescription references
- Remove getToolDescription tests from multi-search-replace.spec.ts
Native tools are now defined in src/core/prompts/tools/native-tools/ using
the OpenAI function format. The removed code was dead since XML-style tool
calling was replaced with native tool calling.
* fix: convert orphaned tool_results to text blocks after condensing
When condensing occurs after assistant sends tool_uses but before user responds,
the tool_use blocks get condensed away. User messages containing tool_results that
reference condensed tool_use_ids become orphaned and get filtered out by
getEffectiveApiHistory, causing user feedback to be lost.
This fix enhances the existing check in addToApiConversationHistory to detect when
the previous effective message is not an assistant and converts any tool_result
blocks to text blocks, preventing them from being filtered as orphans.
The conversion happens at the latest possible moment (message insertion) because:
- Tool results are created before we know if condensing will occur
- We need actual effective history state to make the decision
- This is the last checkpoint before orphan filtering happens
* Only include environment details in summary for automatic condensing
For automatic condensing (during attemptApiRequest), environment details
are included in the summary because the API request is already in progress
and the next user message won't have fresh environment details injected.
For manual condensing (via condenseContext button), environment details
are NOT included because fresh details will be injected on the very next
turn via getEnvironmentDetails() in recursivelyMakeClineRequests().
This uses the existing isAutomaticTrigger flag to differentiate behavior.
---------
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
* chore: remove MULTI_FILE_APPLY_DIFF experiment
Remove the 'Enable concurrent file edits' experimental feature that
allowed editing multiple files in a single apply_diff call.
- Remove multiFileApplyDiff from experiment types and config
- Delete MultiFileSearchReplaceDiffStrategy class and tests
- Delete MultiApplyDiffTool wrapper and tests
- Remove experiment-specific code paths in Task.ts, generateSystemPrompt.ts, and presentAssistantMessage.ts
- Remove special handling in ExperimentalSettings.tsx
- Remove translations from all 18 locale files
The existing MultiSearchReplaceDiffStrategy continues to handle
multiple SEARCH/REPLACE blocks within a single file.
* fix: remove unused EXPERIMENT_IDS/experiments import from Task.ts
Addresses review feedback: removes the unused imports from
src/core/task/Task.ts that were left over after removing the
MULTI_FILE_APPLY_DIFF experiment routing code.
- Remove powerSteering from experimentIds array and schema in packages/types
- Remove POWER_STEERING from EXPERIMENT_IDS and experimentConfigsMap
- Remove power steering conditional block from getEnvironmentDetails
- Remove POWER_STEERING entry from all 18 locale settings.json files
- Update related test files to remove power steering references
* Fix EXT-553: Remove percentage-based progress tracking for worktree file copying
- Removed totalBytes from CopyProgress interface
- Removed Math.min() clamping that caused stuck-at-100% issue
- Changed UI from progress bar to spinner with activity indicator
- Shows 'item — X MB copied' instead of percentage
- Updated all 18 locale files
- Uses native cp with polling (no new dependencies)
* fix: translate copyingProgress text in all 17 non-English locale files
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* fix(condense): remove custom condensing model option
Remove the ability to specify a different model/API configuration for
condensing conversations. Modern conversations include provider-specific
data (tool calls, reasoning blocks, thought signatures) that only the
originating model can properly understand and summarize.
Changes:
- Remove condensingApiHandler parameter from summarizeConversation()
- Remove condensingApiConfigId from context management and Task
- Remove API config dropdown for CONDENSE in settings UI
- Update telemetry to remove usedCustomApiHandler parameter
- Update related tests
Users can still customize the CONDENSE prompt text; only model selection
is removed.
* fix: remove condensingApiConfigId from types and test fixtures
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* fix: handle mode selector empty state on workspace switch
When switching between VS Code workspaces, if the current mode from
workspace A is not available in workspace B, the mode selector would
show an empty string. This fix adds fallback logic to automatically
switch to the default "code" mode when the current mode is not found
in the available modes list.
Changes:
- Import defaultModeSlug from @roo/modes
- Add fallback logic in selectedMode useMemo to detect when current
mode is not available and automatically switch to default mode
- Add tests to verify the fallback behavior works correctly
- Export defaultModeSlug in test mock for consistent behavior
* fix: prevent infinite loop by moving fallback notification to useEffect
* fix: prevent infinite loop by using ref to track notified invalid mode
* refactor: clean up comments in ModeSelector fallback logic
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
copy: update /slack page messaging
- Update trial CTA to 'Start a free 14 day Team trial'
- Replace 'humans' with 'your team' in value props subtitle
- Shorten value prop titles for consistent one-line display
- Improve Thread-aware and Open to all descriptions
* feat: warn users when too many MCP tools are enabled
- Add WarningRow component for displaying generic warnings with icon, title, message, and optional docs link
- Add TooManyToolsWarning component that shows when users have more than 40 MCP tools enabled
- Add MAX_MCP_TOOLS_THRESHOLD constant (40)
- Add i18n translations for the warning message
- Integrate warning into ChatView to display after task header
- Add comprehensive tests for both components
Closes ROO-542
* Moves constant to the right place
* Move it to the backend
* i18n
* Add actionlink that takes you to MCP settings in this case
* Add to MCP settings too
* Bump max tools up to 60 since github itself has 50+
* DRY
* Fix test
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* feat: add debug mode toggle to settings
* Update About component with debug mode description
* i18n: add debug mode strings to settings locales
* Update debug mode description in all locales
* fix: post state to webview after debugSetting update
This addresses the review feedback that the debugSetting handler was not
posting updated state back to the webview, which could cause the UI to
stay stale until another state refresh occurred.
* fix: clarify debug mode description to specify task header location
Updated debugMode.description across all 18 locales to clarify that
debug buttons appear in the task header, per review feedback.
* fix: remove redundant postStateToWebview call after debug setting update
* Update src/core/webview/webviewMessageHandler.ts
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
---------
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
The kangaroo logo on the welcome screen had a visual glitch where it would instantly jump to the top position when hovering, instead of smoothly starting the bounce from its resting position.
Changes:
- Added custom smooth-bounce keyframe animation in index.css that explicitly starts from translateY(0)
- Updated RooHero component to use hover state tracking with the new animation
- Removed Tailwind's animate-bounce class which was causing the glitch
The animation now smoothly bounces from the resting position without any jarring visual jumps.
* fix: make command chaining examples shell-aware for Windows compatibility
Addresses Issue #10352 where Roo Code generates Unix-style command
chaining (&&) even on Windows systems using PowerShell or cmd.exe.
Changes:
- Add getCommandChainOperator() to detect the user shell and return
the appropriate command chaining syntax:
- Unix shells (bash, zsh, etc.): &&
- PowerShell: ;
- cmd.exe: &
- Update getRulesSection() to use shell-specific chaining in examples
- Add informative note for non-Unix shells about different syntaxes
- Add comprehensive tests for shell detection and command chaining
* feat: add Unix utility guidance for Windows shells
Addresses feedback from issue #10352 about sed and other Unix-specific
utilities being suggested on Windows. The system prompt now includes
guidance for PowerShell and cmd.exe users to use native alternatives:
PowerShell:
- Select-String instead of grep
- Get-Content instead of cat
- Remove-Item instead of rm
- Copy-Item instead of cp
- Move-Item instead of mv
- -replace operator or [regex] instead of sed
cmd.exe:
- type instead of cat
- del instead of rm
- copy instead of cp
- move instead of mv
- find/findstr instead of grep
* Apply suggestion from @roomote[bot]
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
* fix: use && for cmd.exe to preserve conditional execution semantics
- Update getCommandChainOperator() to return && for cmd.exe (already done)
- Update getCommandChainNote() to document && instead of & for cmd.exe
- Update JSDoc to reflect cmd.exe uses && for conditional execution
- Update tests to expect && for cmd.exe
cmd.exe supports && for conditional execution (run next command only if
previous succeeds), which provides the same semantics as Unix shells.
* fix: update PowerShell note to use && for cmd.exe reference
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
* feat: filter @ mention file search results using .rooignore
- Modify searchFiles case in webviewMessageHandler.ts to filter results using RooIgnoreController
- Use existing RooIgnoreController from current task if available, otherwise create a temporary one
- Respect showRooIgnoredFiles setting to allow users to toggle this behavior
- Add comprehensive test coverage for the new filtering behavior
Fixes#10169
* fix: dispose temporary RooIgnoreController to prevent resource leak
Addresses Rooviewer feedback: the temporary RooIgnoreController created
when no task exists was never disposed, causing file watchers to accumulate.
Changes:
- Track temporary controller separately with tempController variable
- Wrap filtering logic in try/finally block
- Call dispose() in finally block to ensure cleanup
- Add test cases to verify dispose is called for temp controllers
- Verify task's controller is NOT disposed (only temp ones)
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
* feat(web-evals): remember last Roo model selection
* fix(web-evals): reset model selections on provider switch and fix lint warning
- Add useEffect to reset model selections when switching between providers
This prevents OpenRouter model IDs from persisting when switching to Roo,
which was causing Roo's stored selection to be overwritten with wrong IDs
- Remove unused 'executionMethod' from onSubmit dependency array to fix
react-hooks/exhaustive-deps warning
* fix(web-evals): add missing executionMethod to test cases
* fix(web-evals): harden localStorage + keep provider selections
fix: add type check for lastMessage.text before calling startsWith
Fixes#10430
The TTS useEffect was calling .startsWith() on lastMessage.text after only
checking if it was truthy. If text was a non-string truthy value (array,
object, or number), this would crash with "Q.text.startsWith is not a function".
Changed the truthy check to an explicit type check: typeof lastMessage.text === "string"
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: add optional mode field to slash command front matter
- Add mode field to Command interface
- Update command parsing to extract mode from frontmatter
- Modify RunSlashCommandTool to automatically switch mode when specified
- Add comprehensive tests for mode field parsing and switching
- Update existing tests to include mode field
* Make it work for manual slash commands too
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* Add support for skills
* fix: use type-only import for ClineProvider and relative paths in skills section
---------
Co-authored-by: Roo Code <roomote@roocode.com>
- Delete simpleReadFileTool.ts file
- Delete simple-read-file.ts prompt description file
- Delete single-file-read-models.ts types file
- Remove imports and usage from presentAssistantMessage.ts
- Remove imports and usage from prompts/tools/index.ts
- Remove export from packages/types/src/index.ts
This removes all traces of the legacy single-file read tool implementation that was used for specific models. All models now use the standard read_file tool.
Co-authored-by: Roo Code <roomote@roocode.com>
Implements grace retry error handling for 'no assistant messages' API
errors, following the same pattern as PR #10196 for 'no tools used'.
- Add consecutiveNoAssistantMessagesCount counter to Task.ts
- First failure: silent retry (grace retry)
- After 2+ consecutive failures: show MODEL_NO_ASSISTANT_MESSAGES error
- Add UI handling in ChatRow.tsx with ErrorRow component
- Add localized strings to all 18 locale files
- Add comprehensive tests for the grace retry behavior
- Normalize file content to LF after reading to ensure consistent matching
- Normalize search/replace strings to handle CRLF from model output
- Add comprehensive CRLF normalization tests for both tools
- Consistent with existing edit_file tool behavior
* fix: move array-specific properties into anyOf variant in normalizeToolSchema
Fixes read_file tool schema rejection with GPT-5-mini which requires
items property to be inside the { type: 'array' } variant when using
anyOf for nullable arrays.
Resolves ROO-262
* refactor: extract array-specific properties constant and helper function
* feat(types): add defaultToolProtocol: native to providers
- Added supportsNativeTools: true and defaultToolProtocol: native to all chutes models
- Added defaultToolProtocol: native to moonshot models (already had supportsNativeTools)
- Added defaultToolProtocol: native to litellm default model (already had supportsNativeTools)
- Added defaultToolProtocol: native to minimax models (already had supportsNativeTools)
This enables native tool calling by default for these providers, reducing
the number of users falling back to XML tool protocol unnecessarily.
* fix(litellm): merge only native tool defaults with router models
Only merges supportsNativeTools and defaultToolProtocol from litellmDefaultModelInfo,
not prices or other model-specific info that could be incorrect for different models.
Adds userAgentAppId configuration to the BedrockRuntimeClient in the
code indexing embedder, matching the implementation pattern already
used in the main Bedrock API provider.
This enables proper user agent identification in CloudTrail AWS requests
when using Bedrock for code indexing embeddings.
Fixes#10165
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: add metadata to error details dialog
- Prepends extension version, provider, model, and repository info to error details
- Helps users provide better bug reports with context
- Uses useExtensionState and useSelectedModel hooks for data
* Tweaks
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
* feat: add WorkspaceTaskVisibility type and workspaceTaskVisibility property to OrganizationCloudSettings
* refactor: create workspaceTaskVisibilitySchema and derive WorkspaceTaskVisibility type from it
---------
Co-authored-by: Roo Code <roomote@roocode.com>
OpenRouter wraps upstream provider errors in a generic message but includes
the actual error in metadata.raw. This change:
- Adds OpenRouterErrorResponse interface for proper typing
- Creates handleStreamingError() helper for DRY error handling
- Extracts metadata.raw for actionable error messages in PostHog
- Includes nested error structure so getErrorMessage() can extract raw message
Before: PostHog receives '400 Provider returned error' (generic)
After: PostHog receives 'Model xyz not found' (actionable)
This enables proper error tracking and debugging via PostHog telemetry.
* feat: add error details modal with on-demand display
- Add errorDetails prop to ErrorRow component
- Show Info icon on hover in error header when errorDetails is provided
- Display detailed error message in modal dialog on Info icon click
- Add Copy to Clipboard button in error details modal
- Update generic error case to show localized message with details on demand
- Add i18n translations for error details UI
* UI Tweaks
* Properly handles error details
* i18n
* Lighter visual treatment for errors
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
* Add a way to save screenshots from the browser tool
* fix: use cross-platform paths in BrowserSession screenshot tests
* fix: validate screenshot paths to prevent filesystem escape
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Adds a new search_replace tool that performs a single search and replace
operation on a file, requiring the old_string to uniquely identify the
target text with 3-5 lines of context.
Parameters:
- file_path: Path to file (relative or absolute)
- old_string: Text to find (must be unique in file)
- new_string: Replacement text (must differ from old_string)
* fix: add Kimi, MiniMax, and Qwen model configurations for Bedrock
- Add moonshot.kimi-k2-thinking with 32K max tokens and 256K context
- Add minimax.minimax-m2 with 16K max tokens and 230K context
- Add qwen.qwen3-next-80b-a3b with 8K max tokens and 262K context
- Add qwen.qwen3-coder-480b-a35b-v1:0 with 8K max tokens and 262K context
All models configured with native tool support and appropriate pricing.
Fixes#9902
* fix: add preserveReasoning flag and update Kimi K2 context window
- Added preserveReasoning: true to moonshot.kimi-k2-thinking model
- Added preserveReasoning: true to minimax.minimax-m2 model
- Updated Kimi K2 context window from 256_000 to 262_144
These changes ensure:
1. Reasoning traces are properly preserved for both models
2. Roo correctly recognizes task completion
3. Tool calls within reasoning traces are handled appropriately
4. Context window matches AWS Console specification
* fix: update MiniMax M2 context window to 196_608 for Bedrock
Based on AWS CLI testing, the actual context window limit for MiniMax M2
on Bedrock is 196,608 tokens, not 230,000 as initially configured.
* Update packages/types/src/providers/bedrock.ts
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
* Removes Pro, restructures pricing page
* Solves provider/credits
* Update apps/web-roo-code/src/app/pricing/page.tsx
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
* Updates agent landing pages to not mention a trial that doesn't exist
* Updates agent-specific landing pages to reflect new home and trial
* Indicate the agent landing page the user came from
* Clean up the carousel
---------
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
* refactor: remove TabHeader and onDone callback from CloudView
- Removed TabHeader component from CloudView as it is no longer needed
- Removed onDone prop from CloudView component definition and usage
- Updated all test files to reflect the removal of onDone prop
- Kept Button import that was accidentally removed initially
* Updates upsell copy to reflect today's product
* Update webview-ui/src/components/cloud/CloudView.tsx
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* Update webview-ui/src/i18n/locales/ko/cloud.json
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* Update webview-ui/src/i18n/locales/zh-CN/cloud.json
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* Test fixes
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
When tools are called in parallel (e.g., update_todo_list + new_task),
the tool results accumulate in userMessageContent but aren't saved to
API history until all tools complete. When new_task triggers delegation,
the parent is disposed before these pending results are saved, causing
400 errors when the parent resumes (missing tool_result for tool_use).
This fix:
- Adds flushPendingToolResultsToHistory() method in Task.ts that saves
pending userMessageContent to API history
- Calls this method in delegateParentAndOpenChild() before disposing the
parent task
- Safe for both native/XML protocols and sequential/parallel execution
(returns early if there's nothing to flush)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
- Import resolveToolProtocol and TOOL_PROTOCOL from @roo-code/types
- Add tools and tool_choice to completion params when native protocol is enabled
- Handle tool_call_partial chunks in streaming response
- Add comprehensive tests for native tool support
Add supportsNativeTools: true to DeepSeek and Doubao model definitions,
enabling native OpenAI-compatible tool calling for these providers.
Both providers already extend OpenAiHandler which has built-in support
for native tools, so this change is all that's needed to enable the feature.
* feat: add model-specific tool customization via excludedTools and includedTools
- Add excludedTools and includedTools to ModelInfo schema
- Implement applyModelToolCustomization helper to filter tools based on model config
- Integrate model tool filtering into filterNativeToolsForMode for native protocol
- Add comprehensive tests for tool customization functionality
- Wire up modelInfo through buildNativeToolsArray and Task.ts
This allows providers to override which native tools are available on a per-model basis via MODEL_DEFAULTS, enabling better control over tool selection for models with specific needs.
* feat: add customTools for opt-in only tools
- Add customTools array to ToolGroupConfig for defining opt-in only tools
- Update getToolsForMode() to exclude customTools from default tool set
- Modify applyModelToolCustomization() to include customTools only via includedTools
- Add tests for customTools functionality
- Add comprehensive documentation with usage examples
customTools allows defining tools that are NOT available by default,
even when a mode includes their group. These tools are only available
when explicitly included via a model's includedTools configuration.
This enables:
- Gradual rollout of experimental tools
- Model-specific specialized capabilities
- Safe experimentation without affecting default tool sets
* Add assertions for customTools tests per review feedback
* test: add tests for including customTools via includedTools
* Update src/core/prompts/tools/__tests__/filter-tools-for-mode.spec.ts
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
---------
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
The pendingNewTaskToolCallId was being set AFTER startSubtask() returned.
However, startSubtask() contains a 500ms delay during which the subtask
could complete. If the subtask completed during this window, completeSubtask()
would be called before pendingNewTaskToolCallId was set, causing it to
fall through to the XML protocol path and add a text message instead of
a proper tool_result block, breaking the API conversation structure.
This fix moves the pendingNewTaskToolCallId assignment to happen BEFORE
calling startSubtask(), ensuring the ID is set before the subtask starts.
If the subtask creation fails, the pending ID is cleared.
* feat: add AWS Bedrock support for codebase indexing
- Add bedrock as a new EmbedderProvider type
- Add AWS Bedrock embedding model profiles (titan-embed-text models)
- Create BedrockEmbedder class with support for Titan and Cohere models
- Add Bedrock configuration support to config manager and interfaces
- Update service factory to create BedrockEmbedder instances
- Add comprehensive tests for BedrockEmbedder
- Add localization strings for Bedrock support
Closes#8658
* fix: add missing bedrockOptions to loadConfiguration return type
* Fix various issues that the original PR missed.
* Remove debug logs
* Rename AWS Bedrock -> Amazon Bedrock
* Remove some 'as any's
* Revert README changes
* Add translations
* More translations
* Remove leftover code from a debugging session.
* fix: add bedrock to codebaseIndexModelsSchema and update brace-expansion override
- Add bedrock provider to codebaseIndexModelsSchema type definition to fix empty model dropdown in UI
- Update pnpm override for brace-expansion from '>=2.0.2' to '^2.0.2' to resolve ESM/CommonJS compatibility issues
* Improvements to AWS Bedrock embeddings support
- Enhanced bedrock.ts embedder implementation
- Added comprehensive test coverage in bedrock.spec.ts
- Updated config-manager.ts for better Bedrock configuration handling
- Improved service-factory.ts integration
- Updated embeddingModels.ts with Bedrock models
- Enhanced CodeIndexPopover.tsx UI for Bedrock options
- Added auto-populate test for CodeIndexPopover
- Updated pnpm-lock.yaml dependencies
* Restore openrouter config
* Remove debug log
* Fix config-manager.spec.ts unit test.
* Add translations for "optional"
* Revert unnecessary change related to open ia embedder
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Smartsheet-JB-Brown <jb.brown@smartsheet.com>
Added claude-opus-4-5-20251101 to the cache control switch statements
to enable prompt caching, matching the behavior of other Claude models.
Fixes#9567
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: store reasoning in conversation history for all providers
* refactor: address review feedback
- Move comments inside else block
- Combine reasoning checks into single if block
- Make comments more concise
* refactor: make comments more concise
* Fix preserveReasoning flag to control API reasoning inclusion
Changes:
1. Removed hardcoded <think> tag logic in streaming
- Previously hardcoded reasoning into assistant message text
- Now passes reasoning to addToApiConversationHistory as parameter
2. Updated buildCleanConversationHistory to respect preserveReasoning flag
- When preserveReasoning: true → reasoning block included in API requests
- When preserveReasoning: false/undefined → reasoning stripped from API
- Reasoning stored in history for all cases
3. Added temporary debug logs to base-openai-compatible-provider.ts
- Shows preserveReasoning flag value
- Logs reasoning blocks in incoming messages
- Logs <think> tags in converted messages sent to API
* Fix: Use api.getModel() directly instead of cachedStreamingModel
Addresses review comment: cachedStreamingModel is set during streaming but
buildCleanConversationHistory is called before streaming starts. Using the
cached value could cause stale model info when switching models between requests.
Now directly uses this.api.getModel().info.preserveReasoning to ensure we
always check the current model's flag, not a potentially stale cached value.
* Clean up comments in Task.ts
Removed outdated comment regarding model's preserveReasoning flag.
* fix: remove unnecessary reasoningBlock variable in task reasoning logic
- Filter out complete environment_details blocks before appending fresh ones
- Check for both opening and closing tags to ensure we're matching complete blocks
- Prevents stale environment data from being kept during task resume
- Add tests to verify deduplication logic and edge cases
* Improve read_file tool description with examples
- Add explicit JSON structure documentation
- Include three concrete examples (single file, with line ranges, multiple files)
- Clarify that 'path' is required and 'line_ranges' is optional
- Better explain line range format (1-based inclusive)
This addresses agent confusion by providing clear examples similar to the XML tool definition.
* Make read_file tool dynamic based on partialReadsEnabled setting
- Convert read_file from static export to createReadFileTool() factory function
- Add getNativeTools() function that accepts partialReadsEnabled parameter
- Create buildNativeToolsArray() helper to encapsulate tool building logic
- Update Task.ts to build native tools dynamically using maxReadFileLine setting
- When partialReadsEnabled is false, line_ranges parameter is excluded from schema
- Examples and descriptions adjust based on whether line ranges are supported
This matches the behavior of the XML tool definition which dynamically adjusts
its documentation based on settings, reducing confusion for agents.
* Add a RCC credit balance display
* Replace the provider docs with the balance when logged in
* PR feedback
---------
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* fix: Include nativeArgs in tool repetition detection
Fixes false positive 'stuck in a loop' error for native protocol tools
like read_file that store parameters in nativeArgs instead of params.
Previously, the ToolRepetitionDetector only compared the params object,
which was empty for native protocol tools. This caused all read_file
calls to appear identical, triggering false loop detection even when
reading different files.
Changes:
- Updated serializeToolUse() to include nativeArgs in comparison
- Added comprehensive tests for native protocol scenarios
- Maintains backward compatibility with XML protocol tools
Closes: Issue reported in Discord about read_file loop detection
* Try to use safe-stable-stringify in the tool repetition detector
---------
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* Add native tool calling support to OpenAI-compatible
* Fix OpenAI strict mode schema validation by adding converter methods to BaseProvider
- Add convertToolsForOpenAI() and convertToolSchemaForOpenAI() methods to BaseProvider
- These methods ensure all properties are in required array and convert nullable types
- Remove line_ranges from required array in read_file tool (converter handles it)
- Update OpenAiHandler and BaseOpenAiCompatibleProvider to use helper methods
- Eliminates code duplication across multiple tool usage sites
- Fixes: OpenAI completion error: 400 Invalid schema for function 'read_file'
---------
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* fix: format tool responses for native protocol
- Add toolResultFormatting utilities for protocol detection
- ReadFileTool now builds both XML and native formats
- Native format returns clean, readable text without XML tags
- Legacy conversation history conversion is protocol-aware
- All tests passing (55 total)
* refactor: use isNativeProtocol from @roo-code/types
Remove duplicate implementation and import from types package instead
* refactor: centralize toolProtocol configuration checks
- Created src/utils/toolProtocol.ts with getToolProtocolFromSettings() utility
- Replaced all direct vscode.workspace.getConfiguration() calls with centralized utility
- Updated 6 files to use the new utility function
- All tests pass and TypeScript compilation succeeds
* refactor: use isNativeProtocol function from types package
When read_file encountered errors (e.g., file not found), it would call
handleError() which internally calls pushToolResult(), then continue to
call pushToolResult() again with the final XML. In native protocol mode,
this created two tool_result blocks with the same tool_call_id, causing
400 errors on subsequent API calls.
This fix replaces handleError() with task.say() for error notifications.
The agent still receives error details through the XML in the single
final pushToolResult() call.
This change works for both protocols:
- Native: Only one tool_result per tool_call_id (fixes duplicate issue)
- XML: Only one text block with complete XML (cleaner than before)
Agent visibility preserved: Errors are included in the XML response
sent to the agent via pushToolResult().
Tests: All 44 tests passing. Updated test to verify say() is called.
The OpenAI tool schema required both 'path' and 'line_ranges' in FileEntry,
but the TypeScript type definition marks lineRanges as optional. This caused
the AI to fail when trying to read files without specifying line_ranges.
Changes:
- Updated read_file tool schema to only require 'path' parameter
- line_ranges remains available but optional, matching TypeScript types
- Aligns with implementation which treats lineRanges as optional throughout
Fixes issue where read_file tool kept failing with missing parameters.
fix(webview-ui): make Share button popover work by forwarding ref in LucideIconButton
- Convert LucideIconButton to forwardRef so Radix PopoverTrigger(asChild) receives a focusable element
- Enables Share popover and shareCurrentTask flow
- Verified with ShareButton/TaskActions Vitest suites
* fix: filter native tools by mode restrictions
Native tools are now filtered based on mode restrictions before being sent to the API, matching the behavior of XML tools. Previously, all native tools were sent to the API regardless of mode, causing the model to attempt using disallowed tools.
Changes:
- Created filterNativeToolsForMode() and filterMcpToolsForMode() utility functions
- Extracted filtering logic from Task.ts into dedicated module
- Applied same filtering approach used for XML tools in system prompt
- Added comprehensive test coverage (10 tests)
Impact:
- Model only sees tools allowed by current mode
- No more failed tool attempts due to mode restrictions
- Consistent behavior between XML and Native protocols
- Better UX with appropriate tool suggestions per mode
* refactor: eliminate repetitive tool checking using group-based approach
- Add getAvailableToolsInGroup() helper to check tools by group instead of individually
- Refactor filterNativeToolsForMode() to reuse getToolsForMode() instead of duplicating logic
- Simplify capabilities.ts by using group-based checks (60% reduction)
- Refactor rules.ts to use group helper (56% reduction)
- Remove debug console.log statements
- Update tests and snapshots
Benefits:
- Eliminates code duplication
- Leverages existing TOOL_GROUPS structure
- More maintainable - new tools in groups work automatically
- All tests passing (26/26)
* fix: add fallback to default mode when mode config not found
Ensures the agent always has functional tools even if:
- A custom mode is deleted while tasks still reference it
- Mode configuration becomes corrupted
- An invalid mode slug is provided
Without this fallback, the agent would have zero tools (not even
ask_followup_question or attempt_completion), completely breaking it.
* refactor(task): wrap initial user message in <feedback> instead of <task> to prevent focus drift after context-management
Rationale: After a successful context-management event, framing the next user block as feedback reduces model focus drift. Mentions parsing already supports <feedback>, and tool flows (attemptCompletion, responses) are aligned. No change to loop/persistence.
* refactor(mentions): drop <task> parsing; standardize on <feedback>; update tests
openai-native: include reasoning.encrypted_content only when reasoningEffort is set; prevent Responses API error on non-reasoning models. types: remove supportsVerbosity from gpt-5-chat-latest to avoid invalid verbosity error. Fixes#9225
* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API)
Summary
We moved continuity off OpenAI servers and now maintain conversation state locally by persisting and replaying encrypted reasoning items. Requests are stateless (store=false) while retaining the performance/caching benefits of the Responses API.
Why
This aligns with how Roo manages context and simplifies our Responses API implementation while keeping all the benefits of continuity, caching, and latency improvements.
What changed
- All OpenAI models now use the Responses API; system instructions are passed via the top-level instructions field; requests include store=false and include=["reasoning.encrypted_content"].
- We persist encrypted reasoning items (type: "reasoning", encrypted_content, optional id) into API history and replay them on subsequent turns.
- Reasoning summaries default to summary: "auto" when supported; text.verbosity only when supported.
- Atomic persistence via safeWriteJson.
Removed
- previous_response_id flows, suppressPreviousResponseId/skipPrevResponseIdOnce, persistGpt5Metadata(), and GPT‑5 response ID metadata in UI messages.
Kept
- taskId and mode metadata for cross-provider features.
Result
- ZDR-friendly, stateless continuity with equal or better performance and a simpler codepath.
* fix(webview): remove unused metadata prop from ReasoningBlock render
* Responses API: retain response id for troubleshooting (not continuity)
Continuity is stateless via encrypted reasoning items that we persist and replay. We now capture the top-level response id in OpenAiNativeHandler and persist the assistant message id into api_conversation_history.json solely for debugging/correlation with provider logs; it is not used for continuity or control flow.
Also: silence request-body debug logging to avoid leaking prompts.
* remove DEPRECATED tests
* chore: remove unused Task types file to satisfy knip CI
* fix(task): properly type cleanConversationHistory and createMessage args in Task to address Dan's review
- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis
Co-authored-by: Roo Code <roomote@roocode.com>
- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: add Google Tag Manager to marketing website using Next.js Script component
* refactor: remove Google Ads implementation in favor of Tag Manager
* fix: wrap GTM script in consent-checking client component for GDPR compliance
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* changeset version bump
* Revise CHANGELOG for version 3.30.2
Updated changelog for version 3.30.2 with new features and fixes.
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Aligns claude-opus-4-1-20250805 max token limit with claude-opus-4-20250514,
both models now supporting 32K output tokens (overridable to 8K when
enableReasoningEffort is false).
Fixes#9045
Co-authored-by: Roo Code <roomote@roocode.com>
* fix: keep pinned models fixed at top of scrollable list
- Separated pinned and unpinned configs into different containers
- Pinned configs now stay fixed at the top
- Only unpinned configs are scrollable
- Added tests to verify the fixed behavior
Fixes#8812
* fix: resolve sticky header visual artifact in ApiConfigSelector
- Changed sticky header background from bg-vscode-editorWidget-background to bg-vscode-dropdown-background to match popover container
- Moved separator logic into sticky container as conditional bottom border to prevent scroll artifacts
- Updated tests to match new separator structure
- All 21 tests passing
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
- Add PathTooltip component that wraps StandardTooltip with proper styling
- Use maxWidth='min(300px,100vw)' via inline style to override defaults
- Apply '[text-wrap:wrap]' class to override text-balance behavior
- Add formatPathTooltip helper for consistent path content formatting
- Update CodeAccordian, ChatRow, and BatchFilePermission to use PathTooltip
- Centralizes tooltip behavior and reduces duplication
Supersedes PR #8797.
* fix: eliminate UI flicker during task cancellation
- Modify ClineProvider.createTaskWithHistoryItem() to detect when rehydrating current task
- Implement in-place task replacement to avoid empty stack state that causes UI flicker
- Add comprehensive unit tests for flicker-free cancel behavior
- Maintain backward compatibility and proper event listener cleanup
Fixes the jarring navigation to home view when cancelling tasks
* fix: ensure proper garbage collection of old task during flicker-free rehydration
- Call abortTask(true) on old task before replacement to stop processes and mark as abandoned
- This ensures proper cleanup and prevents memory leaks during task cancellation
- Add test verification for abortTask cleanup
* feat: implement Google Consent Mode v2 with cookieless pings
- Add consent defaults before gtag.js loads (required for Consent Mode v2)
- Enable cookieless pings with url_passthrough for Google Ads
- Implement consent update logic for all consent categories
- Support both granted and denied consent states
- Maintain backward compatibility with existing consent manager
* fix: remove shouldLoad from useEffect dependency array to prevent re-initialization loop
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: add OpenRouter embedding provider support
Implement comprehensive OpenRouter embedding provider support for codebase indexing with the following features:
- New OpenRouterEmbedder class with full API compatibility
- Support for OpenRouter's OpenAI-compatible embedding endpoint
- Rate limiting and retry logic with exponential backoff
- Base64 embedding handling to bypass OpenAI package limitations
- Global rate limit state management across embedder instances
- Configuration updates for API key storage and provider selection
- UI integration for OpenRouter provider settings
- Comprehensive test suite with mocking
- Model dimension support for OpenRouter's embedding models
This adds OpenRouter as the 7th supported embedding provider alongside OpenAI, Ollama, OpenAI-compatible, Gemini, Mistral, and Vercel AI Gateway.
* Add translation key
* Fix mutex double release bug
* Add translations
* Add more translations
* Fix failing tests
* code-index(openrouter): fix HTTP-Referer header to RooCodeInc/Roo-Code; i18n: add and wire OpenRouter Code Index strings; test: assert default headers in embedder
---------
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* feat: convert Chutes to dynamic/router provider
- Add chutes to dynamicProviders array in provider-settings
- Add chutes entry to dynamicProviderExtras in api.ts
- Create fetcher function for Chutes models API
- Convert ChutesHandler to extend RouterProvider
- Update tests to work with dynamic provider setup
- Export chutesDefaultModelInfo for RouterProvider constructor
* fix: address security and code quality issues from review
- Fix potential API key leakage in error logging
- Add temperature support check before setting temperature
- Improve code consistency with RouterProvider patterns
* fix: add chutes to routerModels initialization
- Fix TypeScript error in webviewMessageHandler
- Ensure chutes is included in RouterName Record type
* Fixes
* Support reasoning
* Fix tests
* Remove reasoning checkbox
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* feat: improve @ file search for large projects
- Increase default file limit from 5,000 to 10,000 (configurable up to 500,000)
- Respect VSCode search settings (useIgnoreFiles, useGlobalIgnoreFiles, useParentIgnoreFiles)
- Add 'maximumIndexedFilesForFileSearch' configuration setting
- Add tests for new functionality
Conservative default of 10k keeps memory usage low while still providing 2x
improvement. Users with large projects can opt-in to higher limits (up to 500k).
This is a simplified alternative to PR #5723 that solves the same problem
without the complexity of caching. Ripgrep is already fast enough for
10k+ files, and the benefit of caching doesn't justify 2,200+ lines of
additional code and maintenance burden.
Fixes#5721
* fix: add missing translations for maximumIndexedFilesForFileSearch setting
* test: improve file-search tests to verify configuration behavior
- Update McpView.tsx to use "logs" tab ID instead of "errors"
- Rename translation key from tabs.errors to tabs.logs in all locales
- Change empty state message from "No errors found" to "No logs yet"
This better reflects that the tab shows all server messages (info, warnings, errors), not just errors.
Fixes#8893
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: add zai-glm-4.6 model and update gpt-oss-120b for Cerebras
- Add zai-glm-4.6 with 128K context window and 40K max tokens
- Set zai-glm-4.6 as default Cerebras model
- Update gpt-oss-120b to 128K context and 40K max tokens
* feat: add zai-glm-4.6 model to Cerebras provider
- Add zai-glm-4.6 with 128K context window and 40K max tokens
- Set zai-glm-4.6 as default Cerebras model
- Model provides ~2000 tokens/s for general-purpose tasks
* add [SOON TO BE DEPRECATED] warning for Q3C
* chore: set gpt-oss-120b as default Cerebras model
* Fix cerebras test: update expected default model to gpt-oss-120b
* Apply suggestion from @mrubens
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
---------
Co-authored-by: kevint-cerebras <kevin.taylor@cerebras.net>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* fix: prevent MCP server restart when toggling tool permissions
Add isProgrammaticUpdate flag to distinguish between programmatic config
updates and user-initiated file changes. Skip file watcher processing
during programmatic updates to prevent unnecessary server restarts.
* fix(mcp): prevent server reconnection when toggling disabled state
Fixed bug where MCP servers would reconnect instead of staying disabled when toggled off. The issue was that toggleServerDisabled() used stale in-memory config instead of reading the fresh config from disk after writing the disabled flag.
Changes:
Added readServerConfigFromFile() helper to read and validate server config from disk
Updated disable path to read fresh config before calling connectToServer()
Updated enable path to read fresh config before calling connectToServer()
This ensures the disabled: true flag is properly read, causing connectToServer() to create a disabled placeholder connection instead of actually connecting the server.
+ refactor(mcp): use safeWriteJson for atomic config writes
Replace JSON.stringify + fs.writeFile with safeWriteJson in McpHub.ts
to prevent data corruption through atomic writes with file locking.
* fix(mcp): prevent race condition in isProgrammaticUpdate flag
Replace multiple independent reset timers with a single timer that gets
cleared and rescheduled on each programmatic config update. This prevents
the flag from being reset prematurely when multiple rapid updates occur,
which could cause unwanted server restarts during the file watcher's
debounce period.
+ fix(mcp): ensure isProgrammaticUpdate flag cleanup with try-finally
Wrap safeWriteJson() calls in try-finally blocks to guarantee the
isProgrammaticUpdate flag is always reset, even if the write operation
fails. This prevents the flag from being stuck at true indefinitely,
which would cause subsequent user-initiated config changes to be
silently ignored.
* feat: update Gemini models with latest 09-2025 versions
- Add gemini-flash-latest and gemini-flash-lite-latest models
- Add gemini-2.5-flash-preview-09-2025 and gemini-2.5-flash-lite-preview-09-2025
- Reorganize models list with most recent versions at the top
- Maintain all existing models for backward compatibility
Fixes#8485
* fix: restore missing maxThinkingTokens and supportsReasoningBudget for gemini-2.5-pro-preview-03-25
Backward compatibility regression fix - these properties were accidentally
removed during reorganization and are required to preserve existing
reasoning-budget controls for users pinned to this model version.
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* feat: Add supportsReasoning property for Z.ai GLM binary thinking mode
- Add supportsReasoning to ModelInfo schema for binary reasoning models
- Update GLM-4.5 and GLM-4.6 models to use supportsReasoning: true
- Implement thinking parameter support in ZAiHandler for Deep Thinking API
- Update ThinkingBudget component to show simple toggle for supportsReasoning models
- Add comprehensive tests for binary reasoning functionality
Closes#8465
* refactor: rename supportsReasoning to supportsReasoningBinary for clarity
- Rename supportsReasoning -> supportsReasoningBinary in model schema
- Update Z.AI GLM model configurations to use supportsReasoningBinary
- Update Z.AI provider logic in createStream and completePrompt methods
- Update ThinkingBudget UI component and tests
- Update all test comments and expectations
This change improves naming clarity by distinguishing between:
- supportsReasoningBinary: Simple on/off reasoning toggle
- supportsReasoningBudget: Advanced reasoning with token budget controls
- supportsReasoningEffort: Advanced reasoning with effort levels
* Use monotonic clock for rate limiting
* Fix LiteLLM test failures after merge
- Remove supportsComputerUse from LiteLLM implementation as it's no longer part of ModelInfo interface
- Update test expectations to include cacheWritesPrice and cacheReadsPrice fields
- Fix test for max_output_tokens preference functionality
---------
Co-authored-by: Christiaan Arnoldus <christiaan.arnoldus@outlook.com>
* changeset version bump
* Update CHANGELOG for version 3.29.1 release
Updated version number and added release notes for 3.29.1.
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
- Add responsive breakpoint at 300px for compact view
- Icon correctly reflects state (X when off, ✓ when on) at all screen sizes
- Show abbreviated labels on very narrow screens (< 300px)
- Add triggerLabelOffShort translation key to all locales
Fixes issues from PR #8152:
- Icon always showing checkmark on narrow screens
- Breakpoint activating too early (was 400px)
- Incorrect Tailwind class ordering
* feat(zai): add GLM-4.5-X, AirX, Flash; sync with Z.ai docs; keep canonical api line keys
* feat(zai): add GLM-4.5V vision model (supportsImages, pricing, 16K max output); add tests
* feat(types,zai): sync Z.AI international model map and tests
- Update pricing, context window, and capabilities for:
glm-4.5-x, glm-4.5-airx, glm-4.5-flash, glm-4.5v, glm-4.6
- Add glm-4-32b-0414-128k
- Align tests with new model specs
* fix(zai): align handler generics with expanded model ids to satisfy CI compile step
* chore(zai): remove tier pricing blocks for Z.ai models
* fix(zai): simplify names in zaiApiLineConfigs for clarity
* chore(zai): set default temperature to 0.6
---------
Co-authored-by: Roo Code <roomote@roocode.com>
chore(gpt5): stop persisting instructions/reasoning_summary in UI message metadata
Problem: ui_messages.json was getting bloated with unused or duplicated content (system 'instructions' and 'reasoning_summary') that we do not read back. Root cause: earlier OpenAI Responses API implementation persisted these fields to per-message metadata; however, 'instructions' are already sent as top-level request instructions and 'reasoning_summary' is surfaced live via streaming events. Neither field is consumed from storage. Changes: (1) Task.persistGpt5Metadata now stores only previous_response_id; (2) removed instructions and reasoning_summary from types; (3) updated Zod schema; (4) persistence layer writes messages as-is (no sanitizer); (5) tests green. Impact: smaller ui_messages.json, no runtime behavior change for requests. Migration: old metadata fields will be ignored by schema.
* Adds mention of Cloud agents to /pricing
* Credit pricing FAQ
* Skeleton of a /cloud page and more pricing page tweaks
* Lint
* Update apps/web-roo-code/src/app/cloud/page.tsx
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
* Code review
* Updates copy to new credit system
* Moves Terms of Service to be backed by a markdown file, easier to read/edit/diff
* Updated ToS
* Twerm copy tweaks
* Cloud screenshot and style adjustments
* Style tweaks
* Styles
---------
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
* fix(editor): prevent file editing issues when git diff views are open
Add scheme checks to ensure only file:// URIs are matched when finding editors,
avoiding issues with git diffs and other schemes. Includes error logging for
failed editor lookups.
* Remove the warnings
* fix(editor): enforce file:// scheme in editor lookups to prevent git diff issues
---------
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* changeset version bump
* Revise changelog for version 3.28.12
Updated version number and consolidated patch notes.
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Fixes#8371 - Updates the model ID from anthropic.claude-4.5-sonnet-v1:0
to anthropic.claude-sonnet-4-5-20250929-v1:0 to match AWS Bedrock naming convention
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: add telemetry tracking to DismissibleUpsell component
- Added UPSELL_DISMISSED and UPSELL_CLICKED events to TelemetryEventName enum
- Updated DismissibleUpsell component to track clicks and dismissals with telemetry
- Added telemetry tests to DismissibleUpsell test suite
- Events include upsellId in the payload for tracking specific upsells
* refactor(webview): make handleDismiss synchronous in DismissibleUpsell
test(webview): add scenario where dismissOnClick=true without onClick tracks only UPSELL_DISMISSED; update tests; all tests passing locally
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* fix: apply tiered pricing for Gemini models via Vertex AI
- Modified calculateCost method to handle models where cacheReadsPrice is only defined in tiers
- Added comprehensive tests for Vertex AI tiered pricing calculation
- Fixes issue where local cost calculation always showed highest tier rates
Fixes#8017
* Delete src/api/providers/__tests__/vertex-tiered-pricing.spec.ts
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
* Updating the privacy policy to allow us to send onboarding and occasional marketing emails.
* docs: Clarified unsubscribe behavior and updated the Last Updated date
* docs: update Last Updated date in Privacy Policy page
- Updated regex pattern to support optional dash prefix (e.g., "- [ ] Task")
- Added comprehensive test coverage for both formats
- Fixes issue where todo lists with dash prefixes were not being parsed correctly
Fixes#8054
Co-authored-by: Roo Code <roomote@roocode.com>
* fix: transform keybindings command references in nightly build
The keybindings section was not being transformed during the nightly build process, causing command+y keybinding to reference the wrong command name (roo-cline.addToContext instead of roo-code-nightly.addToContext).
- Added keybindings schema to types.ts
- Updated generatePackageJson to transform keybindings command references
- This ensures keybindings work correctly in the nightly build
* fix: only include keybindings in output when they exist
Updated generatePackageJson to conditionally add keybindings to avoid including undefined values in the generated package.json. Fixed eslint-disable comment placement.
---------
Co-authored-by: Roo Code <roomote@roocode.com>
feat: add organizationFeaturesSchema with roomoteControlEnabled
- Add organizationFeaturesSchema with optional roomoteControlEnabled boolean
- Integrate features property into organizationSettingsSchema as optional
- Add comprehensive tests for new schema validation
- Maintain backward compatibility with existing organization settings
Co-authored-by: Roo Code <roomote@roocode.com>
* docs: overhaul README for clarity and impact
* fix: update badge links and styles in README for improved visibility
* docs(README): stronger CTAs for Discord/Reddit; restore Modes/Roles incl. cloud agents
* docs(readme): add support CTA; refine modes section; clarify custom modes wording
- add centered help/links CTA under badges: [README.md](README.md:8-10)
- expand feature list to explicitly include modes: [README.md](README.md:45)
- rename section header “Modes and Roles” → “Modes”: [README.md](README.md:52)
- update wording to “Custom Modes: build specialized modes for your team or workflow”: [README.md](README.md:60)
* docs: implement @jdilla1277 suggestions for English README
- Updated header to "Your AI-Powered Dev Team, Right in Your Editor" (removed Cline reference)
- Changed line 44 to "Generate Code from natural language descriptions and specs" for better SEO
- Removed "not the other way around" phrase from line 54
- Replaced "Cloud Agents" with "Roomote Control" on line 61
As requested by @hannesrudolph, these changes are only applied to the English README.
* docs: clarify Roomote Control description and update related links in README
* Reworked the contributor list. Made translastion corrections.
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* feat(cloud): Add telemetry retry queue for network resilience
- Implement RetryQueue class with workspace-scoped persistence
- Queue failed telemetry events for automatic retry
- Retry events every 60 seconds with fresh auth tokens
- FIFO eviction when queue reaches 100 events
- Persist queue across VS Code restarts
This ensures telemetry data isn't lost during network failures or temporary server issues.
Migrated from RooCodeInc/Roo-Code-Cloud#744
* fix: address PR review feedback for retry queue
- Fix retry order to use consistent FIFO processing
- Add retry limit enforcement with max retries check
- Add configurable request timeout (default 30s)
- Add comprehensive tests for retryAll() method
- Add request-max-retries-exceeded event
- Fix timeout test to avoid timing issues
* fix: resolve TypeScript errors in RetryQueue tests
* fix(cloud): Address PR feedback for telemetry retry queue
- Handle HTTP error status codes (500s, 401/403, 429) as failures that trigger retry
- Remove queuing of backfill operations since they're user-initiated
- Fix race condition in concurrent retry processing with isProcessing flag
- Add specialized retry logic for 429 with Retry-After header support
- Clean up unnecessary comments
- Add comprehensive tests for new status code handling
- Add temporary debug logs with emojis for testing
* refactor: address PR feedback for telemetry retry queue
- Remove unused X-Organization-Id header from auth header provider
- Simplify enqueue() API by removing operation parameter
- Fix error retry logic: only retry 5xx, 429, and network failures
- Stop retrying 4xx client errors (400, 401, 403, 404, 422)
- Implement queue-wide pause for 429 rate limiting
- Add auth state management integration:
- Pause queue when not in active-session
- Clear queue on logout or user change
- Preserve queue when same user logs back in
- Remove debug comments
- Fix ESLint no-case-declarations error with proper block scope
- Update tests for all new behaviors
* First pass at separate upsell dialog
* Revert PR #7188 - Restore temperature parameter to fix TabbyApi/ExLlamaV2 crashes (#7594)
* fix: reduce CodeBlock button z-index to prevent overlap with popovers (#7783)
Fixes#7703 - CodeBlock language dropdown and copy button were appearing above popovers due to z-index: 100. Reduced to z-index: 40 to maintain proper layering hierarchy while keeping buttons functional.
* Make ollama models info transport work like lmstudio (#7679)
* feat: add click-to-edit, ESC-to-cancel, and fix padding consistency for chat messages (#7790)
* feat: add click-to-edit, ESC-to-cancel, and fix padding consistency
- Enable click-to-edit for past messages by making message text clickable
- Add ESC key handler to cancel edit mode in ChatTextArea
- Fix padding consistency between past and queued message editors
- Adjust right padding for edit mode to accommodate cancel button
Fixes#7788
* fix: adjust padding and layout for ChatTextArea in edit mode
* refactor: replace hardcoded pr-[72px] with standard Tailwind pr-20 class
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* Let people paste in the auth redirect url (#7805)
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Bruno Bergher <me@brunobergher.com>
* fix: resolve chat message edit/delete duplication issues (#7793)
* fix: add GIT_EDITOR env var to merge-resolver mode for non-interactive rebase (#7819)
* UI: Render reasoning as plain italic (match <thinking>) (#7752)
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* Add taskSyncEnabled to userSettingsConfigSchema (#7827)
feat: add taskSyncEnabled to userSettingsConfigSchema
Co-authored-by: Roo Code <roomote@roocode.com>
* Release: v1.75.0 (#7829)
chore: bump version to v1.75.0
* fix: prevent negative cost values and improve label visibility in evals chart (#7830)
Co-authored-by: Roo Code <roomote@roocode.com>
* Fix Groq context window display (#7839)
* feat: add DismissibleUpsell component for dismissible messages
- Created DismissibleUpsell component with variant support (banner/default)
- Added dismissedUpsells to GlobalState for persistence
- Implemented message handlers for dismissing and retrieving dismissed upsells
- Added comprehensive tests for the component
- Uses VSCode extension globalState for persistent storage
* fix: Apply PR feedback for DismissibleUpsell component
- Changed from className to separate 'id' and 'className' props for better semantics
- Added i18n support for accessibility labels (aria-label and title)
- Fixed memory leak by adding mounted flag to prevent state updates after unmount
- Fixed race condition by sending dismiss message before hiding component
- Fixed inefficient array operations in webviewMessageHandler
- Added comprehensive test coverage for edge cases including:
- Multiple rapid dismissals
- Component unmounting during async operations
- Invalid/malformed message handling
- Proper message sending before unmount
- Added null checks for message data to handle edge cases gracefully
* New Cloud upsell dialog in task share and cloud view, shared component
* Properly working DismissibleUpsell
* Working upsell for long-running tasks
* CTA in AutoApproveMenu
* Home page CTA
* Fixes the autoapprove upsell and some tests
* Visual and copy fixes
* Test fix
* Translations
* Stray className attribute
* Cloud view fixes in a left-aligned layout
* Removes unnecessary test
* Less flaky tests
* Fixes sharebutton behavior and updates associated tests
* Update webview-ui/src/i18n/locales/it/cloud.json
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* Fix dismissed flicker
* Fix long task upsell
---------
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: ItsOnlyBinary <ItsOnlyBinary@users.noreply.github.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* feat: separate Task Sync and Roomote Control settings
- Add new taskSyncEnabled setting to control task content syncing
- Keep remoteControlEnabled for Roomote Control functionality
- Task Sync controls whether task content is sent to cloud
- Roomote Control controls whether cloud can send instructions back
- Roomote Control now depends on Task Sync being enabled
- Usage metrics (tokens, cost) always reported regardless of settings
- Update UI with two separate toggles and clear descriptions
- Add info text explaining usage metrics are always reported
* feat: add missing translations for Task Sync and Roomote Control settings
- Added taskSync, taskSyncDescription, remoteControlRequiresTaskSync, and usageMetricsAlwaysReported keys to all non-English cloud.json files
- Updated cloudBenefit keys to match English structure
- Ensured all languages have consistent translation keys for the new Task Sync and Roomote Control features
* Cloud: cleanup taskSyncEnabled additions
* fix: correct indentation localization files
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: add click-to-edit, ESC-to-cancel, and fix padding consistency
- Enable click-to-edit for past messages by making message text clickable
- Add ESC key handler to cancel edit mode in ChatTextArea
- Fix padding consistency between past and queued message editors
- Adjust right padding for edit mode to accommodate cancel button
Fixes#7788
* fix: adjust padding and layout for ChatTextArea in edit mode
* refactor: replace hardcoded pr-[72px] with standard Tailwind pr-20 class
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Fixes#7703 - CodeBlock language dropdown and copy button were appearing above popovers due to z-index: 100. Reduced to z-index: 40 to maintain proper layering hierarchy while keeping buttons functional.
* feat(checkpoints): create checkpoint on user message send
* fix(checkpoints): suppress implicit user-message checkpoint row; keep current checkpoint updated without a chat row
* Fix checkpoint suppression for user messages
- Propagate suppressMessage flag through event chain properly
- Update ChatView to check checkpoint metadata for suppressMessage flag
- Ensure checkpoint messages are created but not rendered when suppressed
- Fix bug where checkpointSave(false) should have been checkpointSave(true)
* fix: only create checkpoint on user message when files have changed
- Changed allowEmpty from true to false in checkpointSave call
- Checkpoints will now only be created when there are actual file changes
- This avoids creating empty commits in the shadow git repository
* test: update checkpoint test to include suppressMessage parameter
- Fixed test expectation to match the new function signature
- saveCheckpoint now expects both allowEmpty and suppressMessage parameters
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
* fix: handle array paths from VSCode terminal profiles
- Updated terminal profile interfaces to support string | string[] for path property
- Added normalizeShellPath helper to safely extract first element from array paths
- Modified isShellAllowed to handle both string and array inputs
- Updated getWindowsShellFromVSCode, getMacShellFromVSCode, and getLinuxShellFromVSCode to use normalizeShellPath
- Added comprehensive tests for array path handling
Fixes#7695
* feat: add validateShellPath export for robust shell validation
- Created validateShellPath as a public API for shell path validation
- Refactored internal validation logic into isShellAllowedInternal
- Added comprehensive test coverage for all edge cases
- Maintains backward compatibility with deprecated isShellAllowed
- Handles arrays, strings, null, undefined, and nested arrays gracefully
* Simplify roomote's work a little
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
* fix: improve WelcomeView styling and readability
- Reduced excessive padding from p-16 to p-6
- Removed excessive bold text throughout
- Made provider cards more compact with smaller icons (32x32px)
- Increased introduction text size from text-sm to text-base for better visibility
- Centered the main greeting title
- Improved visual hierarchy with proper text sizing and spacing
- Added subtle borders and improved color contrast
* fix: remove undefined color class from incentive text
Removed the text-vscode-warningForeground class as it wasn't defined in index.css. The incentive text now uses default color which looks good.
Fixes issue where isWriteProtected was incorrectly passed as the partial flag
to task.ask(), causing "Current ask promise was ignored (#1)" error.
Both tools now use the askApproval wrapper function which correctly handles
the parameter ordering, passing undefined for progressStatus and isWriteProtected
as the fourth parameter.
Fixes#7648
Co-authored-by: Roo Code <roomote@roocode.com>
* fix: preserve scroll position when switching tabs in settings
* ui(settings): restore scroll synchronously to prevent flicker; dx(ui): name TabContent for clearer DevTools
---------
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
* fix: add cache reporting support for OpenAI-Native provider
- Add normalizeUsage method to properly extract cache tokens from Responses API
- Support both detailed token shapes (input_tokens_details) and legacy fields
- Calculate cache read/write tokens with proper fallbacks
- Include reasoning tokens when available in output_tokens_details
- Ensure accurate cost calculation using uncached input tokens
This fixes the issue where caching information was not being reported
when using the OpenAI-Native provider with the Responses API.
* fix: improve cache token normalization and add comprehensive tests
- Add fallback to derive total input tokens from details when totals are missing
- Remove unused convertToOpenAiMessages import
- Add comment explaining cost calculation alignment with Gemini provider
- Add comprehensive test coverage for normalizeUsage method covering:
- Detailed token shapes with cached/miss tokens
- Legacy field names and SSE-only events
- Edge cases including missing totals with details-only
- Cost calculation with uncached input tokens
* fix: address PR review comments
- Remove incorrect fallback to missFromDetails for cache write tokens
- Fix cost calculation to pass total input tokens (calculateApiCostOpenAI handles subtraction)
- Improve readability by extracting cache detail checks to intermediate variables
- Remove redundant ?? undefined
- Update tests to reflect correct behavior (miss tokens are not cache writes)
- Add clarifying comments about cache miss vs cache write tokens
* feat: add Ollama API key support for Turbo mode
- Add ollamaApiKey field to ProviderSettings schema
- Add ollamaApiKey to SECRET_STATE_KEYS for secure storage
- Update Ollama and NativeOllama providers to use API key for authentication
- Add UI field for Ollama API key (shown when custom base URL is provided)
- Add test coverage for API key functionality
This enables users to use Ollama Turbo with datacenter-grade hardware by providing an API key for authenticated Ollama instances or cloud services.
* fix: use VSCodeTextField for Ollama API key field
Remove non-existent ApiKeyField import and use standard VSCodeTextField with password type, matching other provider implementations
* Add missing translation keys for Ollama API key support
- Add providers.ollama.apiKey and providers.ollama.apiKeyHelp to all 18 language files
- Support for authenticated Ollama instances and cloud services
- Relates to PR #7425
* refactor: improve type safety for Ollama client configuration
- Replace 'any' type with proper OllamaOptions (Config) type
- Import Config type from ollama package for better type checking
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
* feat: optimize memory usage for image handling in webview
- Replace base64 image data with webview URIs to reduce memory footprint
- Add proper resource roots to webview for workspace file access
- Implement convertToWebviewUri method for safe file-to-URI conversion
- Update ImageViewer to handle both webview URIs and file paths separately
- Add image message type for proper image rendering in chat
- Improve error handling and display for failed image loads
- Add comprehensive tests for ImageViewer component
- Format display paths as relative for better readability
This change significantly reduces memory usage by avoiding base64 encoding
of images and instead using VSCode's webview URI system for direct file
access. Images are now loaded on-demand from disk rather than being held
in memory as base64 strings.
* fix: address PR review comments
- Use safeJsonParse instead of JSON.parse in ChatRow.tsx
- Add type definition for parsed image info
- Add more specific error types in ClineProvider.ts
- Add comprehensive JSDoc comments to ImageBlock.tsx
- Improve error handling and type safety
* fix: address MrUbens' review comments
- Remove hardcoded 'rc1' pattern in formatDisplayPath, use generic workspace detection
- Internationalize 'No image data' text using i18n system
* chore: remove useless comment
* chore(i18n): add image.noData to all locales to fix translation check
* test: update ImageViewer.spec to align with i18n key and flexible path formatting
- Use CloudService.getUserSettings() for remoteControlEnabled instead of global state
- Update CloudService.updateUserSettings when toggling remote control
- Add BridgeOrchestrator.connectOrDisconnect handling in settings update handler
- Remove dependency on contentProxy/globalSettings for remote control state
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
By default, all of the tests run in silent mode with monkey-patched the console logging so no console logging will ever appear in test output.
This confuses the agent- sometimes it will add console logging to help it debug things, and it won't see the logs that it expects.
Adds src/utils/vitest-verbosity.ts to handle verbosity resolution and console logging.
Modifies src/vitest.config.ts and webview-ui/vitest.config.ts to integrate the new verbosity control.
Removes manual console suppression from src/vitest.setup.ts and webview-ui/vitest.setup.ts as it's now handled dynamically.
Co-authored-by: Chris Hasson <noreply@example.com>
- Remove: Roo Code Cloud and eval infrastructure from the extension, CLI, workflows, and package surfaces so the release is focused on the standalone extension (PR #12328 by @mrubens)
- Remove: All telemetry collection and analytics plumbing across the extension, website, shared types, provider flows, and related tests (PR #12324 by @mrubens)
- Remove: MDM and organization membership enforcement, including host wiring, webview state, user-facing messages, and locale strings (PR #12323 by @mrubens)
- Remove: The MCP marketplace, marketplace services, webview marketplace UI, package contributions, and related localized copy (PR #12326 by @mrubens)
- Update: Extension-facing support, diagnostics, and announcement content for the final Roo Code release, including GitHub help paths and links to Roomote, ZooCode, and Cline (PR #12341 by @brunobergher)
- Add: A cleaned docs app with GitHub Pages deployment support (PR #12344 by @brunobergher)
- Fix: Configure the docs GitHub Pages base URL so deployed assets and canonical paths load correctly under the repository Pages path (PR #12370 by @mrubens)
- Update: Point docs links in the root README, localized READMEs, and web app copy to the current GitHub Pages docs URL (PR #12371 by @mrubens)
- Remove: Stale `roocode.github.io` docs references, including the old CNAME and outdated docs README and robots.txt URLs (PR #12372 by @mrubens)
- Update: The website to focus almost entirely on the Roo Code extension and remove cloud, team, enterprise, provider, pricing, Slack, and Linear product pages (PR #12180 by @brunobergher)
- Remove: Contributor, community, social channel, and tutorial references from README files, docs, website copy, issue templates, and workflows (PR #12347 by @brunobergher)
description:Report a specific problem that needs solving in Roo Code
labels:["proposal","enhancement"]
name:Enhancement Request
description:Propose an improvement in plain language focused on user benefit
labels:["enhancement"]
title:"[ENHANCEMENT] "
body:
- type:markdown
attributes:
value:|
**Thankyou for submitting a feature request for Roo Code!**
This template helps you describe problems that need solving. Focus on the problem - the Roo team will work to design solutions unless you want to contribute the implementation yourself.
**Qualityover speed:** We prefer detailed, clear problem descriptions over quick ones. Vague requests often get closed or require multiple rounds of clarification, which wastes everyone's time.
**Beforesubmitting:**
- Search existing [Issues](https://github.com/RooCodeInc/Roo-Code/issues) and [Discussions](https://github.com/RooCodeInc/Roo-Code/discussions) to avoid duplicates
- For general ideas, use [GitHub Discussions](https://github.com/RooCodeInc/Roo-Code/discussions/categories/feature-requests) instead of this template.
- type:markdown
attributes:
value:|
## ❌ Common mistakes that lead to request rejection:
- **Vagueproblem descriptions:** "UI is bad" -> Should be: "Submit button is invisible on dark theme"
- **Missinguser impact:** "This would be cool" -> Should explain who benefits and how
- **Nospecific context:** Describe exactly when and how the problem occurs
Thank you for helping improve Roo Code!
Please focus on the problem and the desired behavior in plain language.
- type:textarea
id:problem-description
id:problem
attributes:
label:What specific problem does this solve?
description:|
**Beconcrete and detailed.** Explain the problem from a user's perspective.
✅ **Good examples (specific, clear impact):**
- "When running large tasks, users wait 5+ minutes because tasks execute sequentially instead of in parallel, blocking productivity"
- "AI can only read one file per request, forcing users to make multiple requests for multi-file projects, increasing wait time from 30s to 5+ minutes"
- "Dark theme users can't see the submit button because it uses white text on light grey background"
❌ **Poor examples (vague, unclear impact):**
- "The UI looks weird"-> What specifically looks weird? On which screen? What's the impact?
- "System prompt is not good"-> What's wrong with it? What behaviour does it cause? What should it do instead?
- "Performance could be better"-> Where? How slow is it currently? What's the user impact?
**Yourproblem description should answer:**
- Who is affected? (all users, specific user types, etc.)
- When does this happen? (specific scenarios/steps)
- What's the current behaviour vs expected behaviour?
- What's the impact? (time wasted, errors caused, etc.)
placeholder:Be specific about the problem, who it affects, and the impact. Avoid generic statements like "it's slow" or "it's confusing."
label:Problem (one or two sentences)
description:What problem are users facing?
placeholder:e.g., "Users often click Copy Run by mistake and duplicate runs unintentionally."
validations:
required:true
- type:textarea
id:context
attributes:
label:Context (who is affected and when)
description:Who encounters this and in what situation?
placeholder:e.g., "Happens when browsing the Runs list; most visible for new users."
validations:
required:true
- type:textarea
id:additional-context
id:desired
attributes:
label:Additional context (optional)
description:Mockups, screenshots, links, user quotes, or other relevant information that supports your proposal.
label:Desired behavior (conceptual, not technical)
description:Describe what should happen in simple terms.
placeholder:e.g., "Ask for confirmation before copying a run."
validations:
required:true
- type:textarea
id:roo-code-tasks
id:constraints
attributes:
label:Roo Code Task Links (Optional)
description:|
If you used Roo Code to explore this feature request or develop solutions, share the public task links here.
This helps maintainers understand the context and any exploration you've done.
Example:https://app.roocode.com/share/task-id
placeholder:Paste your Roo Code share links here, one per line
label:Constraints / preferences (optional)
description:Any considerations like performance, accessibility, or UX expectations.
placeholder:e.g., "Keep it quick and unobtrusive; keyboard accessible."
- type:checkboxes
id:checklist
@ -74,128 +50,42 @@ body:
options:
- label:I've searched existing Issues and Discussions for duplicates
required:true
- label:This describes a specific problem with clear impact and context
- label:This describes a specific problem with clear context and impact
required:true
- type:textarea
id:roo-code-tasks
attributes:
label:Roo Code Task Links (optional)
description:If you explored this with Roo Code, share public task links for context.
placeholder:Paste your Roo Code share links here, one per line
**🎯Just reporting a problem?** You can click "Submit new issue" right now! The sections below are only needed if you want to contribute a solution via pull request.
**⚠️Only continue if you want to:**
- Propose a specific solution design
- Implement the feature yourself via pull request
- Provide technical analysis to help with implementation
**Forcontributors who continue:**
- A maintainer (especially @hannesrudolph) will review this proposal. **Do not start implementation until approved and assigned.** We're a small team with limited resources, so every code addition needs careful consideration. We're always happy to receive clear, actionable proposals though!
- Join [Discord](https://discord.gg/roocode) and DM **Hannes Rudolph** (`hrudolph`) for guidance on implementation
- Check our [Roadmap](https://github.com/orgs/RooCodeInc/projects/1/views/1?query=sort%3Aupdated-desc+is%3Aopen&filterQuery=is%3Aissue%2Copen%2Cclosed+label%3A%22feature+request%22+status%3A%22Issue+%5BUnassigned%5D%22%2C%22Issue+%5BIn+Progress%5D%22) to see open feature requests ready to be implemented or currently being worked on
- type:checkboxes
id:willingness-to-contribute
attributes:
label:Interested in implementing this?
description:|
**Important:**If you check "Yes" below, the technical sections become REQUIRED.
We need detailed technical analysis from contributors to ensure quality implementation.
options:
- label:Yes,I'd like to help implement this feature
required:false
- type:checkboxes
id:implementation-approval
attributes:
label:Implementation requirements
options:
- label:I understand this needs approval before implementation begins
required:false
- type:textarea
id:proposed-solution
attributes:
label:How should this be solved? (REQUIRED if contributing, optional otherwise)
description:|
**Ifyou want to implement this feature, this section is REQUIRED.**
**Describeyour solution in detail.** Explain not just what to build, but how it should work.
✅ **Good examples:**
- "Add parallel task execution: Allow up to 3 tasks to run simultaneously with a queue system for additional tasks. Show progress for each active task in the UI."
- "Enable multi-file AI processing: Modify the request handler to accept multiple files in a single request and process them together, reducing round trips."
- "Fix button contrast: Change submit button to use primary colour on dark theme (white text on blue background) instead of current grey."
❌ **Poor examples:**
- "Make it faster"-> How? What specific changes?
- "Improve the UI"-> Which part? What specific improvements?
- "Fix the prompt"-> What should the new prompt do differently?
**Yoursolution should explain:**
- What exactly will change?
- How will users interact with it?
- What will the new behaviour look like?
placeholder:Describe the specific changes and how they will work. Include user interaction details if relevant.
Optional:You can stop here if you're just proposing the improvement.
- type:textarea
id:acceptance-criteria
attributes:
label:How will we know it works? (Acceptance Criteria - REQUIRED if contributing, optional otherwise)
description:|
**Ifyou want to implement this feature, this section is REQUIRED.**
**Thisis crucial - don't skip it.** Define what "working" looks like with specific, testable criteria.
**Formatsuggestion:**
```
Given [context/situation]
label:Acceptance criteria (optional)
description:Define what “working” looks like with specific, testable outcomes.
placeholder:|
Given [context]
When [user action]
Then [expected result]
And [additional expectations]
But [what should NOT happen]
```
**Example:**
```
Given I have 5 large tasks to run
When I start all of them
Then they execute in parallel (max 3 at once, can be configured)
And I see progress for each active task
And queued tasks show "waiting" status
But the UI doesn't freeze or become unresponsive
```
placeholder:|
Define specific, testable criteria. What should users be able to do? What should happen? What should NOT happen?
Use the Given/When/Then format above or your own clear structure.
- type:textarea
id:technical-considerations
id:proposed-solution
attributes:
label:Technical considerations (REQUIRED if contributing, optional otherwise)
description:|
**Ifyou want to implement this feature, this section is REQUIRED.**
Share technical insights that could help planning:
- Implementation approach or architecture changes
- Performance implications
- Compatibility concerns
- Systems that might be affected
- Potential blockers you can foresee
placeholder:e.g., "Will need to refactor task manager", "Could impact memory usage on large files", "Requires a large portion of code to be rewritten"
label:Proposed approach (optional)
description:If you have an idea, describe it briefly in plain language.
- type:textarea
id:trade-offs-and-risks
id:risks
attributes:
label:Trade-offs and risks (REQUIRED if contributing, optional otherwise)
description:|
**Ifyou want to implement this feature, this section is REQUIRED.**
What could go wrong or what alternatives did you consider?
- Alternative approaches and why you chose this one
const comment = commentIdentifier + '\n🚀 **Preview deployed!**\n\nYour changes have been deployed to Vercel:\n\n**Preview URL:** ' + deploymentUrl + '\n\nThis preview will be updated automatically when you push new commits to this PR.';
description: "Create a new release of the Roo Code extension"
argument-hint: patch | minor | major
mode: code
---
1. Identify the SHA corresponding to the most recent release using GitHub CLI: `gh release view --json tagName,targetCommitish,publishedAt`
@ -16,25 +17,29 @@ argument-hint: patch | minor | major
[list of changes]
```
- Always include contributor attribution using format: (thanks @username!)
- For PRs that close issues, also include the issue number and reporter: "- Fix: Description (#123 by @reporter, PR by @contributor)"
- For PRs without linked issues, use the standard format: "- Add support for feature (thanks @contributor!)"
- Always include contributor attribution and the PR number: use "(PR #<prNumber> by @username)".
- For PRs that close issues, include both the issue number and the PR number and authors: "- Fix: Description (#123 by @reporter, PR#456 by @contributor)"
- For PRs without linked issues, include the PR number and author: "- Add support for feature (PR #456 by @contributor)"
- Provide brief descriptions of each item to explain the change
- Order the list from most important to least important
- Example formats:
- With issue: "- Fix: Resolve memory leak in extension (#456 by @issueReporter, PR by @prAuthor)"
- Without issue: "- Add support for Gemini 2.5 Pro caching (thanks @contributor!)"
- With issue: "- Fix: Resolve memory leak in extension (#456 by @issueReporter, PR#789 by @prAuthor)"
- Without issue: "- Add support for Gemini 2.5 Pro caching (PR #789 by @contributor)"
- CRITICAL: Include EVERY SINGLE PR in the changeset - don't assume you know which ones are important. Count the total PRs to verify completeness and cross-reference the list to ensure nothing is missed.
6. If a major or minor release:
6. If the generate_image tool is available, create a release image at `releases/[version]-release.png`
- The image should feature a realistic-looking kangaroo doing something human-like that relates to the main highlight of the release
- Pass `releases/template.png` as the reference image for aspect ratio and kangaroo style
- Add the generated image to .changeset/v[version].md before the list of changes with format: ``
7. If a major or minor release:
- Ask the user what the three most important areas to highlight are in the release
- Update the English version relevant announcement files and documentation (webview-ui/src/components/chat/Announcement.tsx, README.md, and the `latestAnnouncementId` in src/core/webview/ClineProvider.ts)
- Ask the user to confirm that the English version looks good to them before proceeding
- Use the new_task tool to create a subtask in `translate` mode with detailed instructions of which content needs to be translated into all supported languages (The READMEs as well as the translation strings)
7. Create a new branch for the release preparation: `git checkout -b release/v[version]`
8. Commit and push the changeset file and any documentation updates to the repository: `git add . && git commit -m "chore: add changeset for v[version]" && git push origin release/v[version]`
9. Create a pull request for the release: `gh pr create --title "Release v[version]" --body "Release preparation for v[version]. This PR includes the changeset and any necessary documentation updates." --base main --head release/v[version]`
10. The GitHub Actions workflow will automatically:
8. Create a new branch for the release preparation: `git checkout -b release/v[version]`
9. Commit and push the changeset file and any documentation updates to the repository: `git add . && git commit -m "chore: add changeset for v[version]" && git push origin release/v[version]`
10. Create a pull request for the release: `gh pr create --title "Release v[version]" --body "Release preparation for v[version]. This PR includes the changeset and any necessary documentation updates." --base main --head release/v[version]`
11. The GitHub Actions workflow will automatically:
- Create a version bump PR when changesets are merged to main
- Update the CHANGELOG.md with proper formatting
- Publish the release when the version bump PR is merged
description: "Resolve merge conflicts intelligently using git history analysis"
argument-hint: "#PR-number"
mode: merge-resolver
---
Resolve merge conflicts for a specific pull request by analyzing git history, commit messages, and code changes to make intelligent resolution decisions.
## Quick Start
1. **Provide a PR number** (e.g., `#123` or just `123`)
2. The workflow will automatically:
- Fetch PR information (title, description, branches)
- Checkout the PR branch
- Rebase onto the target branch to reveal conflicts
description: "Translate and localize strings in the Roo Code extension"
argument-hint: "[language-code or 'all'] [string-key or file-path]"
mode: translate
---
Perform translation and localization tasks for the Roo Code extension. This command activates the translation workflow with comprehensive i18n guidelines.
## Quick Start
1. **Identify the translation scope:**
- If a specific language code is provided (e.g., `de`, `zh-CN`), focus on that language
- If `all` is specified, translate to all supported languages
- If a string key is provided, locate and translate that specific string
- If a file path is provided, work with that translation file
When debugging the CLI, `console.log` will break the TUI (Terminal User Interface). Use file-based logging to capture debug output without interfering with the application's display.
## File-Based Logging Strategy
1. **Write logs to a temporary file instead of console**:
- Create a log file at a known location, e.g., `/tmp/roo-cli-debug.log`
- Use `fs.appendFileSync()` to write timestamped log entries
- Example logging utility:
```typescript
import fs from "fs"
const DEBUG_LOG = "/tmp/roo-cli-debug.log"
function debugLog(message: string, data?: unknown) {
# Authentication System - Feature Extraction Report
## Executive Summary
The authentication system is a JWT-based security implementation that handles user registration, login, session management, and access control. It provides a comprehensive user experience with visual feedback, accessibility features, and robust error handling.
This extraction report provides comprehensive details about the authentication system's current implementation. The system offers a complete user experience with visual feedback, accessibility features, and robust security measures. Key areas for user documentation include the multi-step registration process, session management features, and security policies. The technical implementation uses industry-standard JWT tokens with proper security measures.
</content>
<line_count>354</line_count>
</write_to_file>
]]></tool_use>
</step>
</workflow>
<key_takeaways>
<takeaway>Use flexible discovery methods - directory exploration and pattern search are primary tools</takeaway>
<takeaway>Comprehensive UI/UX analysis is essential for complete documentation</takeaway>
<takeaway>Document visual elements, interactions, and user feedback mechanisms</takeaway>
<takeaway>Include accessibility and responsive design considerations</takeaway>
<takeaway>Semantic search (codebase_search) is optional for deeper insights when needed</takeaway>
<takeaway>Organize findings to support documentation team's work</takeaway>
Verify user-provided documentation about authentication UI/UX against the actual implementation.
</scenario>
<workflow>
<stepnumber="1">
<description>User provides documentation to verify</description>
<user_input>
"Please verify our login documentation:
'The login form provides a seamless experience with instant validation. Users see a green checkmark when their email is valid. The password field includes a strength indicator. After 3 failed attempts, users must wait 5 minutes before trying again.'"
</user_input>
</step>
<stepnumber="2">
<description>Analyze the documentation claims</description>
<analysis>
Claims to verify:
- Instant email validation with green checkmark
- Password strength indicator on login
- 3 failed attempts triggers 5-minute wait
</analysis>
</step>
<stepnumber="3">
<description>Find login UI components using directory exploration</description>
<tool_use><![CDATA[
<list_files>
<path>src/components</path>
<recursive>false</recursive>
</list_files>
]]></tool_use>
<tool_use><![CDATA[
<search_files>
<path>src/components</path>
<regex>Login|SignIn|Auth.*Form</regex>
<file_pattern>*.tsx</file_pattern>
</search_files>
]]></tool_use>
</step>
<stepnumber="4">
<description>Examine login form implementation</description>
<tool_use><![CDATA[
<read_file>
<args>
<file>
<path>src/components/LoginForm.tsx</path>
</file>
<file>
<path>src/components/LoginForm.css</path>
</file>
</args>
</read_file>
]]></tool_use>
<findings>
- Email validation exists but shows red X, not green checkmark
- No password strength indicator on login form (only on registration)
- Documentation implies more visual feedback than implemented
- Color scheme in docs doesn't match actual theme
- Missing documentation for error message styling
## Conclusion
The documentation needs updates to accurately reflect the current login experience. The actual implementation is more security-focused (5 attempts, 15-min lockout) but less visually rich (no success indicators) than documented.
</content>
<line_count>95</line_count>
</write_to_file>
]]></tool_use>
</step>
</workflow>
<key_takeaways>
<takeaway>Always verify UI/UX claims against actual component implementation</takeaway>
<takeaway>Check both visual elements and behavioral logic</takeaway>
<takeaway>Look for undocumented features that users might expect</takeaway>
<takeaway>Provide specific corrections with code references</takeaway>
<takeaway>Consider the impact of inaccuracies on user experience</takeaway>
</key_takeaways>
</example>
<examplename="api_endpoint_extraction">
<scenario>
Extract comprehensive API documentation including endpoints, request/response formats, and error handling.
</scenario>
<workflow>
<stepnumber="1">
<description>Discover API structure using flexible methods</description>
<tool_use><![CDATA[
<!-- Method 1: Look for common API directories -->
<list_files>
<path>src</path>
<recursive>false</recursive>
</list_files>
]]></tool_use>
<tool_use><![CDATA[
<list_files>
<path>src/api</path>
<recursive>true</recursive>
</list_files>
]]></tool_use>
</step>
<stepnumber="2">
<description>Find all API routes using pattern search</description>
<command>gh api repos/[owner]/[repo]/issues/[issue-number] --jq '{number,title,body,state,labels,assignees,milestone,createdAt:.created_at,updatedAt:.updated_at,closedAt:.closed_at,author:.user.login}'</command>
</execute_command>
If the command fails with an authentication error (e.g., "gh: Not authenticated" or "HTTP 401"), ask the user to authenticate:
<syntax>gh api repos/[owner]/[repo]/issues/[issue-number] --jq '{number,title,body,state,labels,assignees,milestone,createdAt:.created_at,updatedAt:.updated_at,closedAt:.closed_at,author:.user.login}'</syntax>
<command>gh api repos/octocat/hello-world/issues/123 --jq '{number,title,body,state,labels,assignees,milestone,createdAt:.created_at,updatedAt:.updated_at,closedAt:.closed_at,author:.user.login}'</command>
</execute_command>
</example>
</command>
<commandname="gh_issue_comments">
<purpose>Get additional context and requirements from issue comments</purpose>
<purpose>Get additional context and requirements from issue comments.</purpose>
<when>Always use after viewing issue to see full discussion</when>
<description>Draft a comment for the GitHub issue that explains your findings and suggested solution in a conversational, human-like tone.</description>
<description>Draft a comment for the GitHub issue that explains your findings and suggested solution in a conversational, human-like tone. Start the comment with "Hey @roomote-agent,".</description>
<description>Formulate a solution and draft a comment.</description>
<draft>
"Hey, I took a look at this issue and it seems like the problem is in the `handleLogin` function in `src/auth/login.ts`. There's an empty `try...catch` block that is likely catching the login error and preventing any message from being shown to the user.
"Hey @roomote-agent, I took a look at this issue and it seems like the problem is in the `handleLogin` function in `src/auth/login.ts`. There's an empty `try...catch` block that is likely catching the login error and preventing any message from being shown to the user.
A good first step to fixing this would be to add some logging to the `catch` block to see what error is actually happening. Then, we should probably implement proper error feedback to the user on the login page. This should solve the issue of the silent failure."
This mode assembles a template-free issue body grounded by codebase exploration and can submit it via GitHub CLI after explicit confirmation.
Submission uses Title and Body only and targets the detected repository after the merged Review and Submit step.
</mode_scope>
<mode_behavior>
- CRITICAL: This mode assumes the user's FIRST message is already an issue description
- Do NOT ask "What would you like to do?" or "Do you want to create an issue?"
- Immediately start the issue creation workflow when the user begins talking
- Treat their initial message as the problem/feature description
- Begin with repository detection and codebase discovery right away
- The user is already in "issue creation mode" by choosing this mode
- Treat the user's FIRST message as the issue description; do not ask if they want to create an issue.
- Start with repository detection (verify git repo; resolve OWNER/REPO from origin), then determine repository structure (monorepo/standard).
- After detection, begin codebase discovery scoped to the repository root or the selected package (in monorepos).
- Keep final output non-technical; implementation details remain internal.
</mode_behavior>
<template_usage>
- ALWAYS check for repository-specific issue templates before creating issues
- Use templates from .github/ISSUE_TEMPLATE/ directory if they exist
- Parse both YAML (.yml/.yaml) and Markdown (.md) template formats
- If multiple templates exist, let the user choose the appropriate one
- If no templates exist, create a simple generic template on the fly
- NEVER fall back to hardcoded templates - always use repo templates or generate minimal ones
- Respect template metadata like labels, assignees, and title patterns
- Fill templates intelligently using gathered information from codebase exploration
</template_usage>
<problem_reporting_focus>
- Focus on helping users describe problems clearly, not solutions
- The project team will design solutions unless the user explicitly wants to contribute
- Don't push users to provide technical details they may not have
- Make it easy for non-technical users to report issues effectively
CRITICAL: Lead with user impact:
- Always explain WHO is affected and WHEN the problem occurs
- Use concrete examples with actual values, not abstractions
- Show before/after scenarios with specific data
- Example: "Users trying to [action] see [actual result] instead of [expected result]"
</problem_reporting_focus>
<fact_driven_verification>
- ALWAYS verify user claims against actual code implementation
- For feature requests, aggressively check if current behavior matches user's description
- If code shows different intent than user describes, it might be a bug not a feature
- Present code evidence when challenging user assumptions
- Do not be agreeable - be fact-driven and question discrepancies
- Continue verification until facts are established
- A "feature request" where code shows the feature should already work is likely a bug
CRITICAL additions for thorough analysis:
- Trace data flow from where values are created to where they're used
- Look for existing variables/functions that already contain needed data
- Check if the issue is just missing usage of existing code
- Follow imports and exports to understand data availability
- Identify patterns in similar features that work correctly
</fact_driven_verification>
<general_practices>
- Always search for existing similar issues before creating a new one
- Check for and use repository issue templates before creating content
- Include specific version numbers and environment details
- Use code blocks with syntax highlighting for code snippets
- Make titles descriptive but concise (e.g., "Dark theme: Submit button invisible due to white-on-grey text")
- For bugs, always test if the issue is reproducible
- Include screenshots or mockups when relevant (ask user to provide)
- Link to related issues or PRs if found during exploration
CRITICAL: Use concrete examples throughout:
- Show actual data values, not just descriptions
- Include specific file paths and line numbers
- Demonstrate the data flow with real examples
- Bad: "The value is incorrect"
- Good: "The function returns '123' when it should return '456'"
</general_practices>
<contributor_specific>
- Only perform issue scoping if user wants to contribute
- Reference specific files and line numbers from codebase exploration
- Ensure technical proposals align with project architecture
- Include implementation steps and issue scoping
- Provide clear acceptance criteria in Given/When/Then format
- Consider trade-offs and alternative approaches
CRITICAL: Prioritize simple solutions:
- ALWAYS check if needed functionality already exists before proposing new code
- Look for existing variables that just need to be passed/used differently
- Prefer using existing patterns over creating new ones
- The best fix often involves minimal code changes
- Example: "Use existing `modeInfo` from line 234 in export" vs "Create new mode tracking system"
</contributor_specific>
<backwards_compatibility_focus>
ALWAYS consider backwards compatibility:
- Think about existing data/configurations already in use
- Propose solutions that handle both old and new formats gracefully
- Consider migration paths for existing users
- Document any breaking changes clearly
- Prefer additive changes over breaking changes when possible
</backwards_compatibility_focus>
<value_framing>
<principles>
- Always pair the problem with user-facing value: who is impacted, when it occurs, and why it matters.
- Keep value non-technical (clarity, time saved, fewer errors, better UX, improved accessibility, reduced confusion).
</principles>
<lightweight_impact_options>
- Severity: Blocker | High | Medium | Low (optional)
- Reach: Few | Some | Many (optional)
</lightweight_impact_options>
</value_framing>
<sourcing_and_provenance>
<direct_from_user_only>
- Reproduction steps
- Variations tried
- Environment details
</direct_from_user_only>
<inference_allowed_with_care>
- Problem/Value statement (plain-language synthesis from user wording)
- Context (who/when) based on user input; keep code-based signals internal
</inference_allowed_with_care>
<hallucination_guards>
- Never fabricate “Variations tried.” If not provided, omit.
- If critical details are missing, ask targeted questions; otherwise proceed with omissions.
</hallucination_guards>
</sourcing_and_provenance>
<cli_submission>
<confirmation>
Use a single merged "Review and Submit" step with options:
- Submit now
- Submit now and assign to me
Any other response is treated as a change request and the step is rerun after applying edits.
</confirmation>
<repo_detection>
Submission requires repository detection (git present, origin configured). Capture normalized OWNER/REPO (e.g., owner/repo) and store as [OWNER_REPO] for submission.
</repo_detection>
<target_repo>
Always specify the target using --repo "[OWNER_REPO]" to avoid ambiguity and ensure the correct repository is used.
</target_repo>
<assignment>
When "Submit now and assign to me" is chosen, create using: --assignee "@me".
If creation with --assignee fails (e.g., permissions), create the issue without an assignee and immediately run:
Use --body with robust quoting (for example: --body "$(printf '%s\n' "[ISSUE_BODY]")") or a heredoc; do not create temporary files or reference file paths. Always include --repo "[OWNER_REPO]" and echo the resulting issue URL.
In execute_command calls, output only the command string; never include XML tags, CDATA markers, code fences, or backticks in the command payload.
</command_safety>
<error_handling>
On gh errors (installation/auth), present the error and offer to retry after fixing gh setup. Surface the computed Title and Body inline
so the user can submit manually if needed.
</error_handling>
</cli_submission>
<codebase_exploration>
<principles>
- Use semantic search first to find relevant areas.
- Refine with targeted regex for exact strings (errors, component names, flags).
- Read key files to verify behavior; keep evidence internal.
- Early-stop when hits converge (~70%) or you can name the exact feature/component.
- Escalate-once if signals conflict; run one refined batch, then proceed.
- At each review stage, present the full current issue details (Title + Body) in a markdown code block.
- Offer "Submit now" or "Submit now and assign to me" suggestions; treat any other response as a change request and rerun the step after applying edits.
</review_stage_presentation>
<autonomy_and_budgets>
- Tool preambles: restate goal briefly, outline a short plan, narrate progress succinctly, summarize final delta.
- One-tool-per-message: await results before continuing.
- Discovery budget: default max 3 searches before escalate-once; stop when sufficient.
- Early-stop: when top hits converge or target is identifiable.
- Verbosity: low narrative; detail appears only in structured outputs.
</autonomy_and_budgets>
<communication_guidelines>
- Be supportive and encouraging to problem reporters
- Don't overwhelm users with technical questions upfront
- Clearly indicate when technical sections are optional
- Guide contributors through the additional requirements
- Make the "submit now" option clear for problem reporters
- When presenting template choices, include template descriptions to help users choose
- Explain that you're using the repository's own templates for consistency
- Be direct and concise; avoid jargon in the final issue body.
- Keep questions optional and easy to answer with suggested options.
- Emphasize WHO is affected and WHEN it happens.
</communication_guidelines>
<template_best_practices>
<practicename="template_detection">
Always check these locations in order:
1. .github/ISSUE_TEMPLATE/*.yml or *.yaml (GitHub form syntax)
- Skipping repository detection (git + origin) before discovery or submission
- Not validating repository context before gh commands
</mode_initialization_mistakes>
<scope_mistakes>
- Submitting without explicit user confirmation ("Submit now")
- Targeting the wrong repository by relying on current directory defaults; always pass --repo OWNER/REPO detected in Step 2
- Performing PR prep, complexity estimates, or technical scoping
</scope_mistakes>
<submission_mistakes>
<mistake_block>
<mistake>Splitting final review and submission into multiple steps</mistake>
<impact>Creates redundant prompts and inconsistent state; leads to janky UX</impact>
<correct_approach>Use a single merged "Review and Submit" step offering only: Submit now, Submit now and assign to me; treat any other response as a change request</correct_approach>
</mistake_block>
<mistake_block>
<mistake>Not offering "Submit now and assign to me"</mistake>
<correct_approach>Provide the assignment option and use gh issue create --assignee "@me"; if that fails, immediately run gh issue edit <issue-url-or-number> --add-assignee "@me"</correct_approach>
</mistake_block>
<mistake_block>
<mistake>Using temporary files or --body-file for issue body submission</mistake>
<impact>Introduces filesystem dependencies and leaks paths; contradicts single-command policy</impact>
<correct_approach>Use inline --body with robust quoting, e.g., --body "$(printf '%s\n' "[ISSUE_BODY]")"; do not reference any file paths</correct_approach>
</mistake_block>
<mistake_block>
<mistake>Omitting --repo or relying on current directory defaults</mistake>
<impact>May submit to the wrong repository in multi-repo or worktree contexts</impact>
<correct_approach>Always pass --repo [OWNER_REPO] detected in Step 2</correct_approach>
</mistake_block>
<mistake_block>
<mistake>Attempting submission without prior repository detection</mistake>
<impact>Commands may target the wrong repo or fail</impact>
<correct_approach>Detect git repo and ensure origin is configured before any gh commands</correct_approach>
</mistake_block>
</submission_mistakes>
<sourcing_mistakes>
<mistake_block>
<mistake>Inventing or inferring “Variations tried” when the user didn’t provide any</mistake>
<impact>Misleads triage and wastes time reproducing non-existent attempts</impact>
<correct_approach>Omit the “Variations tried” line entirely unless explicitly provided; if needed, ask a targeted question first</correct_approach>
</mistake_block>
<mistake_block>
<mistake>Framing only the problem without the value/impact</mistake>
<impact>Makes prioritization harder; obscures who benefits and why it matters</impact>
<correct_approach>Pair the problem with a plain-language value statement (who, when, why it matters)</correct_approach>
</mistake_block>
<mistake_block>
<mistake>Overstating impact without user signal</mistake>
<impact>Damages credibility and misguides prioritization</impact>
<correct_approach>Use conservative, plain language; if unsure, omit severity/reach or ask a single targeted question</correct_approach>
</mistake_block>
</sourcing_mistakes>
<problem_reporting_mistakes>
- Vague descriptions like "doesn't work" or "broken"
- Missing reproduction steps for bugs
- Feature requests without clear problem statements
- Not explaining the impact on users
- Forgetting to specify when/how the problem occurs
- Using wrong labels or no labels
- Titles that don't summarize the issue
- Not checking for duplicates
- Vague descriptions like "doesn't work" without who/when impact
Examples of assembling template-free issue prompts grounded by codebase exploration, with optional CLI submission after explicit confirmation.
Repository detection precedes submission; review and submission occur in a single merged step offering "Submit now" or "Submit now and assign to me". Any other response is treated as a change request.
</overview>
<examplename="bug_dark_theme_button_invisible">
<user_input>
In dark theme the Submit button is almost invisible on the New Run page.
If a change request is provided, collect the requested edits, update the draft (re-run discovery if new info affects context), then rerun this merged step.
<policy>Issues are template-free (Title + Body only).</policy>
<policy>Repository detection (git + origin → OWNER/REPO) occurs before submission and is passed explicitly via --repo [OWNER_REPO].</policy>
<policy>Never use --body-file or temporary files; submit with inline --body only (no file paths).</policy>
<policy>Review and submission happen in one merged step offering "Submit now" or "Submit now and assign to me"; any other response is treated as a change request.</policy>
<policy>All discovery is internal; keep final output plain-language.</policy>
Edit the test mode to add support for performance testing and benchmarking
</scenario>
<user_request>
I want to edit the test mode to add benchmark testing capabilities
</user_request>
<workflow>
<stepnumber="1">
<description>Determine user intent and clarify scope</description>
<tool_use><![CDATA[
<ask_followup_question>
<question>I understand you want to edit the test mode to add performance testing capabilities. Before we proceed, let me confirm the scope of changes. What specific performance testing features do you need?</question>
<follow_up>
<suggest>Add benchmark testing with Vitest's bench API</suggest>
<suggest>Include performance profiling and memory usage tracking</suggest>
<suggest>Add load testing capabilities for API endpoints</suggest>
<suggest>All of the above - comprehensive performance testing suite</suggest>
</follow_up>
</ask_followup_question>
]]></tool_use>
<expected_outcome>User selected: Add benchmark testing with Vitest's bench API</expected_outcome>
</step>
<stepnumber="2">
<description>Immerse in existing test mode configuration</description>
<tool_use><![CDATA[
<read_file>
<path>.roomodes</path>
</read_file>
]]></tool_use>
<analysis>Found test mode configuration with current roleDefinition and file restrictions</analysis>
</step>
<stepnumber="3">
<description>Explore existing test mode instructions</description>
<tool_use><![CDATA[
<list_files>
<path>.roo/rules-test</path>
<recursive>true</recursive>
</list_files>
]]></tool_use>
<tool_use><![CDATA[
<read_file>
<path>.roo/rules-test/1_workflow.xml</path>
</read_file>
]]></tool_use>
<analysis>Understood current test workflows and patterns</analysis>
</step>
<stepnumber="4">
<description>Validate changes for cohesion</description>
<tool_use><![CDATA[
<ask_followup_question>
<question>I've analyzed the test mode. Adding benchmark testing would require:
1. Updating the roleDefinition to include performance testing expertise
2. Modifying file restrictions to include .bench.ts files
3. Adding new workflow instructions for benchmark creation
4. Including Vitest bench API examples
This aligns well with the existing testing focus. Should I proceed with all these changes?</question>
<follow_up>
<suggest>Yes, implement all the changes as described</suggest>
<suggest>Start with just the roleDefinition and file restrictions</suggest>
<suggest>Focus only on the workflow instructions first</suggest>
<suggest>Let me review the specific changes before proceeding</suggest>
</follow_up>
</ask_followup_question>
]]></tool_use>
<expected_outcome>User selected: Yes, implement all the changes as described</expected_outcome>
</step>
<stepnumber="5">
<description>Update mode configuration in .roomodes</description>
<tool_use><![CDATA[
<apply_diff>
<path>.roomodes</path>
<diff>
<<<<<<< SEARCH
roleDefinition: |-
You are Roo, a Vitest testing specialist with deep expertise in: - Writing and maintaining Vitest test suites - Test-driven development (TDD) practices - Mocking and stubbing with Vitest - Integration testing strategies - TypeScript testing patterns - Code coverage analysis - Test performance optimization
=======
roleDefinition: |-
You are Roo, a Vitest testing specialist with deep expertise in: - Writing and maintaining Vitest test suites - Test-driven development (TDD) practices - Mocking and stubbing with Vitest - Integration testing strategies - TypeScript testing patterns - Code coverage analysis - Test performance optimization - Benchmark testing with Vitest bench API - Performance profiling and optimization - Memory usage analysis in tests
>>>>>>> REPLACE
</diff>
</apply_diff>
]]></tool_use>
</step>
<stepnumber="6">
<description>Update file restrictions to include benchmark files</description>
<practice>Use meaningful benchmark names that describe what's being measured</practice>
<practice>Include baseline comparisons when optimizing code</practice>
<practice>Run benchmarks in isolation to avoid interference</practice>
<practice>Document performance expectations and thresholds</practice>
</best_practices>
</benchmark_testing_guide>
</content>
<line_count>38</line_count>
</write_to_file>
]]></tool_use>
</step>
<stepnumber="8">
<description>Validate all changes for consistency</description>
<tool_use><![CDATA[
<ask_followup_question>
<question>I've completed all the changes to add benchmark testing capabilities to the test mode:
1. ✓ Updated roleDefinition to include benchmark expertise
2. ✓ Modified file restrictions to include .bench.ts files
3. ✓ Created new benchmark workflow instructions
4. ✓ Added Vitest bench API examples
All changes are cohesive and align with the existing test mode structure. Would you like me to test any specific aspect of these changes?</question>
<follow_up>
<suggest>Test creating a new benchmark file to verify file permissions</suggest>
<suggest>Review the complete changes one more time</suggest>
<suggest>Everything looks good, the mode is ready</suggest>
<suggest>Create a simple benchmark example to test</suggest>
</follow_up>
</ask_followup_question>
]]></tool_use>
</step>
</workflow>
<completion><![CDATA[
<attempt_completion>
<result>
I've successfully enhanced the test mode with benchmark testing capabilities:
1. Updated the roleDefinition to include:
- Benchmark testing with Vitest bench API
- Performance profiling and optimization
- Memory usage analysis in tests
2. Modified file restrictions to include .bench.ts files, allowing the mode to create and edit benchmark files
3. Created new workflow instructions at .roo/rules-test/5_benchmark_testing.xml with:
- Basic benchmark patterns
- Best practices for performance testing
- Example code using Vitest's bench API
All changes have been validated for cohesion and consistency with the existing test mode structure. The mode now supports comprehensive performance testing alongside its existing unit and integration testing capabilities.
</result>
</attempt_completion>
]]></completion>
<key_takeaways>
<takeaway>Always immerse yourself in the existing mode before making changes</takeaway>
<takeaway>Use ask_followup_question aggressively to clarify scope and validate changes</takeaway>
<takeaway>Validate all changes for cohesion and consistency</takeaway>
<takeaway>Update all relevant parts: configuration, file restrictions, and instructions</takeaway>
<takeaway>Test changes to ensure they work as expected</takeaway>
Guidelines for thoroughly validating mode changes to ensure cohesion,
consistency, and prevent contradictions across all mode components.
</overview>
<validation_principles>
<principlename="comprehensive_review">
<description>
Every change must be reviewed in context of the entire mode
</description>
<checklist>
<item>Read all existing XML instruction files</item>
<item>Verify new changes align with existing patterns</item>
<item>Check for duplicate or conflicting instructions</item>
<item>Ensure terminology is consistent throughout</item>
</checklist>
</principle>
<principlename="aggressive_questioning">
<description>
Use ask_followup_question extensively to clarify ambiguities
</description>
<when_to_ask>
<scenario>User's intent is unclear</scenario>
<scenario>Multiple interpretations are possible</scenario>
<scenario>Changes might conflict with existing functionality</scenario>
<scenario>Impact on other modes needs clarification</scenario>
</when_to_ask>
<example><![CDATA[
<ask_followup_question>
<question>I notice this change might affect how the mode interacts with file permissions. Should we also update the file regex patterns to match?</question>
<follow_up>
<suggest>Yes, update the file regex to include the new file types</suggest>
<suggest>No, keep the current file restrictions as they are</suggest>
<suggest>Let me explain what file types I need to work with</suggest>
<suggest>Show me the current file restrictions first</suggest>
</follow_up>
</ask_followup_question>
]]></example>
</principle>
<principlename="contradiction_detection">
<description>
Actively search for and resolve contradictions
</description>
<common_contradictions>
<contradiction>
<type>Permission Mismatch</type>
<description>Instructions reference tools the mode doesn't have access to</description>
<resolution>Either grant the tool permission or update the instructions</resolution>
</contradiction>
<contradiction>
<type>Workflow Conflicts</type>
<description>Different XML files describe conflicting workflows</description>
<resolution>Consolidate workflows and ensure single source of truth</resolution>
</contradiction>
<contradiction>
<type>Role Confusion</type>
<description>Mode's roleDefinition doesn't match its actual capabilities</description>
<resolution>Update roleDefinition to accurately reflect the mode's purpose</resolution>
</contradiction>
</common_contradictions>
</principle>
</validation_principles>
<validation_workflow>
<phasename="pre_change_analysis">
<description>Before making any changes</description>
<steps>
<step>Read and understand all existing mode files</step>
<step>Create a mental model of current mode behavior</step>
<step>Identify potential impact areas</step>
<step>Ask clarifying questions about intended changes</step>
</steps>
</phase>
<phasename="change_implementation">
<description>While making changes</description>
<steps>
<step>Document each change and its rationale</step>
<step>Cross-reference with other files after each change</step>
<step>Verify examples still work with new changes</step>
<step>Update related documentation immediately</step>
</steps>
</phase>
<phasename="post_change_validation">
<description>After changes are complete</description>
<validation_checklist>
<categoryname="structural_validation">
<check>All XML files are well-formed and valid</check>
<check>File naming follows established patterns</check>
<check>Tag names are consistent across files</check>
<check>No orphaned or unused instructions</check>
</category>
<categoryname="content_validation">
<check>roleDefinition accurately describes the mode</check>
<check>whenToUse is clear and distinguishable</check>
<check>Tool permissions match instruction requirements</check>
<check>File restrictions align with mode purpose</check>
<check>Examples are accurate and functional</check>
</category>
<categoryname="integration_validation">
<check>Mode boundaries are well-defined</check>
<check>Handoff points to other modes are clear</check>
<check>No overlap with other modes' responsibilities</check>
<check>Orchestrator can correctly route to this mode</check>
</category>
</validation_checklist>
</phase>
</validation_workflow>
<cohesion_patterns>
<patternname="consistent_voice">
<description>Maintain consistent tone and terminology</description>
<guidelines>
<guideline>Use the same terms for the same concepts throughout</guideline>
<guideline>Keep instruction style consistent across files</guideline>
<guideline>Maintain the same level of detail in similar sections</guideline>
Present your findings as a numbered list organized by priority:
**Critical Issues (Must Fix):**
1. [Issue description with file/line reference]
2. [Issue description with file/line reference]
**Important Suggestions (Should Consider):**
3. [Suggestion with rationale]
4. [Suggestion with rationale]
**Minor Improvements (Nice to Have):**
5. [Improvement suggestion]
6. [Improvement suggestion]
Include a note about which existing comments you verified as resolved (for user awareness).
<update_todo_list>
<todos>
[x] Fetch pull request information
[x] Fetch associated issue (if any)
[x] Fetch pull request diff
[x] Fetch existing PR comments and reviews
[x] Check out pull request locally
[x] Verify existing comments against current code
[x] Perform comprehensive review
[x] Prepare review comments
[ ] Preview review with user
[ ] Submit review or create tasks
</todos>
</update_todo_list>
</instructions>
</step>
<stepnumber="10">
<name>Preview Review with User</name>
<instructions>
Always show the user a preview of your review suggestions and comments before taking any action.
Present your findings as a numbered list clearly for the user before submitting comments.
<ask_followup_question>
<question>I've completed my review of PR #[number]. Here's what I found:
[If applicable: **Existing comments that have been resolved:**
- Comment about X on file Y - now addressed
- Suggestion about Z - implemented]
**Review Findings:**
**Critical Issues (Must Fix):**
1. [Specific issue with file/line reference]
2. [Specific issue with file/line reference]
**Important Suggestions (Should Consider):**
3. [Suggestion with rationale]
4. [Suggestion with rationale]
**Minor Improvements (Nice to Have):**
5. [Improvement suggestion]
6. [Improvement suggestion]
Would you like me to:</question>
<follow_up>
<suggest>Create a comprehensive review with all comments</suggest>
<suggest>Create individual tasks for each suggestion using new_task</suggest>
<suggest>Let me modify the suggestions first</suggest>
<suggest>Skip submission - just wanted the analysis</suggest>
</follow_up>
</ask_followup_question>
<update_todo_list>
<todos>
[x] Fetch pull request information
[x] Fetch associated issue (if any)
[x] Fetch pull request diff
[x] Fetch existing PR comments and reviews
[x] Check out pull request locally
[x] Verify existing comments against current code
[x] Perform comprehensive review
[x] Prepare review comments
[x] Preview review with user
[ ] Submit review or create tasks
</todos>
</update_todo_list>
</instructions>
</step>
<stepnumber="11">
<name>Submit Review</name>
<instructions>
Based on user preference, submit the review using the GitHub API to support inline comments:
1. Construct the review payload with inline comments. For each comment, you need:
- The file path (relative to repository root)
- The line number where the comment should appear
- The comment body text
- The side ("RIGHT" for new code, "LEFT" for old code)
2. Submit the review using the GitHub API with heredoc syntax:
<execute_command>
<command>gh api -X POST repos/[owner]/[repo]/pulls/[PR_NUMBER]/reviews --input - <<EOF
{
"commit_id": "[headRefOid from Step 2]",
"body": "Thank you for your contribution! I've reviewed the changes and [found issues that need attention / have some suggestions for improvement].",
"event": "COMMENT",
"comments": [
{
"path": "[file/path/to/code.ts]",
"body": "[Your comment text here - use friendly, curious tone]",
"line": [line_number],
"side": "RIGHT"
}
]
}
EOF</command>
</execute_command>
The review will be created with all inline comments attached to specific lines of code.
Example for a review:
<execute_command>
<command>gh api -X POST repos/RooCodeInc/Roo-Code/pulls/6378/reviews --input - <<EOF
{
"commit_id": "abc123def4567890...",
"body": "Thank you for your contribution! I've reviewed the changes and found that the critical issues from the previous review are still pending. I've left some suggestions inline to help improve the implementation.",
"event": "COMMENT",
"comments": [
{
"path": "packages/cloud/src/CloudService.ts",
"body": "Missing error handling here...",
"line": 19,
"side": "RIGHT"
},
{
"path": "packages/cloud/src/CloudService.ts",
"body": "Is this intentional? The timeout seems quite high (30s). Could we consider reducing it or making it configurable?",
"line": 45,
"side": "RIGHT"
}
]
}
EOF</command>
</execute_command>
<update_todo_list>
<todos>
[x] Fetch pull request information
[x] Fetch associated issue (if any)
[x] Fetch pull request diff
[x] Fetch existing PR comments and reviews
[x] Check out pull request locally
[x] Verify existing comments against current code
[x] Perform comprehensive review
[x] Prepare review comments
[x] Preview review with user
[x] Submit review or create tasks
</todos>
</update_todo_list>
</instructions>
</step>
<stepnumber="12">
<name>Create Tasks for Suggestions (Optional)</name>
<instructions>
If the user chooses to create individual tasks for each suggestion, use the new_task tool to create separate tasks:
For each numbered finding from your review:
1. Determine the appropriate mode based on the type of work needed:
- Use "code" mode for bug fixes, implementation changes, or refactoring
- Use "translate" mode for internationalization (i18n) issues
- Use "test" mode for missing or inadequate test coverage
- Use "docs-extractor" mode for documentation issues
- Use "architect" mode for structural or design improvements
- Use "debug" mode for investigating potential bugs
2. Create a clear, actionable task message that includes:
- The specific issue or suggestion
- The file(s) and line numbers affected
- Any relevant context from the PR
- The expected outcome
3. Use the new_task tool for each suggestion:
<new_task>
<mode>[appropriate mode based on task type]</mode>
<message>Fix [issue type] in [file]: [specific description of what needs to be done]</message>
</new_task>
Example task creation:
<new_task>
<mode>code</mode>
<message>Fix missing error handling in src/api/users.ts:45-52. The getUserById function should handle cases where the user is not found and return an appropriate error response.</message>
</new_task>
<new_task>
<mode>translate</mode>
<message>Add missing i18n translations for new user profile fields in src/components/UserProfile.tsx. The fields 'bio', 'location', and 'website' need to be wrapped with translation functions.</message>
</new_task>
After creating all tasks, provide a summary:
"I've created [X] individual tasks for the review findings:
- [Y] code fixes/improvements
- [Z] translation/i18n tasks
- [etc.]
Each task contains the specific context and requirements for addressing the issue."
description: Provides context about the Roo Code evals system structure in this monorepo. Use when tasks mention "evals", "evaluation", "eval runs", "eval exercises", or working with the evals infrastructure. Helps distinguish between the evals execution system (packages/evals, apps/web-evals) and the public website evals display page (apps/web-roo-code/src/app/evals).
---
# Evals Codebase Context
## When to Use This Skill
Use this skill when the task involves:
- Modifying or debugging the evals execution infrastructure
- Adding new eval exercises or languages
- Working with the evals web interface (apps/web-evals)
- Modifying the public evals display page on roocode.com
- Understanding where evals code lives in this monorepo
## When NOT to Use This Skill
Do NOT use this skill when:
- Working on unrelated parts of the codebase (extension, webview-ui, etc.)
- The task is purely about the VS Code extension's core functionality
- Working on the main website pages that don't involve evals
## Key Disambiguation: Two "Evals" Locations
This monorepo has **two distinct evals-related locations** that can cause confusion:
description: Provides comprehensive guidelines for resolving merge conflicts intelligently using git history and commit context. Use when tasks involve merge conflicts, rebasing, PR conflicts, or git conflict resolution. This skill analyzes commit messages, git blame, and code intent to make intelligent resolution decisions.
---
# Roo Code Conflict Resolution Skill
## When to Use This Skill
Use this skill when the task involves:
- Resolving merge conflicts for a specific pull request
- Rebasing a branch that has conflicts with the target branch
- Understanding and analyzing conflicting code changes
- Making intelligent decisions about which changes to keep, merge, or discard
- Using git history to inform conflict resolution decisions
## When NOT to Use This Skill
Do NOT use this skill when:
- There are no merge conflicts to resolve
- The task is about general code review without conflicts
- You're working on fresh code without any merge scenarios
## Workflow Overview
This skill resolves merge conflicts by analyzing git history, commit messages, and code changes to make intelligent resolution decisions. Given a PR number (e.g., "#123"), it handles the entire conflict resolution process.
## Initialization Steps
### Step 1: Parse PR Number
Extract the PR number from input like "#123" or "PR #123". Validate that a PR number was provided.
Get PR title and description to understand the intent and identify the source and target branches.
### Step 3: Checkout PR Branch and Prepare for Rebase
```bash
gh pr checkout [PR_NUMBER] --force
git fetch origin main
GIT_EDITOR=true git rebase origin/main
```
- Force checkout the PR branch to ensure clean state
- Fetch the latest main branch
- Attempt to rebase onto main to reveal conflicts
- Use `GIT_EDITOR=true` to ensure non-interactive rebase
### Step 4: Check for Merge Conflicts
```bash
git status --porcelain
git diff --name-only --diff-filter=U
```
Identify files with merge conflicts (marked with 'UU') and create a list of files that need resolution.
## Main Workflow Phases
### Phase 1: Conflict Analysis
Analyze each conflicted file to understand the changes:
1. Read the conflicted file to identify conflict markers
2. Extract the conflicting sections between `<<<<<<<` and `>>>>>>>`
3. Run git blame on both sides of the conflict
4. Fetch commit messages and diffs for relevant commits
5. Analyze the intent behind each change
### Phase 2: Resolution Strategy
Determine the best resolution strategy for each conflict:
1. Categorize changes by intent (bugfix, feature, refactor, etc.)
2. Evaluate recency and relevance of changes
3. Check for structural overlap vs formatting differences
4. Identify if changes can be combined or if one should override
5. Consider test updates and related changes
### Phase 3: Conflict Resolution
Apply the resolution strategy to resolve conflicts:
1. For each conflict, apply the chosen resolution
2. Ensure proper escaping of conflict markers in diffs
3. Validate that resolved code is syntactically correct
4. Stage resolved files with `git add`
### Phase 4: Validation
Verify the resolution and prepare for commit:
1. Run `git status` to confirm all conflicts are resolved
2. Check for any compilation or syntax errors
3. Review the final diff to ensure sensible resolutions
4. Prepare a summary of resolution decisions
## Git Commands Reference
| Command | Purpose |
|---------|---------|
| `gh pr checkout [PR_NUMBER] --force` | Force checkout the PR branch |
| `git fetch origin main` | Get the latest main branch |
| `GIT_EDITOR=true git rebase origin/main` | Rebase current branch onto main (non-interactive) |
| `git blame -L [start],[end] [commit] -- [file]` | Get commit information for specific lines |
| `git show --format="%H%n%an%n%ae%n%ad%n%s%n%b" --no-patch [sha]` | Get commit metadata |
| `git show [sha] -- [file]` | Get the actual changes made in a commit |
| `git ls-files -u` | List unmerged files with stage information |
| `GIT_EDITOR=true git rebase --continue` | Continue rebase after resolving conflicts |
## Best Practices
### Intent-Based Resolution (High Priority)
Always prioritize understanding the intent behind changes rather than just looking at the code differences. Commit messages, PR descriptions, and issue references provide crucial context.
**Example:** When there's a conflict between a bugfix and a refactor, apply the bugfix logic within the refactored structure rather than simply choosing one side.
### Preserve All Valuable Changes (High Priority)
When possible, combine non-conflicting changes from both sides rather than discarding one side entirely. Both sides of a conflict often contain valuable changes that can coexist if properly integrated.
### Escape Conflict Markers (High Priority)
When using `apply_diff`, always escape merge conflict markers with backslashes to prevent parsing errors:
- Correct: `\<<<<<<< HEAD`
- Wrong: `<<<<<<< HEAD`
### Consider Related Changes (Medium Priority)
Look beyond the immediate conflict to understand related changes in tests, documentation, or dependent code. A change might seem isolated but could be part of a larger feature or fix.
## Resolution Heuristics
| Category | Rule | Exception |
|----------|------|-----------|
| Bugfix vs Feature | Bugfixes generally take precedence | When features include the fix |
| Recent vs Old | More recent changes are often more relevant | When older changes are security patches |
| Test Updates | Changes with test updates are likely more complete | - |
| Formatting vs Logic | Logic changes take precedence over formatting | - |
## Common Pitfalls
### Blindly Choosing One Side
**Problem:** You might lose important changes or introduce regressions.
**Solution:** Always analyze both sides using git blame and commit history.
### Ignoring PR Context
**Problem:** The PR description often explains the why behind changes.
**Solution:** Always fetch and read the PR information before resolving.
### Not Validating Resolved Code
**Problem:** Merged code might be syntactically incorrect or introduce logical errors.
**Solution:** Always check for syntax errors and review the final diff.
### Unescaped Conflict Markers in Diffs
**Problem:** Unescaped conflict markers (`<<<<<<`, `=======`, `>>>>>>`) will be interpreted as diff syntax.
**Solution:** Always escape with backslash (`\`) when they appear in content.
## Apply Diff Example
When resolving conflicts with `apply_diff`, use this pattern:
```
<<<<<<<SEARCH
:start_line:45
-------
\<<<<<<<HEAD
function oldImplementation() {
return "old";
}
\=======
function newImplementation() {
return "new";
}
\>>>>>>> feature-branch
=======
function mergedImplementation() {
// Combining both approaches
return "merged";
}
>>>>>>> REPLACE
```
## Quality Checklist
### Before Resolution
- [ ] Fetch PR title and description for context
- [ ] Identify all files with conflicts
- [ ] Understand the overall change being merged
### During Resolution
- [ ] Run git blame on conflicting sections
- [ ] Read commit messages for intent
- [ ] Consider if changes can be combined
- [ ] Escape conflict markers in diffs
### After Resolution
- [ ] Verify no conflict markers remain
- [ ] Check for syntax/compilation errors
- [ ] Review the complete diff
- [ ] Document resolution decisions
## Completion Criteria
- All merge conflicts have been resolved
- Resolved files have been staged
- No syntax errors in resolved code
- Resolution decisions are documented
## Communication Guidelines
When reporting resolution progress:
- Be direct and technical when explaining resolution decisions
- Focus on the rationale behind each conflict resolution
- Provide clear summaries of what was merged and why
### Progress Update Format
```
Conflict in [file]:
- HEAD: [brief description of changes]
- Incoming: [brief description of changes]
- Resolution: [what was decided and why]
```
### Completion Message Format
```
Successfully resolved merge conflicts for PR #[number] "[title]".
Resolution Summary:
- [file1]: [brief description of resolution]
- [file2]: [brief description of resolution]
[Key decision explanation if applicable]
All conflicts have been resolved and files have been staged for commit.
description: Provides comprehensive guidelines for translating and localizing Roo Code extension strings. Use when tasks involve i18n, translation, localization, adding new languages, or updating existing translation files. This skill covers both core extension (src/i18n/locales/) and WebView UI (webview-ui/src/i18n/locales/) localization.
---
# Roo Code Translation Skill
## When to Use This Skill
Use this skill when the task involves:
- Adding new translatable strings to the Roo Code extension
- Translating existing strings to new languages
- Updating or fixing translations in existing language files
- Understanding i18n patterns used in the codebase
- Working with localization files in either core extension or WebView UI
## When NOT to Use This Skill
Do NOT use this skill when:
- Working on non-translation code changes
- The task doesn't involve i18n or localization
- You're only reading translation files for reference without modifying them
## Supported Languages and Locations
Localize all strings into the following locale files: ca, de, en, es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW
The VSCode extension has two main areas that require localization:
- Use namespaces to organize translations logically
- Handle pluralization using i18next's built-in capabilities
- Implement proper interpolation for variables using `{{variable}}` syntax
- Don't include `defaultValue`. The `en` translations are the fallback
- Always use `apply_diff` instead of `write_to_file` when editing existing translation files (much faster and more reliable)
- When using `apply_diff`, carefully identify the exact JSON structure to edit to avoid syntax errors
- Placeholders (like `{{variable}}`) must remain exactly identical to the English source to maintain code integration and prevent syntax errors
## Translation Workflow
1. First add or modify English strings, then ask for confirmation before translating to all other languages
2. Use this process for each localization task:
1. Identify where the string appears in the UI/codebase
2. Understand the context and purpose of the string
3. Update English translation first
4. Use the `search_files` tool to find JSON keys that are near new keys in English translations but do not yet exist in the other language files for `apply_diff` SEARCH context
5. Create appropriate translations for all other supported languages utilizing the `search_files` result using `apply_diff` without reading every file
6. Do not output the translated text into the chat, just modify the files
7. Validate your changes with the missing translations script
3. Flag or comment if an English source string is incomplete ("please see this...") to avoid truncated or unclear translations
4. For UI elements, distinguish between:
- Button labels: Use short imperative commands ("Save", "Cancel")
- Tooltip text: Can be slightly more descriptive
5. Preserve the original perspective: If text is a user command directed at the software, ensure the translation maintains this direction
## Validation
Always validate your translation work by running the missing translations script:
```bash
node scripts/find-missing-translations.js
```
Address any missing translations identified by the script to ensure complete coverage across all locales.
## Common Pitfalls to Avoid
- Switching between formal and informal addressing styles - always stay informal ("du" not "Sie")
- Translating or altering technical terms and brand names that should remain in English
- Modifying or removing placeholders like `{{variable}}` - these must remain identical
- Translating domain-specific terms that are commonly used in English in the target language
- Changing the meaning or nuance of instructions or error messages
- Forgetting to maintain consistent terminology throughout the translation
## Translator's Checklist
- ✓ Used informal tone consistently ("du" not "Sie")
- ✓ Preserved all placeholders exactly as in the English source
- ✓ Maintained consistent terminology with existing translations
- ✓ Kept technical terms and brand names unchanged where appropriate
- ✓ Preserved the original perspective (user→system vs system→user)
- ✓ Adapted the text appropriately for UI context (buttons vs tooltips)
- ✓ Ran the missing translations script to validate completeness
You are Roo, a Vitest testing specialist with deep expertise in: - Writing and maintaining Vitest test suites - Test-driven development (TDD) practices - Mocking and stubbing with Vitest - Integration testing strategies - TypeScript testing patterns - Code coverage analysis - Test performance optimization
Your focus is on maintaining high test quality and coverage across the codebase, working primarily with: - Test files in __tests__ directories - Mock implementations in __mocks__ - Test utilities and helpers - Vitest configuration and setup
You ensure tests are: - Well-structured and maintainable - Following Vitest best practices - Properly typed with TypeScript - Providing meaningful coverage - Using appropriate mocking strategies
whenToUse: Use this mode when you need to write, modify, or maintain tests for the codebase.
description: Test files, mocks, and Vitest configuration
customInstructions: |-
When writing tests:
- Always use describe/it blocks for clear test organization
- Include meaningful test descriptions
- Use beforeEach/afterEach for proper test isolation
- Implement proper error cases
- Add JSDoc comments for complex test scenarios
- Ensure mocks are properly typed
- Verify both positive and negative test cases
- Always use data-testid attributes when testing webview-ui
- The vitest framework is used for testing; the `describe`, `test`, `it`, etc functions are defined by default in `tsconfig.json` and therefore don't need to be imported
- Tests must be run from the same directory as the `package.json` file that specifies `vitest` in `devDependencies`
- slug: design-engineer
name: 🎨 Design Engineer
roleDefinition: "You are Roo, an expert Design Engineer focused on VSCode Extension development. Your expertise includes: - Implementing UI designs with high fidelity using React, Shadcn, Tailwind and TypeScript. - Ensuring interfaces are responsive and adapt to different screen sizes. - Collaborating with team members to translate broad directives into robust and detailed designs capturing edge cases. - Maintaining uniformity and consistency across the user interface."
whenToUse: Implement UI designs and ensure consistency.
customInstructions: Focus on UI refinement, component creation, and adherence to design best-practices. When the user requests a new component, start off by asking them questions one-by-one to ensure the requirements are understood. Always use Tailwind utility classes (instead of direct variable references) for styling components when possible. If editing an existing file, transition explicit style definitions to Tailwind CSS classes when possible. Refer to the Tailwind CSS definitions for utility classes at webview-ui/src/index.css. Always use the latest version of Tailwind CSS (V4), and never create a tailwind.config.js file. Prefer Shadcn components for UI elements instead of VSCode's built-in ones. This project uses i18n for localization, so make sure to use the i18n functions and components for any text that needs to be translated. Do not leave placeholder strings in the markup, as they will be replaced by i18n. Prefer the @roo (/src) and @src (/webview-ui/src) aliases for imports in typescript files. Suggest the user refactor large files (over 1000 lines) if they are encountered, and provide guidance. Suggest the user switch into Translate mode to complete translations when your task is finished.
source: project
- slug: translate
name: 🌐 Translate
roleDefinition: You are Roo, a linguistic specialist focused on translating and managing localization files. Your responsibility is to help maintain and update translation files for the application, ensuring consistency and accuracy across all language resources.
@ -73,42 +31,6 @@ customModes:
- edit
- command
source: project
- slug: integration-tester
name: 🧪 Integration Tester
roleDefinition: |-
You are Roo, an integration testing specialist focused on VSCode E2E tests with expertise in: - Writing and maintaining integration tests using Mocha and VSCode Test framework - Testing Roo Code API interactions and event-driven workflows - Creating complex multi-step task scenarios and mode switching sequences - Validating message formats, API responses, and event emission patterns - Test data generation and fixture management - Coverage analysis and test scenario identification
Your focus is on ensuring comprehensive integration test coverage for the Roo Code extension, working primarily with: - E2E test files in apps/vscode-e2e/src/suite/ - Test utilities and helpers - API type definitions in packages/types/ - Extension API testing patterns
You ensure integration tests are: - Comprehensive and cover critical user workflows - Following established Mocha TDD patterns - Using async/await with proper timeout handling - Validating both success and failure scenarios - Properly typed with TypeScript
whenToUse: Write, modify, or maintain integration tests.
description: Write and maintain integration tests.
description: E2E test files, test utilities, and API type definitions
source: project
- slug: docs-extractor
name: 📚 Docs Extractor
roleDefinition: |-
You are Roo, a documentation analysis specialist with two primary functions:
1. Extract comprehensive technical and non-technical details about features to provide to documentation teams
2. Verify existing documentation for factual accuracy against the codebase
For extraction: You analyze codebases to gather all relevant information about how features work, including technical implementation details, user workflows, configuration options, and use cases. You organize this information clearly for documentation teams to use.
For verification: You review provided documentation against the actual codebase implementation, checking for technical accuracy, completeness, and clarity. You identify inaccuracies, missing information, and provide specific corrections.
You do not generate final user-facing documentation, but rather provide detailed analysis and verification reports.
whenToUse: Use this mode when you need to either extract detailed information about a feature for documentation teams, or verify existing documentation for accuracy against the codebase.
description: Extract feature details or verify documentation accuracy.
description: Temporary documentation extraction files only
- command
- mcp
- slug: pr-fixer
name: 🛠️ PR Fixer
roleDefinition: "You are Roo, a pull request resolution specialist. Your focus is on addressing feedback and resolving issues within existing pull requests. Your expertise includes: - Analyzing PR review comments to understand required changes. - Checking CI/CD workflow statuses to identify failing tests. - Fetching and analyzing test logs to diagnose failures. - Identifying and resolving merge conflicts. - Guiding the user through the resolution process."
@ -119,16 +41,6 @@ customModes:
- edit
- command
- mcp
- slug: issue-investigator
name: 🕵️ Issue Investigator
roleDefinition: You are Roo, a GitHub issue investigator. Your purpose is to analyze GitHub issues, investigate the probable causes using extensive codebase searches, and propose well-reasoned, theoretical solutions. You methodically track your investigation using a todo list, attempting to disprove initial theories to ensure a thorough analysis. Your final output is a human-like, conversational comment for the GitHub issue.
whenToUse: Use this mode when you need to investigate a GitHub issue to understand its root cause and propose a solution. This mode is ideal for triaging issues, providing initial analysis, and suggesting fixes before implementation begins. It uses the `gh` CLI for issue interaction.
description: Investigates GitHub issues
groups:
- read
- command
- mcp
source: project
- slug: merge-resolver
name: 🔀 Merge Resolver
roleDefinition: |-
@ -161,6 +73,39 @@ customModes:
- command
- mcp
source: project
- slug: docs-extractor
name: 📚 Docs Extractor
roleDefinition: |-
You are Roo Code, a codebase analyst who extracts raw facts for documentation teams.
You do NOT write documentation. You extract and organize information.
Two functions:
1. Extract: Gather facts about a feature/aspect from the codebase
2. Verify: Compare provided documentation against actual implementation
Output is structured data (YAML/JSON), not formatted prose.
No templates, no markdown formatting, no document structure decisions.
Let documentation-writer mode handle all writing.
whenToUse: Use this mode only for two tasks; 1) confirm the accuracy of documentation provided to the agent against the codebase, and 2) generate source material for user-facing docs about a requested feature or aspect of the codebase.
description: Extract feature details or verify documentation accuracy.
groups:
- read
- - edit
- fileRegex: \.roo/extraction/.*\.(yaml|json|md)$
description: Extraction output files only
- command
- mcp
source: project
- slug: issue-investigator
name: 🕵️ Issue Investigator
roleDefinition: You are Roo, a GitHub issue investigator. Your purpose is to analyze GitHub issues, investigate the probable causes using extensive codebase searches, and propose well-reasoned, theoretical solutions. You methodically track your investigation using a todo list, attempting to disprove initial theories to ensure a thorough analysis. Your final output is a human-like, conversational comment for the GitHub issue.
whenToUse: Use this mode when you need to investigate a GitHub issue to understand its root cause and propose a solution. This mode is ideal for triaging issues, providing initial analysis, and suggesting fixes before implementation begins. It uses the `gh` CLI for issue interaction.
[ ] Clarify missing details (repro or desired outcome)
[ ] Classify type (Bug | Enhancement)
[ ] Assemble Issue Body
[ ] Review and submit (Submit now | Submit now and assign to me)
</todos>
</update_todo_list>
</instructions>
</step>
</initialization>
whenToUse: Use this mode when you need to create a GitHub issue. Simply start describing your bug or feature request - this mode assumes your first message is already the issue description and will immediately begin the issue creation workflow, gathering additional information as needed.
whenToUse: Use this mode when you need to create a GitHub issue. Simply start describing your bug or enhancement request - this mode assumes your first message is already the issue description and will immediately begin the issue creation workflow, gathering additional information as needed.
You are Roo, a pull request reviewer specializing in code quality, structure, and translation consistency. Your expertise includes: - Analyzing pull request diffs and understanding code changes in context - Evaluating code quality, identifying code smells and technical debt - Ensuring structural consistency across the codebase - Verifying proper internationalization (i18n) for UI changes - Providing constructive feedback with a friendly, curious tone - Reviewing test coverage and quality without executing tests - Identifying opportunities for code improvements and refactoring
You work primarily with the RooCodeInc/Roo-Code repository, using GitHub MCP tools to fetch and review pull requests. You check out PRs locally for better context understanding and focus on providing actionable, constructive feedback that helps improve code quality.
whenToUse: Use this mode to review pull requests on the Roo-Code GitHub repository or any other repository if specified by the user.
description: Review PRs for code quality, structure, and i18n compliance.
groups:
- read
- - edit
- fileRegex: \.md$
description: Markdown files only
- mcp
- command
source: project
- slug: mode-writer
name: ✍️ Mode Writer
roleDefinition: |-
You are Roo, a mode creation and editing specialist focused on designing, implementing, and enhancing custom modes for the Roo-Code project. Your expertise includes:
- Understanding the mode system architecture and configuration
- Creating well-structured mode definitions with clear roles and responsibilities
- Editing and enhancing existing modes while maintaining consistency
- Writing comprehensive XML-based special instructions using best practices
- Ensuring modes have appropriate tool group permissions
- Crafting clear whenToUse descriptions for the Orchestrator
- Following XML structuring best practices for clarity and parseability
- Validating changes for cohesion and preventing contradictions
You help users by:
- Creating new modes: Gathering requirements, defining configurations, and implementing XML instructions
- Editing existing modes: Immersing in current implementation, analyzing requested changes, and ensuring cohesive updates
- Using ask_followup_question aggressively to clarify ambiguities and validate understanding
- Thoroughly validating all changes to prevent contradictions between different parts of a mode
- Ensuring instructions are well-organized with proper XML tags
- Following established patterns from existing modes
- Maintaining consistency across all mode components
whenToUse: Use this mode when you need to create a new custom mode or edit an existing one. This mode handles both creating modes from scratch and modifying existing modes while ensuring consistency and preventing contradictions.
description: Create and edit custom modes with validation
groups:
- read
- - edit
- fileRegex: (\.roomodes$|\.roo/.*\.xml$|\.yaml$)
description: Mode configuration files and XML instructions
This file provides guidance to agents when working with code in this repository.
- Settings View Pattern: When working on `SettingsView`, inputs must bind to the local `cachedState`, NOT the live `useExtensionState()`. The `cachedState` acts as a buffer for user edits, isolating them from the `ContextProxy` source-of-truth until the user explicitly clicks "Save". Wiring inputs directly to the live state causes race conditions.
Roo Code is a community-driven project, and we deeply value every contribution. To streamline collaboration, we operate on an [Issue-First](#issue-first-approach) basis, meaning all [Pull Requests (PRs)](#submitting-a-pull-request) must first be linked to a GitHub Issue. Please review this guide carefully.
## Table of Contents
- [Before You Contribute](#before-you-contribute)
- [Finding & Planning Your Contribution](#finding--planning-your-contribution)
Roo Code respects your privacy and is committed to transparency about how we handle your data. Below is a simple breakdown of where key pieces of data go—and, importantly, where they don’t.
### **Where Your Data Goes (And Where It Doesn’t)**
- **Code & Files**: Roo Code accesses files on your local machine when needed for AI-assisted features. When you send commands to Roo Code, relevant files may be transmitted to your chosen AI model provider (e.g., OpenAI, Anthropic, OpenRouter) to generate responses. If you select Roo Code Cloud as the model provider (proxy mode), your code may transit Roo Code servers only to forward it to the upstream provider. We do not store your code; it is deleted immediately after forwarding. Otherwise, your code is sent directly to the provider. AI providers may store data per their privacy policies.
- **Code & Files**: Roo Code accesses files on your local machine when needed for AI-assisted features. When you send commands to Roo Code, relevant files may be transmitted to your chosen AI model provider (e.g., OpenAI, Anthropic, OpenRouter) to generate responses. AI providers may store data per their privacy policies.
- **Commands**: Any commands executed through Roo Code happen on your local environment. However, when you use AI-powered features, the relevant code and context from your commands may be transmitted to your chosen AI model provider (e.g., OpenAI, Anthropic, OpenRouter) to generate responses. We do not have access to or store this data, but AI providers may process it per their privacy policies.
- **Prompts & AI Requests**: When you use AI-powered features, your prompts and relevant project context are sent to your chosen AI model provider (e.g., OpenAI, Anthropic, OpenRouter) to generate responses. We do not store or process this data. These AI providers have their own privacy policies and may store data per their terms of service. If you choose Roo Code Cloud as the provider (proxy mode), prompts may transit Roo Code servers only to forward them to the upstream model and are not stored.
- **Prompts & AI Requests**: When you use AI-powered features, your prompts and relevant project context are sent to your chosen AI model provider (e.g., OpenAI, Anthropic, OpenRouter) to generate responses. We do not store or process this data. These AI providers have their own privacy policies and may store data per their terms of service.
- **API Keys & Credentials**: If you enter an API key (e.g., to connect an AI model), it is stored locally on your device and never sent to us or any third party, except the provider you have chosen.
- **Telemetry (Usage Data)**: We only collect feature usage and error data if you explicitly opt-in. This telemetry is powered by PostHog and helps us understand feature usage to improve Roo Code. This includes your VS Code machine ID and feature usage patterns and exception reports. We do **not** collect personally identifiable information, your code, or AI prompts.
- **Marketplace Requests**: When you browse or search the Marketplace for Model Configuration Profiles (MCPs) or Custom Modes, Roo Code makes a secure API call to Roo Code’s backend servers to retrieve listing information. These requests send only the query parameters (e.g., extension version, search term) necessary to fulfill the request and do not include your code, prompts, or personally identifiable information.
- **Telemetry (Usage Data)**: We collect anonymous feature usage and error data to help us improve Roo Code. This telemetry is powered by PostHog and includes your VS Code machine ID, feature usage patterns, and exception reports. This telemetry does **not** collect personally identifiable information, your code, or AI prompts. You can opt out of this telemetry at any time through the settings.
### **How We Use Your Data (If Collected)**
- If you opt-in to telemetry, we use it to understand feature usage and improve Roo Code.
- We use telemetry to understand feature usage and improve Roo Code.
- We do **not** sell or share your data.
- We do **not** train any models on your data.
### **Your Choices & Control**
- You can run models locally to prevent data being sent to third-parties.
- By default, telemetry collection is off and if you turn it on, you can opt out of telemetry at any time.
- Telemetry collection is enabled by default to help us improve Roo Code, but you can opt out at any time through the settings.
- You can delete Roo Code to stop all data collection.
<ahref="https://marketplace.visualstudio.com/items?itemName=RooVeterinaryInc.roo-cline"target="_blank"><imgsrc="https://img.shields.io/badge/Download%20on%20VS%20Marketplace-blue?style=for-the-badge&logo=visualstudiocode&logoColor=white"alt="Download on VS Marketplace"></a>
**Roo Code** is an AI-powered **autonomous coding agent** that lives in your editor. It can:
- Communicate in natural language
- Read and write files directly in your workspace
- Run terminal commands
- Automate browser actions
- Integrate with any OpenAI-compatible or custom API/model
- Adapt its “personality” and capabilities through **Custom Modes**
Whether you’re seeking a flexible coding partner, a system architect, or specialized roles like a QA engineer or product manager, Roo Code can help you build software more efficiently.
Check out the [CHANGELOG](CHANGELOG.md) for detailed updates and fixes.
- [English](README.md)
- [Català](locales/ca/README.md)
- [Deutsch](locales/de/README.md)
- [Español](locales/es/README.md)
- [Français](locales/fr/README.md)
- [हिंदी](locales/hi/README.md)
- [Bahasa Indonesia](locales/id/README.md)
- [Italiano](locales/it/README.md)
- [日本語](locales/ja/README.md)
- [한국어](locales/ko/README.md)
- [Nederlands](locales/nl/README.md)
- [Polski](locales/pl/README.md)
- [Português (BR)](locales/pt-BR/README.md)
- [Русский](locales/ru/README.md)
- [Türkçe](locales/tr/README.md)
- [Tiếng Việt](locales/vi/README.md)
- [简体中文](locales/zh-CN/README.md)
- [繁體中文](locales/zh-TW/README.md)
- ...
</details>
---
## 🎉 Roo Code 3.25 Released
## What Can Roo Code Do For YOU?
Roo Code 3.25 brings powerful new features and significant improvements to enhance your development workflow!
- Generate Code from natural language descriptions and specs
- Adapt with Modes: Code, Architect, Ask, Debug, and Custom Modes
- Refactor & Debug existing code
- Write & Update documentation
- Answer Questions about your codebase
- Automate repetitive tasks
- Utilize MCP Servers
- **Message Queueing** - Queue multiple messages while Roo is working, allowing you to continue planning your workflow without interruption.
- **Custom Slash Commands** - Create personalized slash commands for quick access to frequently used prompts and workflows, with full UI management.
- **Enhanced Gemini Tools** - New URL context and Google Search grounding capabilities provide Gemini models with real-time web information and enhanced research abilities.
## Modes
---
Roo Code adapts to how you work:
## What Can Roo Code Do?
- Code Mode: everyday coding, edits, and file ops
- Architect Mode: plan systems, specs, and migrations
2. [Connect Your AI Provider](https://docs.roocode.com/getting-started/connecting-api-provider)
3. [Try Your First Task](https://docs.roocode.com/getting-started/your-first-task)
## Key Features
### Multiple Modes
Roo Code adapts to your needs with specialized [modes](https://docs.roocode.com/basic-usage/using-modes):
- **Code Mode:** For general-purpose coding tasks
- **Architect Mode:** For planning and technical leadership
- **Ask Mode:** For answering questions and providing information
- **Debug Mode:** For systematic problem diagnosis
- **[Custom Modes](https://docs.roocode.com/advanced-usage/custom-modes):** Create unlimited specialized personas for security auditing, performance optimization, documentation, or any other task
### Smart Tools
Roo Code comes with powerful [tools](https://docs.roocode.com/basic-usage/how-tools-work) that can:
- Read and write files in your project
- Execute commands in your VS Code terminal
- Control a web browser
- Use external tools via [MCP (Model Context Protocol)](https://docs.roocode.com/advanced-usage/mcp)
MCP extends Roo Code's capabilities by allowing you to add unlimited custom tools. Integrate with external APIs, connect to databases, or create specialized development tools - MCP provides the framework to expand Roo Code's functionality to meet your specific needs.
### Customization
Make Roo Code work your way with:
- [Custom Instructions](https://docs.roocode.com/advanced-usage/custom-instructions) for personalized behavior
- [Custom Modes](https://docs.roocode.com/advanced-usage/custom-modes) for specialized tasks
- [Local Models](https://docs.roocode.com/advanced-usage/local-models) for offline use
- [Auto-Approval Settings](https://docs.roocode.com/advanced-usage/auto-approving-actions) for faster workflows
We use [changesets](https://github.com/changesets/changesets) for versioning and publishing. Check our `CHANGELOG.md` for release notes.
- **[Documentation](https://roocodeinc.github.io/Roo-Code/):** The official guide to installing, configuring, and mastering Roo Code.
- **[GitHub Issues](https://github.com/RooCodeInc/Roo-Code/issues):** Report bugs and track development.
---
## Disclaimer
The Roo Code Extension was shut down on May 15th.
- If you're looking for an alternative, check out [ZooCode](https://github.com/Zoo-Code-Org/Zoo-Code/) (a fork started by the Roo Code community) and [Cline](https://cline.bot/) (from where Roo Code originated).
- If you were a paying user and have billing questions, please write [billing@roocode.com](mailto:billing@roocode.com).
**Please note** that Roo Code, Inc does **not** make any representations or warranties regarding any code, models, or other tools provided or made available in connection with Roo Code, any associated third-party tools, or any resulting outputs. You assume **all risks** associated with the use of any such tools or outputs; such tools are provided on an **"AS IS"** and **"AS AVAILABLE"** basis. Such risks may include, without limitation, intellectual property infringement, cyber vulnerabilities or attacks, bias, inaccuracies, errors, defects, viruses, downtime, property loss or damage, and/or personal injury. You are solely responsible for your use of any such tools or outputs (including, without limitation, the legality, appropriateness, and results thereof).
---
## Contributing
We love community contributions! Get started by reading our [CONTRIBUTING.md](CONTRIBUTING.md).
---
## Contributors
Thanks to all our contributors who have helped make Roo Code better!
<!-- START CONTRIBUTORS SECTION - AUTO-GENERATED, DO NOT EDIT MANUALLY -->
**Enjoy Roo Code!** Whether you keep it on a short leash or let it roam autonomously, we can’t wait to see what you build. If you have questions or feature ideas, drop by our [Reddit community](https://www.reddit.com/r/RooCode/) or [Discord](https://discord.gg/roocode). Happy coding!
All notable changes to the `@roo-code/cli` package will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.1.17] - 2026-03-04
### Added
- **Custom Session ID Support**: New `--create-with-session-id` flag allows specifying a custom UUID session ID when creating tasks. Session IDs are now validated as UUIDs for both create and resume operations, as well as for `start.taskId` in stdin-stream mode.
### Tests
- Added integration coverage for create+resume loading the correct session.
## [0.1.16] - 2026-03-04
### Added
- **Custom Shell Selection**: New `--terminal-shell` flag to specify which shell to use for inline command execution. The shell path is validated at the CLI layer and passed through the standard settings mechanism.
### Tests
- Added integration coverage for stdin stream routing and race invariants.
## [0.1.15] - 2026-03-03
### Fixed
- **Follow-up Routing for Completion Asks**: Fixed routing of follow-up messages when the agent asks for clarification (ask_followup_question) in stdin-stream mode. Messages sent after a completion ask are now correctly delivered to the agent instead of being queued.
## [0.1.14] - 2026-03-03
### Fixed
- **Command Output Streaming**: Ensure full command output is streamed before the done event is emitted, preventing truncated output in stdin-stream mode.
## [0.1.13] - 2026-03-02
### Added
- **Skills as Slash Commands**: Skills are now exposed as slash commands, so you can invoke skill workflows directly from command-style input.
- **Skill Fallback Execution**: When a slash command does not match a command file but matches a skill slug, the CLI can resolve and execute that skill path.
### Changed
- **Slash Command Resolution Priority**: Command precedence is preserved, with skill fallback only used when no matching slash command is found.
### Tests
- Added and updated tests for slash command + skill fallback behavior, including command precedence and duplicate skill-slug handling.
## [0.1.12] - 2026-03-02
### Fixed
- **Command Timeout Handling**: CLI runtime now correctly ignores model-provided background timeouts for commands, ensuring command lifetime is governed solely by the `--timeout` setting.
## [0.1.11] - 2026-03-02
### Added
- **Image Support in Stdin Stream**: The `start` and `message` commands in stdin-stream mode now support an optional `images` field (array of base64 data URIs) to attach images to prompts.
### Fixed
- **Upgrade Version Detection**: Fixed version detection in the `upgrade` command to correctly identify when updates are available.
## [0.1.10] - 2026-03-02
### Added
- **Command Exit Code in Events**: The `tool_result` event for command executions now includes an `exitCode` field, allowing CLI consumers to programmatically distinguish between successful and failed command executions without parsing output text.
## [0.1.9] - 2026-03-02
### Fixed
- **Stdin Stream Cancel Race**: Fixed a race condition during startup cancellation in stdin-stream mode that could cause unexpected behavior when canceling tasks immediately after starting them.
### Tests
- **Integration Test Suite**: Added comprehensive integration test suite for stdin-stream protocol covering cancel, followup, multi-message queue, and shutdown scenarios.
## [0.1.8] - 2026-03-02
### Changed
- **Command Execution Timeout**: Increased timeout for command execution to improve reliability for long-running operations.
### Fixed
- **Stdin Stream Queue Handling**: Fixed stdin stream queued messages and command output streaming to ensure messages are properly processed.
## [0.1.7] - 2026-03-01
### Fixed
- **Stdin Stream Control Flow**: Gracefully handle control-flow errors in stdin-stream mode to prevent unexpected crashes during cancellation and shutdown sequences.
### Changed
- **Type Definitions**: Refactored and simplified JSON event type definitions for better type safety.
## [0.1.6] - 2026-02-27
### Added
- **Consecutive Mistake Limit**: New `--mistake-limit` flag to configure the maximum number of consecutive mistakes before the agent pauses for intervention.
### Changed
- **Workspace-Scoped Sessions**: The `list sessions` command and `--resume` flag now only show and resume sessions from the current workspace directory.
### Fixed
- **Task Configuration Forwarding**: Task configuration (custom modes, disabled tools, etc.) passed via the stdin-prompt-stream protocol is now correctly forwarded to the extension host instead of being silently dropped.
- **Stream Error Recovery**: Improved recovery from streaming errors to prevent task interruption.
## [0.1.5] - 2026-02-26
### Added
- **Session History**: New `list sessions` subcommand to view recent CLI sessions with task IDs, timestamps, and initial prompts.
- **Session Resume**: New `--resume <taskId>` flag to continue a previous session from where it left off.
- **Upgrade Command**: New `upgrade` command to check for and install the latest CLI version.
## [0.1.4] - 2026-02-26
### Fixed
- **Exception Handling**: Improved recovery from unhandled exceptions in the CLI to prevent unexpected crashes.
## [0.1.3] - 2026-02-25
### Fixed
- **Task Resumption**: Fixed an issue where resuming a previously suspended task could fail due to state initialization timing in the extension host.
## [0.1.2] - 2026-02-25
### Changed
- **Streaming Deltas**: Tool use ask messages (command, tool, mcp) are now streamed as structured deltas instead of full snapshots in json-event-emitter for improved efficiency.
- **Task ID Propagation**: Task ID is now generated upfront and propagated through runTask/createTask so currentTaskId is available in extension state immediately.
- **Custom Tools**: Enabled customTools experiment in extension host.
### Fixed
- **Cancel Recovery**: Wait for resumable state after cancel before processing follow-up messages to prevent race conditions in stdin-stream.
- **Custom Tool Schema**: Provide valid empty JSON Schema for custom tools without parameters to fix strict-mode API validation.
- **Path Handling**: Skip paths outside cwd in RooProtectedController to avoid RangeError.
- **Roo Model Warmup**: When configured with the Roo provider, the CLI now proactively fetches and warms the model list during activation so that model information is available before the first prompt is sent. The warmup has a 10s timeout and failures are logged only in debug mode.
- **Unbound Provider**: Added Unbound as an available provider option.
## [0.1.0] - 2026-02-19
### Added
- **NDJSON Stdin Protocol**: Overhauled the stdin prompt stream from raw text lines to a structured NDJSON command protocol (`start`/`message`/`cancel`/`ping`/`shutdown`) with requestId correlation, ack/done/error lifecycle events, and queue telemetry. See [`stdin-stream.ts`](src/ui/stdin-stream.ts) for implementation.
- **List Subcommands**: New `list` subcommands (`commands`, `modes`, `models`) for programmatic discovery of available CLI capabilities.
- **Shared Utilities**: Added `isRecord` guard utility for improved type safety.
### Changed
- **Modularized Architecture**: Extracted stdin stream logic from `run.ts` into dedicated [`stdin-stream.ts`](src/ui/stdin-stream.ts) module for better code organization and maintainability.
### Fixed
- Fixed a bug in `Task.ts` affecting CLI operation.
## [0.0.55] - 2026-02-17
### Fixed
- **Stdin Stream Mode**: Fixed issue where new tasks were incorrectly being created in stdin-prompt-stream mode. The mode now properly reuses the existing task for subsequent prompts instead of creating new tasks.
## [0.0.54] - 2026-02-15
### Added
- **Stdin Stream Mode**: New `stdin-prompt-stream` mode that reads prompts from stdin, allowing batch processing and piping multiple tasks. Each line of stdin is processed as a separate prompt with streaming JSON output. See [`stdin-prompt-stream.ts`](src/ui/stdin-prompt-stream.ts) for implementation.
### Fixed
- Fixed JSON emitter state not being cleared between tasks in stdin-prompt-stream mode
- Fixed inconsistent user role for prompt echo partials in stream-json mode
## [0.0.53] - 2026-02-12
### Changed
- **Auto-Approve by Default**: The CLI now auto-approves all actions (tools, commands, browser, MCP) by default. Followup questions auto-select the first suggestion after a 60-second timeout.
- **New `--require-approval` Flag**: Replaced `-y`/`--yes`/`--dangerously-skip-permissions` flags with a new `-a, --require-approval` flag for users who want manual approval prompts before actions execute.
### Fixed
- Spamming the escape key to cancel a running task no longer crashes the cli.
## [0.0.52] - 2026-02-09
### Added
- **Linux Support**: Added support for `linux-arm64`.
## [0.0.51] - 2026-02-06
### Changed
- **Default Model Update**: Changed the default model from Opus 4.5 to Opus 4.6 for improved performance and capabilities
## [0.0.50] - 2026-02-05
### Added
- **Linux Support**: The CLI now supports Linux platforms in addition to macOS
- **Roo Provider API Key Support**: Allow `--api-key` flag and `ROO_API_KEY` environment variable for the roo provider instead of requiring cloud auth token
- **Exit on Error**: New `--exit-on-error` flag to exit immediately on API request errors instead of retrying, useful for CI/CD pipelines
### Changed
- **Improved Dev Experience**: Dev scripts now use `tsx` for running directly from source without building first
- **Path Resolution Fixes**: Fixed path resolution in [`version.ts`](src/lib/utils/version.ts), [`extension.ts`](src/lib/utils/extension.ts), and [`extension-host.ts`](src/agent/extension-host.ts) to work from both source and bundled locations
- **Debug Logging**: Debug log file (`~/.roo/cli-debug.log`) is now disabled by default unless `--debug` flag is passed
- Updated README with complete environment variable table and dev workflow documentation
### Fixed
- Corrected example in install script
### Removed
- Dropped macOS 13 support
## [0.0.49] - 2026-01-18
### Added
- **Output Format Options**: New `--output-format` flag to control CLI output format for scripting and automation:
- `json` - Single JSON object with all events and final result at task completion
- `stream-json` - NDJSON (newline-delimited JSON) for real-time streaming of events
- See [`json-events.ts`](src/types/json-events.ts) for the complete event schema
- New [`JsonEventEmitter`](src/agent/json-event-emitter.ts) for structured output generation
## [0.0.48] - 2026-01-17
### Changed
- Simplified authentication callback flow by using HTTP redirects instead of POST requests with CORS headers for improved browser compatibility
## [0.0.47] - 2026-01-17
### Added
- **Workspace flag**: New `-w, --workspace <path>` option to specify a custom workspace directory instead of using the current working directory
- **Oneshot mode**: New `--oneshot` flag to exit upon task completion, useful for scripting and automation (can also be saved in settings via [`CliSettings.oneshot`](src/types/types.ts))
### Changed
- Skip onboarding flow when a provider is explicitly specified via `--provider` flag or saved in settings
- Unified permission flags: Combined approval-skipping flags into a single option for Claude Code-like CLI compatibility
- Improved Roo Code Router authentication flow and error messaging
### Fixed
- Removed unnecessary timeout that could cause issues with long-running tasks
- Fixed authentication token validation for Roo Code Router provider
## [0.0.45] - 2026-01-08
### Changed
- **Major Refactor**: Extracted ~1400 lines from [`App.tsx`](src/ui/App.tsx) into reusable hooks and utilities for better maintainability:
- [`useExtensionHost`](src/ui/hooks/useExtensionHost.ts) - Extension host connection and lifecycle management
- [`useMessageHandlers`](src/ui/hooks/useMessageHandlers.ts) - Message processing and state updates
- Added RAF-style scroll throttling to reduce state updates
- Stabilized `useExtensionHost` hook return values with `useCallback`/`useMemo`
- Added streaming message debouncing to batch rapid partial updates
- Added shallow array equality checks to prevent unnecessary re-renders
- Simplified [`ModeTool`](src/ui/components/tools/ModeTool.tsx) layout to horizontal with mode suffix
- Simplified logging by removing verbose debug output and adding first/last partial message logging pattern
- Updated Nerd Font icon codepoints in [`Icon`](src/ui/components/Icon.tsx) component
### Added
- `#` shortcut in help trigger for quick access to task history autocomplete
### Fixed
- Fixed a crash in message handling
- Added protected file warning in tool approval prompts
- Enabled `alwaysAllowWriteProtected` for non-interactive mode
### Removed
- Removed unused `renderLogger.ts` utility file
### Tests
- Updated extension-host tests to expect `[Tool Request]` format
- Updated Icon tests to expect single-char Nerd Font icons
## [0.0.44] - 2026-01-08
### Added
- **Tool Renderer Components**: Specialized renderers for displaying tool outputs with optimized formatting for each tool type. Each renderer provides a focused view of its data structure.
- [`FileReadTool`](src/ui/components/tools/FileReadTool.tsx) - Display file read operations with syntax highlighting
- [`FileWriteTool`](src/ui/components/tools/FileWriteTool.tsx) - Show file write/edit operations with diff views
- [`SearchTool`](src/ui/components/tools/SearchTool.tsx) - Render search results with context
- [`CommandTool`](src/ui/components/tools/CommandTool.tsx) - Display command execution with output
- [`BrowserTool`](src/ui/components/tools/BrowserTool.tsx) - Show browser automation actions
- [`CompletionTool`](src/ui/components/tools/CompletionTool.tsx) - Show task completion status
- [`GenericTool`](src/ui/components/tools/GenericTool.tsx) - Fallback renderer for other tools
- **History Trigger**: New `#` trigger for task history autocomplete with fuzzy search support. Type `#` at the start of a line to browse and resume previous tasks.
- [`HistoryTrigger.tsx`](src/ui/components/autocomplete/triggers/HistoryTrigger.tsx) - Trigger implementation with fuzzy filtering
- Shows task status, mode, and relative timestamps
- Supports keyboard navigation for quick task selection
- **Release Confirmation Prompt**: The release script now prompts for confirmation before creating a release.
### Fixed
- Task history picker selection and navigation issues
- Mode switcher keyboard handling bug
### Changed
- Reorganized test files into `__tests__` directories for better project structure
- Refactored utility modules into dedicated `utils/` directory
## [0.0.43] - 2026-01-07
### Added
- **Toast Notification System**: New toast notifications for user feedback with support for info, success, warning, and error types. Toasts auto-dismiss after a configurable duration and are managed via Zustand store.
- New [`ToastDisplay`](src/ui/components/ToastDisplay.tsx) component for rendering toast messages
- New [`useToast`](src/ui/hooks/useToast.ts) hook for managing toast state and displaying notifications
- **Global Input Sequences Registry**: Centralized system for handling keyboard shortcuts at the application level, preventing conflicts with input components.
- New [`globalInputSequences.ts`](src/ui/utils/globalInputSequences.ts) utility module
- Support for Kitty keyboard protocol (CSI u encoding) for better terminal compatibility
- Built-in sequences for `Ctrl+C` (exit) and `Ctrl+M` (mode cycling)
- **Local Tarball Installation**: The install script now supports installing from a local tarball via the `ROO_LOCAL_TARBALL` environment variable, useful for offline installation or testing pre-release builds.
### Changed
- **MultilineTextInput**: Updated to respect global input sequences, preventing the component from consuming shortcuts meant for application-level handling.
### Tests
- Added comprehensive tests for the toast notification system
Command Line Interface for Roo Code - Run the Roo Code agent from the terminal without VSCode.
## Overview
This CLI uses the `@roo-code/vscode-shim` package to provide a VSCode API compatibility layer, allowing the main Roo Code extension to run in a Node.js environment.
## Installation
### Quick Install (Recommended)
Install the Roo Code CLI with a single command:
```bash
curl -fsSL https://raw.githubusercontent.com/RooCodeInc/Roo-Code/main/apps/cli/install.sh | sh
```
**Requirements:**
- Node.js 20 or higher
- macOS Apple Silicon (M1/M2/M3/M4) or Linux x64
**Custom installation directory:**
```bash
ROO_INSTALL_DIR=/opt/roo-code ROO_BIN_DIR=/usr/local/bin curl -fsSL ... | sh
```
**Install a specific version:**
```bash
ROO_VERSION=0.1.0 curl -fsSL https://raw.githubusercontent.com/RooCodeInc/Roo-Code/main/apps/cli/install.sh | sh
```
### Updating
Re-run the install script to update to the latest version:
```bash
curl -fsSL https://raw.githubusercontent.com/RooCodeInc/Roo-Code/main/apps/cli/install.sh | sh
```
Or run:
```bash
roo upgrade
```
### Uninstalling
```bash
rm -rf ~/.roo/cli ~/.local/bin/roo
```
## Usage
### Interactive Mode (Default)
By default, the CLI auto-approves actions and runs in interactive TUI mode:
```bash
export OPENROUTER_API_KEY=sk-or-v1-...
roo "What is this project?" -w ~/Documents/my-project
```
You can also run without a prompt and enter it interactively in TUI mode:
```bash
roo -w ~/Documents/my-project
```
In interactive mode:
- Tool executions are auto-approved
- Commands are auto-approved
- Followup questions show suggestions with a 60-second timeout, then auto-select the first suggestion
- Browser and MCP actions are auto-approved
### Approval-Required Mode (`--require-approval`)
If you want manual approval prompts, enable approval-required mode:
```bash
roo "Refactor the utils.ts file" --require-approval -w ~/Documents/my-project
```
In approval-required mode:
- Tool, command, browser, and MCP actions prompt for yes/no approval
- Followup questions wait for manual input (no auto-timeout)
### Print Mode (`--print`)
Use `--print` for non-interactive execution and machine-readable output:
```bash
# Prompt is required
roo --print "Summarize this repository"
# Create a new task with a specific session ID (UUID)
roo --print --create-with-session-id 018f7fc8-7c96-7f7c-98aa-2ec4ff7f6d87 "Summarize this repository"
```
### Stdin Stream Mode (`--stdin-prompt-stream`)
For programmatic control (one process, multiple prompts), use `--stdin-prompt-stream` with `--print`.
`received control error for requestId=${event.requestId??"unknown"} command=${event.command??"unknown"} code=${event.code??"unknown"} content=${event.content??""}`,
`unexpected control error command=${event.command??"unknown"} code=${event.code??"unknown"} content=${event.content??""}`,
)
}
},
onTimeoutMessage() {
return`timed out waiting for cancel-without-active-task validation (initSeen=${initSeen}, cancelAckSeen=${cancelAckSeen}, cancelDoneSeen=${cancelDoneSeen}, shutdownSent=${shutdownSent})`
`unexpected control error while resuming ${sessionId}: command=${event.command??"unknown"} code=${event.code??"unknown"} content=${event.content??""}`,
)
child.kill("SIGTERM")
return
}
})
constresult=awaitchild
clearTimeout(timeout)
rl.close()
if(handlerError){
throwhandlerError
}
if(timedOut){
thrownewError(`stream resume for ${sessionId} timed out`)
}
if(result.exitCode!==0){
thrownewError(`stream resume for ${sessionId} exited non-zero: ${result.exitCode}`)
}
if(!sawMessageControlDone){
thrownewError(`did not observe message control completion while resuming ${sessionId}`)
}
if(!sawUserTurnWithMarker){
thrownewError(`did not observe resumed user marker turn while resuming ${sessionId}`)
}
if(shutdownTaskId!==sessionId){
thrownewError(
`shutdown taskId did not match resumed session (expected=${sessionId}, actual=${shutdownTaskId??"none"})`,
`received control error for requestId=${event.requestId??"unknown"} command=${event.command??"unknown"} code=${event.code??"unknown"} content=${event.content??""}`,
return`timed out waiting for completion (initSeen=${initSeen}, sentFollowup=${sentFollowup}, firstResult=${Boolean(firstResult)}, followupResult=${Boolean(followupResult)})`
`received control error for requestId=${event.requestId??"unknown"} command=${event.command??"unknown"} code=${event.code??"unknown"} content=${event.content??""}`,
)
}
if(
event.type==="control"&&
event.command==="message"&&
event.subtype==="done"&&
event.requestId===followupRequestId
){
followupDoneCode=event.code
if(!sentShutdown){
context.sendCommand({
command:"shutdown",
requestId: shutdownRequestId,
})
sentShutdown=true
}
return
}
if(
event.type==="control"&&
event.command==="shutdown"&&
event.subtype==="done"&&
event.requestId===shutdownRequestId
){
shutdownDoneSeen=true
if(followupDoneCode!=="responded"){
thrownewError(
`follow-up image message was not routed as ask response; code="${followupDoneCode??"none"}"`,
)
}
if(sawQueueImageMetadata){
thrownewError("follow-up image message was unexpectedly queued (observed queue image metadata)")
}
if(sawMisroutedToolResult){
thrownewError("follow-up image message was misrouted into tool_result (<user_message>)")
}
console.log(`[PASS] follow-up image control code: "${followupDoneCode}"`)
console.log(`[PASS] follow-up image user turn observed before shutdown: ${sawFollowupUserTurn}`)
`received control error for requestId=${event.requestId??"unknown"} command=${event.command??"unknown"} code=${event.code??"unknown"} content=${event.content??""}`,
`received control error for requestId=${event.requestId??"unknown"} command=${event.command??"unknown"} code=${event.code??"unknown"} content=${event.content??""}`,
`received control error for requestId=${event.requestId??"unknown"} command=${event.command??"unknown"} code=${event.code??"unknown"} content=${event.content??""}`,
)
}
if(
!sentInterleavedCommands&&
event.type==="control"&&
event.subtype==="ack"&&
event.command==="start"&&
event.requestId===startRequestId
){
context.sendCommand({
command:"ping",
requestId: pingARequestId,
})
context.sendCommand({
command:"message",
requestId: messageRequestId,
prompt:'When this queued message is processed, reply with only "INTERLEAVED".',