Find a file
Seth Miller f839d4c27b
fix: prevent MCP server restart when toggling tool permissions (#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.
2025-10-28 19:42:22 -04:00
.changeset Changeset version bump (#8879) 2025-10-28 13:01:05 -04:00
.github ci: refresh contrib.rocks cache workflow (#8083) 2025-09-29 13:17:05 -04:00
.husky Improve POSIX shell compatibility in pre-push hook (#4053) 2025-05-28 14:46:40 -07:00
.roo Normalize docs-extractor audience tags; remove admin/stakeholder; strip tool invocations (#8717) 2025-10-17 19:17:38 -04:00
.vscode Rate limit when starting a subtask (#4453) 2025-06-18 12:45:36 -04:00
apps Add how it works section to reviewer landing page (#8884) 2025-10-28 10:37:40 -04:00
locales fix: update X/Twitter username from roo_code to roocode (#8780) 2025-10-22 16:27:08 -04:00
packages feat: update Gemini models with latest 09-2025 versions (#8486) 2025-10-27 22:04:08 -04:00
releases Release v3.29.1 (#8854) 2025-10-26 22:24:11 -04:00
scripts feat: add package.nls.json checking to find-missing-translations script (#8255) 2025-09-23 11:10:23 -04:00
src fix: prevent MCP server restart when toggling tool permissions (#8633) 2025-10-28 19:42:22 -04:00
webview-ui docs(vscode-lm): clarify VS Code LM API integration warning (#8493) 2025-10-28 19:38:18 -04:00
.dockerignore Bring back "Use @roo-code/cloud from npm" (#6795) 2025-08-06 20:51:41 -10:00
.env.sample Expose thinking tokens for roo/sonic (#7212) 2025-08-19 07:01:01 -07:00
.git-blame-ignore-revs Moved repo to new org (#3756) 2025-05-20 16:42:18 -04:00
.gitattributes feat: mark non-English package.nls.*.json files as linguist-generated (#7271) 2025-08-21 02:56:55 -07:00
.gitconfig Set up ignoring revisions for git blame 2025-01-17 11:21:25 -08:00
.gitignore Update @roo-code/cloud to enable roomote control for cloud agents (#7446) 2025-08-27 00:53:40 -07:00
.nvmrc Upgrade Node.js to v20.19.2 for security enhancements (#4212) 2025-06-01 17:02:44 -04:00
.prettierrc.json Fix Posthog by correctly copying .env in the build process (#4049) 2025-05-27 11:19:21 -07:00
.rooignore Add telemetry and privacy policy 2025-03-07 03:03:44 -05:00
.roomodes Normalize docs-extractor audience tags; remove admin/stakeholder; strip tool invocations (#8717) 2025-10-17 19:17:38 -04:00
.tool-versions chore(deps): update node.js to v20.19.2 (#4159) 2025-05-30 22:48:46 -04:00
CHANGELOG.md Changeset version bump (#8879) 2025-10-28 13:01:05 -04:00
CODE_OF_CONDUCT.md Fix inconsistencies in markdown file i18n (#4681) 2025-06-13 23:05:25 -04:00
CONTRIBUTING.md CONTRIBUTING.md tweaks and issue template rewrite (#8014) 2025-09-16 00:29:45 -04:00
ellipsis.yaml Revert "Turn off ellipsis quiet mode" 2025-03-07 02:26:25 -05:00
knip.json feat: implement sitemap generation in TypeScript and remove XML file (#6206) 2025-08-14 11:53:16 -04:00
LICENSE Update LICENSE (#2275) 2025-04-03 23:54:26 -04:00
package.json Move @roo-code/cloud to the Roo-Code repo (#7503) 2025-08-28 11:18:45 -07:00
pnpm-lock.yaml web: Dynamic OpenGraph images (#8773) 2025-10-22 10:04:28 -04:00
pnpm-workspace.yaml Move e2e into apps (#3823) 2025-05-22 08:41:58 -07:00
PRIVACY.md Make Posthog telemetry the default (#7909) 2025-09-11 15:50:40 -04:00
README.md fix: update X/Twitter username from roo_code to roocode (#8780) 2025-10-22 16:27:08 -04:00
renovate.json Ignore @vscode/vsce in renovate (#4170) 2025-05-31 00:22:14 -04:00
SECURITY.md Create SECURITY.md 2025-06-05 10:22:15 -04:00
tsconfig.json Task metadata (#7092) 2025-08-14 03:14:17 -07:00
turbo.json Improve turbo task dependency declarations (#4323) 2025-06-04 09:32:27 -07:00

VS Code X YouTube Join Discord Join r/RooCode

Get help fast → Join Discord • Prefer async? → Join r/RooCode

Roo Code

Your AI-Powered Dev Team, Right in Your Editor

🌐 Available languages

What Can Roo Code Do For YOU?

  • 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

Modes

Roo Code adapts to how you work:

  • Code Mode: everyday coding, edits, and file ops
  • Architect Mode: plan systems, specs, and migrations
  • Ask Mode: fast answers, explanations, and docs
  • Debug Mode: trace issues, add logs, isolate root causes
  • Custom Modes: build specialized modes for your team or workflow
  • Roomote Control: Roomote Control lets you remotely control tasks running in your local VS Code instance.

Learn more: Using ModesCustom ModesRoomote Control

Tutorial & Feature Videos


Installing Roo Code

Configuring Profiles

Codebase Indexing

Custom Modes

Checkpoints

Todo Lists

More quick tutorial and feature videos...

Resources


Local Setup & Development

  1. Clone the repo:
git clone https://github.com/RooCodeInc/Roo-Code.git
  1. Install dependencies:
pnpm install
  1. Run the extension:

There are several ways to run the Roo Code extension:

Development Mode (F5)

For active development, use VSCode's built-in debugging:

Press F5 (or go to RunStart Debugging) in VSCode. This will open a new VSCode window with the Roo Code extension running.

  • Changes to the webview will appear immediately.
  • Changes to the core extension will also hot reload automatically.

Automated VSIX Installation

To build and install the extension as a VSIX package directly into VSCode:

pnpm install:vsix [-y] [--editor=<command>]

This command will:

  • Ask which editor command to use (code/cursor/code-insiders) - defaults to 'code'
  • Uninstall any existing version of the extension.
  • Build the latest VSIX package.
  • Install the newly built VSIX.
  • Prompt you to restart VS Code for changes to take effect.

Options:

  • -y: Skip all confirmation prompts and use defaults
  • --editor=<command>: Specify the editor command (e.g., --editor=cursor or --editor=code-insiders)

Manual VSIX Installation

If you prefer to install the VSIX package manually:

  1. First, build the VSIX package:
    pnpm vsix
    
  2. A .vsix file will be generated in the bin/ directory (e.g., bin/roo-cline-<version>.vsix).
  3. Install it manually using the VSCode CLI:
    code --install-extension bin/roo-cline-<version>.vsix
    

We use changesets for versioning and publishing. Check our CHANGELOG.md for release notes.


Disclaimer

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.


Contributors

Thanks to all our contributors who have helped make Roo Code better!

Contributors

License

Apache 2.0 © 2025 Roo Code, Inc.


Enjoy Roo Code! Whether you keep it on a short leash or let it roam autonomously, we cant wait to see what you build. If you have questions or feature ideas, drop by our Reddit community or Discord. Happy coding!