Skip to content

bug: "rtk init -g --agent cursor" errors due to expecting $HOME/.claude #1465

Closed

Description

@lrstanley

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:

  1. --agent cursor to only install for Cursor.
  2. 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.

Activity

  1. added
    bug
    effort-small
    good first issue
    on Apr 22, 2026
  2. pszymkowiak commented on Apr 22, 2026

    @pszymkowiak
    Collaborator

    Closing as duplicate of #2097. See the original issue for updates.

  3. thalesreisbr commented on Apr 27, 2026

    @thalesreisbr

    Hi @pszymkowiak

    Is there any alternative way to work around the problem until the fix is ​​implemented?

  4. added
    P1-critical
    on Apr 28, 2026
  5. georgie-vtf-velev commented on May 7, 2026

    @georgie-vtf-velev

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

  6. michael-preuss commented on May 20, 2026

    @michael-preuss

    @thalesreisbr simply create the .claude folder in your home directory, then run the script again. worked for me.

  7. added
    duplicate
    on May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1-criticalarea:clibugduplicateeffort-smallgood first issueplatform:linuxpriority:medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions