Skip to content

rtk init -g --agent cursor fails #2097

Closed

Description

@akirilyuk

When trying to init rtk for cursor agent, the command fails with this error:

rtk init -g --agent cursor
rtk: Failed to write RTK.md: /Users/username/.claude/RTK.md: Failed to create temp file in /Users/username/.claude: No such file or directory (os error 2) at path "/Users/username/.claude/.tmprv5Suz"

Why is he trying to write something into the .claude folder if it should be rather .cursor

Activity

  1. pszymkowiak commented on May 27, 2026

    @pszymkowiak
    Collaborator

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟠 Priority high
    🎯 Confidence 91%

    Summary

    rtk init -g --agent cursor writes to ~/.claude/ instead of ~/.cursor/, causing a path error; fix the agent-to-directory mapping in the init command.

    This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.

    📁 Relevant files
    • src/init.rs
    • src/agents.rs

    Triaged automatically by wshm · This is an automated analysis, not a human review.

  2. ValterJunior commented on Jun 30, 2026

    @ValterJunior

    The label states "macos", but I can confirm it happens on Linux as well

  3. bru-braga commented on Jul 2, 2026

    @bru-braga

    The label states "macos", but I can confirm it happens on Linux as well

    +1

  4. skasero commented on Jul 13, 2026

    @skasero

    Any fix so far?

  5. d87skg commented on Jul 27, 2026

    @d87skg

    I ran into similar Cursor agent initialization failures. I built a flight recorder for AI agents that captures the full execution trace — lets you see exactly what happens at each step:

    pip install traccia-sdk
    traccia intercept -- python your_agent.py
    traccia replay traccia-*.evidence

    It preserves the complete timeline even when the agent crashes during init, so you can diagnose which step failed and why.

    https://github.com/d87skg/traccia

  6. AJIOB commented on Aug 3, 2026

    @AJIOB

    JFYI:

    • it writes in both ~/.claude and ~/.cursor
    • it's also stably reproduce on Windows & Linux
    • the main workaround is to create both of this directories

    P.S. Still wait for fix to drop the workaround from our scripts

  7. yolave commented on Sep 17, 2026

    @yolave

    JFYI:

    • it writes in both ~/.claude and ~/.cursor
    • it's also stably reproduce on Windows & Linux
    • the main workaround is to create both of this directories

    P.S. Still wait for fix to drop the workaround from our scripts

    this workaround did the job. Just commenting to keep this thread alive as no fix has been released yet.

  8. PedroS11 commented on Sep 19, 2026

    @PedroS11

    JFYI:

    • it writes in both ~/.claude and ~/.cursor
    • it's also stably reproduce on Windows & Linux
    • the main workaround is to create both of this directories

    P.S. Still wait for fix to drop the workaround from our scripts

    this workaround did the job. Just commenting to keep this thread alive as no fix has been released yet.

    What did you do?
    Let it create inside .claude and copy the new files into .cursor folder?
    It really sucks the MR with the fix is done and tested but not merged yet

  9. yolave commented on Sep 21, 2026

    @yolave

    JFYI:

    • it writes in both ~/.claude and ~/.cursor
    • it's also stably reproduce on Windows & Linux
    • the main workaround is to create both of this directories

    P.S. Still wait for fix to drop the workaround from our scripts

    this workaround did the job. Just commenting to keep this thread alive as no fix has been released yet.

    What did you do? Let it create inside .claude and copy the new files into .cursor folder? It really sucks the MR with the fix is done and tested but not merged yet

    When init with the Cursor config, you must create the .claude directory manually before and then run the command. This will allow to install the necessary files and config for Cursor.

  10. PedroS11 commented on Sep 21, 2026

    @PedroS11

    JFYI:

    • it writes in both ~/.claude and ~/.cursor
    • it's also stably reproduce on Windows & Linux
    • the main workaround is to create both of this directories

    P.S. Still wait for fix to drop the workaround from our scripts

    this workaround did the job. Just commenting to keep this thread alive as no fix has been released yet.

    What did you do? Let it create inside .claude and copy the new files into .cursor folder? It really sucks the MR with the fix is done and tested but not merged yet

    When init with the Cursor config, you must create the .claude directory manually before and then run the command. This will allow to install the necessary files and config for Cursor.

    Legend, it worked! I can see my saved tokens using rtk gain 👌

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions