Skip to content

[BUG] Relative symlinks in rules files not resolved correctly when accessed through a symlinked directory #440

@p12tic

Description

@p12tic

Problem (one or two sentences)

When a .roo/rules directory is itself a symlink to an external directory, and files inside that directory are relative symlinks, Roo Code fails to read those rule files. Absolute symlinks work correctly.

Context (who is affected and when)

Happens to users who have complicated symlinked rules directories to share rules across multiple projects.

Reproduction steps

Have this directory structure:

/path/1-project.txt              # actual rules file
/path/rules/                     # actual rules directory
/path/rules/1-project.txt -> ../1-project.txt   # relative symlink

/project/.roo/rules -> /path/rules              # symlinked rules dir

Observe that rules from 1-project.txt will be ignored.

Expected result

Rules from symlinked file are not ignored.

Actual result

Rules from symlinked file are ignored.

Variations tried (optional)

No response

App Version

Roo code 3.50.0

API Provider (optional)

None

Model Used (optional)

No response

Relevant logs or errors (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions