Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Failed to move agent root: Failed to checkout migrated branch 'master'
Command failed: git fetch origin +refs/heads/master:refs/remotes/origin/master ...
fatal: 'origin' does not appear to be a git repository
Steps to Reproduce
-
Open a local agent chat in a folder that is a git repo without any remote (e.g.
git init, commits onmaster, noorigin). -
Have a second folder to add (git or non-git).
-
Agent calls
move_agent_to_rootwith:{ "rootPaths": ["C:\\work\\Projects\\folder1", "C:\\work\\Projects\\folder2"] } -
Approve the tool if Smart Mode asks.
Expected Behavior
Multi-root workspace opens with both folders; chat continues
Operating System
Windows 10/11
Version Information
Version: 3.21.16 (user setup)
VS Code Extension API: 1.128.0
Commit: 8ae78e8eee1e63479c7e0504b664bc0a80c68000
Date: 2026-09-19T06:43:22.276Z
Layout: Agent Window
Build Type: Stable
Release Track: Default
Electron: 42.10.0
Chromium: 148.0.7778.280
Node.js: 24.18.1
V8: 14.8.178.38-electron.0
xterm.js: 6.1.0-beta.291
OS: Windows_NT x64 10.0.26200
Additional Information
The failure was on the primary repo (folder1), which had commits on master but no origin remote at all. The error does not say which repo/path failed.
After adding a local bare origin and pushing master, the same call succeeded:
Moved agent root to ...\glassMultiRootWorkspaces\folder1-2.code-workspace
Also:
move_agent_to_cloned_rootfailed with the same error in this setup; the “skips git fetch” behavior did not help.- This is agent migration (
beginMigration+ branch checkout), not the same as File → Add Folder to Workspace (IDE-only).
Suggested fixes
- Error message should include repo path that failed fetch/checkout.
- Document that every
rootPathsentry needs a git repo withoriginand branchmaster(or whatever the agent tracks). - Optionally: skip git checkout for non-git folders; or a flag to add folders without full migration.
Workaround
Add a local bare remote and push master on each root before calling the tool.
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor