Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Nov 18, 2025

Fixes a bug where the lineCountTruncationError message was always showing XML tool instructions even when native tool protocol was enabled.

Problem

WriteToFileTool.ts was calling formatResponse.lineCountTruncationError() without passing the protocol parameter, causing it to default to XML protocol and display incorrect tool instructions.

Solution

  • Import resolveToolProtocol in WriteToFileTool.ts
  • Resolve the current tool protocol before calling lineCountTruncationError()
  • Pass the resolved protocol as the 4th parameter

Testing

All existing tests pass. The function now correctly displays native tool instructions when using native protocol.


Important

Fixes bug in WriteToFileTool.ts by resolving and passing the tool protocol to lineCountTruncationError() to ensure correct tool instructions are displayed.

  • Behavior:
    • Fixes bug in WriteToFileTool.ts where lineCountTruncationError defaulted to XML instructions.
    • Resolves tool protocol using resolveToolProtocol and passes it to lineCountTruncationError().
  • Testing:
    • All existing tests pass, confirming correct display of native tool instructions when using native protocol.

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

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Nov 18, 2025
@roomote
Copy link
Contributor

roomote bot commented Nov 18, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

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

@dosubot dosubot bot added the bug Something isn't working label Nov 18, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Nov 18, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 18, 2025
@mrubens mrubens merged commit 4bfd070 into main Nov 18, 2025
21 checks passed
@mrubens mrubens deleted the fix/write-to-file-protocol-parameter branch November 18, 2025 16:29
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Nov 18, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Nov 18, 2025
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 19, 2025
* fix: prevent MCP server restart when toggling tool permissions (RooCodeInc#8633)

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

* docs(readme): update readme images and image compression

* docs: replace inline base64 images with image file references

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* feat(terminal): refactor execa command execution for shell handling

* Feat: Add Minimax Provider (fixes RooCodeInc#8818) (RooCodeInc#8820)

Co-authored-by: xiaose <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>

* Release v3.29.4 (RooCodeInc#8906)

* fix: Gate auth-driven Roo model refresh to active provider only (RooCodeInc#8915)

* feat: add zai-glm-4.6 model to Cerebras and set gpt-oss-120b as default (RooCodeInc#8920)

* 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 <[email protected]>

---------

Co-authored-by: kevint-cerebras <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>

* roo provider: update session token on every request (RooCodeInc#8923)

* roo provider: update session token on every request

* Cleanup: remove unused imports

* Also refresh token before completePrompt()

* feat: add We're hiring link to announcement modal (RooCodeInc#8931)

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>

* Fix: Enhanced codebase index recovery and reuse ('Start Indexing' button now reuses existing Qdrant index) (RooCodeInc#8588)

Co-authored-by: daniel-lxs <[email protected]>

* fix: make code index initialization non-blocking at activation (RooCodeInc#8933)

* fix(context): truncate type definition to match max read line (RooCodeInc#8509)

Co-authored-by: daniel-lxs <[email protected]>

* fix: prevent infinite loop when canceling during auto-retry (RooCodeInc#8902)

* fix: prevent infinite loop when canceling during auto-retry

- Add abort check after backoffAndAnnounce in first-chunk retry logic
- Add abort check after backoffAndAnnounce in mid-stream retry logic
- Properly handle task abortion to break retry loops

Fixes RooCodeInc#8901

* docs: add critical comments explaining abort checks

- Document the importance of abort checks after backoff
- Explain how these checks prevent infinite loops
- Add context for future maintainability

---------

Co-authored-by: Roo Code <[email protected]>

* feat: rename MCP Errors tab to Logs for mixed-level messages (RooCodeInc#8894)

- 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 RooCodeInc#8893

Co-authored-by: Roo Code <[email protected]>

* feat: improve @ file search for large projects (RooCodeInc#8805)

* 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 RooCodeInc#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 RooCodeInc#5721

* fix: add missing translations for maximumIndexedFilesForFileSearch setting

* test: improve file-search tests to verify configuration behavior

* fix: remove search_and_replace tool from codebase (RooCodeInc#8892)

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>
Co-authored-by: Hannes Rudolph <[email protected]>

* Release v3.29.5 (RooCodeInc#8942)

* Changeset version bump (RooCodeInc#8907)

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

* Fix cost and token tracking between provider styles (RooCodeInc#8954)

* web: Attempt at compliant, cookie-less anonymous tracking for the website