Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Jan 21, 2026

Summary

This PR implements a "Fresh Start Model" for context condensation - a fundamental architectural change where summary messages transition from assistant role to user role. This simplifies the condensation architecture by eliminating several workarounds while introducing targeted mechanisms for command preservation and orphan cleanup.

What Changed

Fresh Start Model

The core change: summary messages now have role: "user" instead of role: "assistant".

Before:

  • Summary was an assistant message inserted before kept messages
  • Required synthetic reasoning blocks for DeepSeek-reasoner compatibility
  • Preserved tool_use blocks to maintain pairing with subsequent tool_results
  • Kept trailing N messages after summary

After:

  • Effective API history contains only the summary (true fresh start) after a condensing event
  • Summary is a user message placed at the end of message history
  • No reasoning blocks needed (user messages don't require them)
  • No tool_use preservation needed

Command Block Preservation

New extractCommandBlocks() function extracts <command> XML blocks from the original task and injects them into summaries wrapped in <system-reminder> tags. This ensures workflow directives (like /prr #123) survive multiple condensation cycles.

Orphan Tool Result Filtering

getEffectiveApiHistory() now filters orphan tool_result blocks that reference tool_use IDs from condensed-away messages. This prevents API validation errors that would occur when tool_result blocks have no matching tool_use.

Consecutive User Message Merging

New mergeConsecutiveApiMessages() utility non-destructively merges consecutive user messages for API requests only. This handles the case where a user summary followed by a user message would create invalid consecutive same-role messages.

Slash Command Help Separation

parseMentions() now returns slashCommandHelp separately from the main text. This allows selective extraction of command blocks during condensation while keeping the user's actual message content clean.

Improved Error Handling

  • Error details now include both message and details fields (JSON structure)
  • CondensationErrorRow uses shared ErrorRow component with copy functionality
  • New i18n string condense_api_failed for API error messages

Restructured CONDENSE Prompt

Completely rewritten with a highly structured XML format:

<summary>
1. Primary Request and Intent
2. Key Technical Concepts
3. Files and Code Sections (with snippets)
4. Errors and fixes (with user feedback)
5. Problem Solving
6. All user messages (non-tool-result)
7. Pending Tasks
8. Current Work (precise description)
9. Optional Next Step
</summary>

Breaking Changes

  • Summary messages now have role: "user" instead of role: "assistant"
  • Effective API history after condensation contains only the summary (no trailing messages)
  • N_MESSAGES_TO_KEEP constant removed
  • Summary timestamp now uses lastMsgTs + 1 instead of firstKeptTs - 1

Why This Approach

Problem Solution
DeepSeek reasoning requirement forced complex assistant summaries User role doesn't need reasoning blocks
Tool_use/tool_result pairing complex across condensations User summaries don't need tool_use; orphan cleanup handles residuals
Workflow directives lost after condensation extractCommandBlocks() preserves <command> blocks
Consecutive user messages cause API errors mergeConsecutiveApiMessages() for API requests only
Important information lost during summarization Highly structured prompt with explicit sections
Error details not copyable JSON structure with ErrorRow component integration

Dependency Graph

Fresh Start Model (summary = user role)
       │
       ├── No reasoning blocks needed
       ├── No tool_use preservation needed
       │
       ├── extractCommandBlocks() → Preserves workflow directives
       │
       ├── getEffectiveApiHistory() → Orphan tool_result filtering
       │
       ├── mergeConsecutiveApiMessages() → Handles consecutive user messages
       │
       ├── slashCommandHelp separation → Enables command extraction
       │
       ├── Structured CONDENSE prompt → Better information preservation
       │
       └── JSON error structure → ErrorRow component integration

Important

Transition summary messages from assistant to user role for context condensation, simplifying architecture and improving functionality.

  • Behavior:
    • Summary messages now have role: "user" instead of role: "assistant".
    • Effective API history contains only the summary after a condensing event.
    • New extractCommandBlocks() function to preserve <command> blocks in summaries.
    • getEffectiveApiHistory() filters orphan tool_result blocks.
    • mergeConsecutiveApiMessages() utility merges consecutive user messages for API requests.
  • Tests:
    • Updates to condense.spec.ts and index.spec.ts to reflect new behavior.
    • New tests for extractCommandBlocks() and mergeConsecutiveApiMessages().
  • Misc:
    • N_MESSAGES_TO_KEEP constant removed.
    • Summary timestamp now uses lastMsgTs + 1 instead of firstKeptTs - 1.

This description was created by Ellipsis for 7a361ae. You can customize this summary. It will automatically update as commits are pushed.

@roomote
Copy link
Contributor

roomote bot commented Jan 21, 2026

Oroocle Clock   Follow along on Roo Cloud

Re-review in progress for 7a361ae5b4e69a6a74f07489684d34e4a36e507d.

  • Fix CONDENSE support prompt section numbering: previously "6." appeared twice (All user messages vs Pending Tasks).
  • Condense: finalRequestMessage.content ignores customCondensingPrompt (custom prompt not actually sent as the summarization request content).
  • Condense: summarizeConversation() returns errorDetails, but Task.condenseContext() drops it from the UI error path (fix-id: ab3a636175).
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

  • Condense is now non-destructive: older messages are tagged with condenseParent and filtered via getEffectiveApiHistory(), while rewind/edit semantics keep the original message boundaries.
  • New API-only shaping merges consecutive user turns via mergeConsecutiveApiMessages() to reduce token overhead without mutating stored history.
  • Slash-command mention parsing now returns slashCommandHelp separately and processUserContentMentions() appends it as a dedicated text block (instead of mixing it into the main user text).

Tested

  • cd src && npx vitest run core/task/tests/mergeConsecutiveApiMessages.spec.ts core/condense/tests/condense.spec.ts core/condense/tests/index.spec.ts core/condense/tests/rewind-after-condense.spec.ts core/mentions/tests/processUserContentMentions.spec.ts tests/command-mentions.spec.ts core/webview/tests/webviewMessageHandler.delete.spec.ts
  • cd apps/web-roo-code && npm run lint && npm run check-types
  • cd apps/web-evals && npm run lint && npm run check-types && npx vitest run

@hannesrudolph hannesrudolph force-pushed the fix/condense-rework branch 2 times, most recently from bb3fb35 to 9ea6b3f Compare January 22, 2026 01:02
@hannesrudolph hannesrudolph changed the base branch from main to fix/migrate-condensing-prompt January 22, 2026 01:02
@RooCodeInc RooCodeInc deleted a comment from github-actions bot Jan 22, 2026
Base automatically changed from fix/migrate-condensing-prompt to main January 22, 2026 02:33
@hannesrudolph hannesrudolph changed the base branch from main to fix/openai-native-double-emission January 22, 2026 05:21
Base automatically changed from fix/openai-native-double-emission to main January 22, 2026 06:22
@hannesrudolph hannesrudolph force-pushed the fix/condense-rework branch 2 times, most recently from f56bced to dca5f66 Compare January 22, 2026 20:45
- Fix orphan tool_result filtering after fresh start condensation
- Add CRITICAL instructions to SUMMARY_PROMPT and CONDENSE template to prevent tool calls during condensing
- Inject synthetic tool_results for orphan tool_calls before condensing
- Pass tools/metadata to condensation API call
- Use standard ErrorRow with Details button for condensation errors
- Remove stack trace from error details
- Separate summary content into multiple text blocks
- Update tests for fresh start model behavior
- Add missing await to this.say() in condenseContext() error path to
  prevent race conditions with persistence/UI updates
- Update comment at line 4075 to accurately reflect that
  mergeConsecutiveApiMessages() excludes summary messages
The mergeConsecutiveApiMessages function now allows merging a regular
user message that follows a summary message. Since this is API-only
shaping (storage is unaffected), rewind semantics remain intact.

- Remove !prev.isSummary guard to allow merge INTO summary
- Keep !msg.isSummary guard to prevent merging a summary INTO something
- Update tests to reflect new expected behavior
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 23, 2026
Remove unused functions and types that were part of the old condensation model:
- getKeepMessagesWithToolBlocks function
- KeepMessagesResult type
- N_MESSAGES_TO_KEEP constant
- hasToolResultBlocks helper
- getToolResultBlocks helper
- findToolUseBlockById helper
- getReasoningBlocks helper

These were relics of the old model that kept trailing N messages after the summary.
The fresh start model no longer needs them.
- Remove unnecessary JSON encoding in Task.ts when calling say() for
  condense_context_error - now passes error message directly
- Simplify CondensationErrorRow component: remove JSON parsing logic and
  ErrorRow dependency, just display errorText directly with inline styling
- Reduces code complexity while maintaining the same user-facing behavior
When a user sets a custom condensing prompt, it should control what
instructions are sent to the model. Previously, the code used the
custom prompt only for the system prompt while the user message
content was hardcoded to supportPrompt.default.CONDENSE.

Now the custom prompt (or default CONDENSE) is used as the
finalRequestMessage content, ensuring user customization is respected.

Updated tests to verify the custom prompt appears in the user message.
@hannesrudolph
Copy link
Collaborator Author

Yes, this was an unintentional bug. I've pushed a fix (commit 7a361ae) that now properly uses the customCondensingPrompt (or defaults to supportPrompt.default.CONDENSE) for the user message content. This ensures user customization is respected when they set a custom condensing prompt.

Before: The custom prompt was only used for the system prompt, while the user message was hardcoded to supportPrompt.default.CONDENSE.

After: The custom prompt (or default) is now used as the finalRequestMessage.content, so users can fully customize the summarization instructions sent to the model.

@hannesrudolph hannesrudolph merged commit cf5d42e into main Jan 23, 2026
10 checks passed
@hannesrudolph hannesrudolph deleted the fix/condense-rework branch January 23, 2026 19:33
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jan 23, 2026
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jan 23, 2026
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Jan 24, 2026
* feat: Change "Get Started" button label to "Create Roo Account" (RooCodeInc#10543)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: add @roo-code/cli to changeset ignore list (RooCodeInc#10545)

* Changeset version bump (RooCodeInc#10546)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Update changelog for version 3.39.0 release

* fix: change minItems from 2 to 1 for Anthropic API compatibility (RooCodeInc#10551)

* fix: disable Gemini thought signature persistence to prevent corrupted signature errors (RooCodeInc#10554)

* fix: stabilize file paths during native tool call streaming (RooCodeInc#10555)

* Release v3.39.1 (RooCodeInc#10557)

* Changeset version bump (RooCodeInc#10558)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* chore(cli): change default model to anthropic/claude-opus-4.5 (RooCodeInc#10544)

* fix: ensure assistant message content is never undefined for Gemini compatibility (RooCodeInc#10559)

* Update Terms of Service (effective January 9, 2026) (RooCodeInc#10568)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix(vscode-lm): order text parts before tool calls in assistant messages (RooCodeInc#10573)

* fix: merge approval feedback into tool result instead of pushing duplicate (ROO-410) (RooCodeInc#10519)

* feat: improve error messaging for stream termination errors from provider (RooCodeInc#10548)

* fix(openai): remove convertToSimpleMessages to fix tool calling for OpenAI-compatible providers (RooCodeInc#10575)

* Move more types to @roo-code/types (for the cli) (RooCodeInc#10583)

* Add some functionality to @roo-code/core for the cli (RooCodeInc#10584)

* Add some slash commands that are useful for cli development (RooCodeInc#10586)

* feat: add debug setting to settings page (RooCodeInc#10580)

* 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>

* fix: round-trip Gemini thought signatures for tool calls (RooCodeInc#10590)

* fix: make edit_file matching more resilient (RooCodeInc#10585)

* chore(gemini): stop overriding tool allow/deny lists (RooCodeInc#10592)

* fix(cerebras): ensure all tools have consistent strict mode values (RooCodeInc#10589)

Co-authored-by: Roo Code <roomote@roocode.com>

* chore: disable edit_file tool for Gemini/Vertex (RooCodeInc#10594)

* Release v3.39.2 (RooCodeInc#10595)

* Changeset version bump (RooCodeInc#10596)

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 a TUI (RooCodeInc#10480)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>

* Allow the cli release script to install locally for testing (RooCodeInc#10597)

* feat(ipc): add retry mechanism and error handling

* More file organization for the cli (RooCodeInc#10599)

* refactor: rename roo-cli to cos-cli and update related references

* Some cleanup in ExtensionHost (RooCodeInc#10600)

Co-authored-by: Roo Code <roomote@roocode.com>

* refactor: optimize response rendering and tool call handling

* Rename Roo Code Cloud Provider to Roo Code Router (RooCodeInc#10560)

Co-authored-by: Roo Code <roomote@roocode.com>

* chore: bump version to v1.102.0 (RooCodeInc#10604)

* Update router name in types (RooCodeInc#10605)

* Update Roo Code Router service name (RooCodeInc#10607)

* chore: add changeset for v3.39.3 (RooCodeInc#10608)

* Update router name in types (RooCodeInc#10610)

* Changeset version bump (RooCodeInc#10609)

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 debug mode configuration and state management

* fix(settings): add debug condition for ZgsmAI custom config

* Basic settings search (RooCodeInc#10619)

* Prototype of a simpler searchable settings

* Fix tests

* UI improvements

* Input tweaks

* Update webview-ui/src/components/settings/SettingsSearch.tsx

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* fix: remove duplicate Escape key handler dead code

* Cleanup

* Fix tests

---------

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>

* ux: UI improvements to search settings (RooCodeInc#10633)

* UI changs

* Update webview-ui/src/components/marketplace/MarketplaceView.tsx

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* i18n

---------

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* feat: display edit_file errors in UI after consecutive failures (RooCodeInc#10581)

* feat(chat): enhance reasoning block with animated thinking indicator and varied messages

* perf: optimize message block cloning in presentAssistantMessage (RooCodeInc#10616)

* feat(chat): add random loading messages with localization

* fix: correct Gemini 3 thought signature injection format via OpenRouter (RooCodeInc#10640)

* fix: encode hyphens in MCP tool names before sanitization (RooCodeInc#10644)

* fix: sanitize tool_use IDs to match API validation pattern (RooCodeInc#10649)

* fix(path): return empty string from getReadablePath when path is empty - ROO-437 (RooCodeInc#10638)

* ux: Standard stop button 🟥  (RooCodeInc#10639)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* fix: omit parallel_tool_calls when not explicitly enabled (COM-406) (RooCodeInc#10671)

* fix: use placeholder for empty tool result content to fix Gemini API validation (RooCodeInc#10672)

* ux: Further improve error display (RooCodeInc#10692)

* Ensures error details are shown for all errors (except diff, which has its own case)

* More details

* litellm is a proxy

* ux: improve stop button visibility and streamline error handling (RooCodeInc#10696)

* Restores the send button in the message edit mode

* Makes the stop button more prominent

* fix: clear approval buttons when API request starts (ROO-526) (RooCodeInc#10702)

* chore: add changeset for v3.40.0 (RooCodeInc#10705)

* Changeset version bump (RooCodeInc#10706)

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(gemini): add allowedFunctionNames support to prevent mode switch errors (RooCodeInc#10708)

Co-authored-by: Roo Code <roomote@roocode.com>

* Release v3.40.1 (RooCodeInc#10713)

* Changeset version bump (RooCodeInc#10714)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release: v1.105.0 (RooCodeInc#10722)

* feat(providers): add gpt-5.2-codex model to openai-native provider (RooCodeInc#10731)

* feat(e2e): Enable E2E tests - 39 passing tests (RooCodeInc#10720)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* Clear terminal output buffers to prevent memory leaks (RooCodeInc#7666)

* feat: add OpenAI Codex provider with OAuth subscription authentication (RooCodeInc#10736)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix(litellm): inject dummy thought signatures on ALL tool calls for Gemini (RooCodeInc#10743)

* fix(e2e): add alwaysAllow config for MCP time server tools (RooCodeInc#10733)

* Release v3.41.0 (RooCodeInc#10746)

* Changeset version bump (RooCodeInc#10747)

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: clarify Slack and Linear are Cloud Team only features (RooCodeInc#10748)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release: v1.106.0 (RooCodeInc#10749)

* refactor(chat): replace current task display with last user feedback

* style(chat): adjust feedback text width calculation

* fix: handle missing tool identity in OpenAI Native streams (RooCodeInc#10719)

* Feat/issue 5376 aggregate subtask costs (RooCodeInc#10757)

* feat(chat): add streaming state to task header interaction

* feat: add settings tab titles to search index (RooCodeInc#10761)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: filter Ollama models without native tool support (RooCodeInc#10735)

* fix: filter out empty text blocks from user messages for Gemini compatibility (RooCodeInc#10728)

* fix: flatten top-level anyOf/oneOf/allOf in MCP tool schemas (RooCodeInc#10726)

* fix: prevent duplicate tool_use IDs causing API 400 errors (RooCodeInc#10760)

* fix: truncate call_id to 64 chars for OpenAI Responses API (RooCodeInc#10763)

* fix: Gemini thought signature validation errors (RooCodeInc#10694)

Co-authored-by: Roo Code <roomote@roocode.com>

* Release v3.41.1 (RooCodeInc#10767)

* Changeset version bump (RooCodeInc#10768)

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 button to open markdown in VSCode preview (RooCodeInc#10773)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix(openai-codex): reset invalid model selection (RooCodeInc#10777)

* fix: add openai-codex to providers that don't require API key (RooCodeInc#10786)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix(litellm): detect Gemini models with space-separated names for thought signature injection (RooCodeInc#10787)

* Release v3.41.2 (RooCodeInc#10788)

* Changeset version bump (RooCodeInc#10790)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Roo Code Router fixes for the cli (RooCodeInc#10789)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* Revert "feat(e2e): Enable E2E tests - 39 passing tests" (RooCodeInc#10794)

Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>

* Claude-like cli flags, auth fixes (RooCodeInc#10797)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>

* Release cli v0.0.47 (RooCodeInc#10798)

* Use a redirect instead of a fetch for cli auth (RooCodeInc#10799)

* chore(cli): prepare release v0.0.48 (RooCodeInc#10800)

* Fix thinking block word-breaking to prevent horizontal scroll (RooCodeInc#10806)

Co-authored-by: Roo Code <roomote@roocode.com>

* chore: add changeset for v3.41.3 (RooCodeInc#10822)

* Removal of glm4 6 (RooCodeInc#10815)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Changeset version bump (RooCodeInc#10823)

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: warn users when too many MCP tools are enabled (RooCodeInc#10772)

* 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>

* Support different cli output formats: text, json, streaming json (RooCodeInc#10812)

Co-authored-by: Roo Code <roomote@roocode.com>

* chore(cli): prepare release v0.0.49 (RooCodeInc#10825)

* fix(cli): set integrationTest to true in ExtensionHost constructor (RooCodeInc#10826)

* fix(cli): fix quiet mode tests by capturing console before host creation (RooCodeInc#10827)

* refactor: unify user content tags to <user_message> (RooCodeInc#10723)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat(openai-codex): add ChatGPT subscription usage limits dashboard (RooCodeInc#10813)

* perf(webview): avoid resending taskHistory in state updates (RooCodeInc#10842)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* Fix broken link on pricing page (RooCodeInc#10847)

* fix: update broken pricing link to /models page

* Update apps/web-roo-code/src/app/pricing/page.tsx

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>

* Git worktree management (RooCodeInc#10458)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* feat: enable prompt caching for Cerebras zai-glm-4.7 model (RooCodeInc#10670)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: add Kimi K2 thinking model to VertexAI provider (RooCodeInc#9269)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: standardize model selectors across all providers (RooCodeInc#10294)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>

* chore: remove XML tool calling support (RooCodeInc#10841)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Fix broken link on pricing page (RooCodeInc#10847)

* fix: update broken pricing link to /models page

* Update apps/web-roo-code/src/app/pricing/page.tsx

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>

* Pr 10853 (RooCodeInc#10854)

Co-authored-by: Roo Code <roomote@roocode.com>

* Git worktree management (RooCodeInc#10458)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* feat: enable prompt caching for Cerebras zai-glm-4.7 model (RooCodeInc#10670)

Co-authored-by: Roo Code <roomote@roocode.com>
(cherry picked from commit c7ce8aa)

* feat: add Kimi K2 thinking model to VertexAI provider (RooCodeInc#9269)

Co-authored-by: Roo Code <roomote@roocode.com>
(cherry picked from commit a060915)

* feat: standardize model selectors across all providers (RooCodeInc#10294)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
(cherry picked from commit e356d05)

* fix: resolve race condition in context condensing prompt input (RooCodeInc#10876)

* Copy: update /slack page messaging (RooCodeInc#10869)

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

* fix: Handle mode selector empty state on workspace switch (RooCodeInc#9674)

* 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>

* Roo to main remove xml (#936)

* Fix broken link on pricing page (RooCodeInc#10847)

* fix: update broken pricing link to /models page

* Update apps/web-roo-code/src/app/pricing/page.tsx

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>

* Git worktree management (RooCodeInc#10458)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* feat: enable prompt caching for Cerebras zai-glm-4.7 model (RooCodeInc#10670)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: add Kimi K2 thinking model to VertexAI provider (RooCodeInc#9269)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: standardize model selectors across all providers (RooCodeInc#10294)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>

* chore: remove XML tool calling support (RooCodeInc#10841)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Pr 10853 (RooCodeInc#10854)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat(commit): enhance git diff handling for new repositories

* feat(task): support fake_tool_call for Qwen model with XML tool call format

* feat(prompts): add snapshots for custom instructions and system prompt variations

---------

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: Chris Estreich <cestreich@gmail.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: MP <michael@roocode.com>

* feat: remove Claude Code provider (RooCodeInc#10883)

* refactor: migrate context condensing prompt to customSupportPrompts and cleanup legacy code (RooCodeInc#10881)

* refactor: unify export path logic and default to Downloads (RooCodeInc#10882)

* Fix marketing site preview logic (RooCodeInc#10886)

* feat(web): redesign Slack page Featured Workflow section with YouTube… (RooCodeInc#10880)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>

* feat: add size-based progress tracking for worktree file copying (RooCodeInc#10871)

* feat: add HubSpot tracking with consent-based loading (RooCodeInc#10885)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix(openai): prevent double emission of text/reasoning in native and codex handlers (RooCodeInc#10888)

* Fix padding on Roo Code Cloud upsell (RooCodeInc#10889)

Co-authored-by: Roo Code <roomote@roocode.com>

* Open the worktreeinclude file after creating it (RooCodeInc#10891)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* fix: prevent task abortion when resuming via IPC/bridge (RooCodeInc#10892)

* fix: rename bot to 'Roomote' and fix spacing in Slack demo (RooCodeInc#10898)

* Fix: Enforce file restrictions for all editing tools (RooCodeInc#10896)

Co-authored-by: Roo Code <roomote@roocode.com>

* chore: clean up XML legacy code and native-only comments (RooCodeInc#10900)

* feat: hide worktree feature from menus (RooCodeInc#10899)

* fix(condense): remove custom condensing model option (RooCodeInc#10901)

* 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>

* test(prompts): update snapshots to fix indentation

* Fix EXT-553: Remove percentage-based progress tracking for worktree file copying (RooCodeInc#10905)

* 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>

* chore(prompts): clarify linked SKILL.md file handling (RooCodeInc#10907)

* Release v3.42.0 (RooCodeInc#10910)

* Changeset version bump (RooCodeInc#10911)

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: Move condense prompt editor to Context Management tab (RooCodeInc#10909)

* feat: Update Z.AI models with new variants and pricing (RooCodeInc#10860)

Co-authored-by: erdemgoksel <erdemgoksel@MAU-BILISIM42>

* fix: correct Gemini 3 pricing for Flash and Pro models (RooCodeInc#10487)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: add pnpm install:vsix:nightly command (RooCodeInc#10912)

* Intelligent Context Condensation v2 (RooCodeInc#10873)

* feat(gemini): add tool call support for Gemini CLI

* feat(condense): improve condensation with environment details, accurate token counts, and lazy evaluation (RooCodeInc#10920)

* docs: fix CLI README to use correct command syntax (RooCodeInc#10923)

Co-authored-by: Roo Code <roomote@roocode.com>

* chore: remove diffEnabled and fuzzyMatchThreshold settings (RooCodeInc#10298)

* Remove Merge button from worktrees (RooCodeInc#10924)

Co-authored-by: Roo Code <roomote@roocode.com>

* chore: remove POWER_STEERING experimental feature (RooCodeInc#10926)

- 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

* chore: remove MULTI_FILE_APPLY_DIFF experiment (RooCodeInc#10925)

* 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.

* fix: convert orphaned tool_results to text blocks after condensing (RooCodeInc#10927)

* 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>

* refactor: remove legacy XML tool calling code (getToolDescription) (RooCodeInc#10929)

- 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 duplicate model display for OpenAI Codex provider (RooCodeInc#10930)

Co-authored-by: Roo Code <roomote@roocode.com>

* Skip thoughtSignature blocks during markdown export RooCodeInc#10199 (RooCodeInc#10932)

* fix: use json-stream-stringify for pretty-printing MCP config files (RooCodeInc#9864)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: auto-migrate v1 condensing prompt and handle invalid providers on import (RooCodeInc#10931)

* chore: add changeset for v3.43.0 (RooCodeInc#10933)

* Changeset version bump (RooCodeInc#10934)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Replace hyphen encoding with fuzzy matching for MCP tool names (RooCodeInc#10775)

* fix: truncate AWS Bedrock toolUseId to 64 characters (RooCodeInc#10902)

* feat: remove MCP SERVERS section from system prompt (RooCodeInc#10895)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat(tools): enhance Gemini CLI with new tool descriptions and formatting

* feat(task): improve smart mistake detector with error source tracking and refined auto-switching

* feat: update Fireworks provider with new models (RooCodeInc#10679)

Fixes RooCodeInc#10674

Added new models:
- MiniMax M2.1 (minimax-m2p1)
- DeepSeek V3.2 (deepseek-v3p2)
- GLM-4.7 (glm-4p7)
- Llama 3.3 70B Instruct (llama-v3p3-70b-instruct)
- Llama 4 Maverick Instruct (llama4-maverick-instruct-basic)
- Llama 4 Scout Instruct (llama4-scout-instruct-basic)

All models include correct pricing, context windows, and capabilities.

* ux: Improve subtask visibility and navigation in history and chat views (RooCodeInc#10864)

* 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>

* fix(types): remove unsupported Fireworks model tool fields (RooCodeInc#10937)

fix(types): remove unsupported tool capability fields from Fireworks model metadata

Co-authored-by: Roo Code <roomote@roocode.com>

---------

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: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: Archimedes <84040360+ArchimedesCrypto@users.noreply.github.com>
Co-authored-by: Patrick Decat <pdecat@gmail.com>
Co-authored-by: T <taltas@users.noreply.github.com>
Co-authored-by: Seb Duerr <sebastian.duerr@cerebras.net>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: MP <michael@roocode.com>
Co-authored-by: Erdem <74366943+ErdemGKSL@users.noreply.github.com>
Co-authored-by: erdemgoksel <erdemgoksel@MAU-BILISIM42>
Co-authored-by: rossdonald <49425722+rossdonald@users.noreply.github.com>
Co-authored-by: Michaelzag <michael@michaelzag.com>
Co-authored-by: Thanh Nguyen <74597207+ThanhNguyxn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants