You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: "rtk init -g --agent cursor" errors due to expecting $HOME/.claude #1465
Using the latest version, v0.37.2, on WSL2 (ubuntu), I receive the following error during initial setup:
$ rtk init -g --agent cursor
rtk: Failed to write RTK.md: /home/liam/.claude/RTK.md: Failed to create temp file in /home/liam/.claude: No such file or directory (os error 2) at path "/home/liam/.claude/.tmpznCCwz"
I suspect that --agent cursor still tries to setup Claude and Copilot, but because I don't use either on this device, it errors out. I would expect:
--agent cursor to only install for Cursor.
If claude was used, but the directory didn't exist, create it first, and/or skip over it if the primary agent target isn't claude.
I am able to get around this by manually creating that directory, and re-running, but this still initializes files and pollutes my home directory unnecessarily, which should be avoided.
Reacted by Phillip Winn, ihelmer07, Morteza Sabihi, Jacek Czerski, Lucas Siebels, Chris Ondrovic, Margaret Prokhorova, Vincent Reniers, Erwin L., SimonP35 and 6 more
What you've written mean that either opencode is true or claude is true and there is no case where if neither is set via the arguments, ergo the case with Cursor, install_claude will always end up being True because opencode will always be False.
install_claude should be something like !opencode && agent == Some(AgentTarget::Claude) and respectively similar for install_opencode
Activity
pszymkowiak commentedon Apr 22, 2026
Closing as duplicate of #2097. See the original issue for updates.
thalesreisbr commentedon Apr 27, 2026
Hi @pszymkowiak
Is there any alternative way to work around the problem until the fix is implemented?
georgie-vtf-velev commentedon May 7, 2026
Same issue on Linux with 0.39.
The bug comes from this line here https://github.com/rtk-ai/rtk/blob/master/src/main.rs#L1788
and the switch statement here https://github.com/rtk-ai/rtk/blob/master/src/hooks/init.rs#L283
What you've written mean that either
opencodeis true orclaudeis true and there is no case where if neither is set via the arguments, ergo the case with Cursor,install_claudewill always end up being True because opencode will always be False.install_claudeshould be something like!opencode && agent == Some(AgentTarget::Claude)and respectively similar forinstall_opencodemichael-preuss commentedon May 20, 2026
@thalesreisbr simply create the .claude folder in your home directory, then run the script again. worked for me.