Skip to content

Running droid doesn't see AGENTS.md file in user's .factory folder if it's a symlink #38

Open

Description

@kasajian

I don't know if this is Windows only, or for all platforms.

droid cli executable will not see file at "%USERPROFILE%.factory\AGENTS.md"
if it's a symlink.

How to reproduce
from an Administrator cmd prompt, try:
mklink "%USERPROFILE%.factory\AGENTS.md" "C:\Sample\AGENTS.md"

This assume C:\Sample\AGENTS.md exists.

Then run droid cli and you will see that it cannot see the AGENTS.md file.

Now delete the link:
del /F /Q "%USERPROFILE%.factory\AGENTS.md"

And copy it to that location:
copy "C:\Sample\AGENTS.md" "%USERPROFILE%.factory\AGENTS.md"

now when you run droid, it will work.

Activity

  1. Emre-C commented on Sep 24, 2026

    @Emre-C

    Not Windows-only. Same on macOS (Darwin 25.6.0) with Droid 0.212.0, and it affects project-level AGENTS.md too, not just ~/.factory/AGENTS.md. Relative and absolute symlinks are both skipped; the same content in a regular file loads.

    R=$(mktemp -d); mkdir "$R/linked" "$R/regular"
    echo 'The canary word is PLUM-7731.' > "$R/rules.md"
    ln -s ../rules.md "$R/linked/AGENTS.md"
    cp "$R/rules.md" "$R/regular/AGENTS.md"
    Q='What canary word do your project instructions (AGENTS.md) give? Reply with only the word, or NONE if no project instructions are in your context.'
    (cd "$R/linked" && droid exec --only-tools LS "$Q")   # never PLUM-7731 (usually NONE)
    (cd "$R/regular" && droid exec --only-tools LS "$Q")  # PLUM-7731

    It's not the model: in ~/.factory/sessions/, each regular-file run's JSONL has a Project Instructions block with the file's contents, and none of the four symlink runs has one.

    Impact: instructions versioned in a git repo can't be symlinked into place, so every machine needs a hand-synced copy.

  2. mikirejf commented on Sep 28, 2026

    @mikirejf

    Still happens in Droid 0.228.0 on macOS. Relative and absolute symlinks at ~/.factory/AGENTS.md are both skipped. A hard link or plain copy loads. I use GNU Stow, which links files into place, so this affects anyone who keeps their dotfiles that way.

  3. sashalab commented on Nov 18, 2026

    @sashalab

    Additional data point on macOS (droid CLI 1.12.1): symlink handling is inconsistent across user-level config surfaces.

    • ~/.factory/output-styles/<style>.md as a symlink fails: /diagnostics reports "Output style file could not be read" and /settings marks the style as Invalid. Replacing the symlink with a regular copy of the same file fixes it.
    • .factory/droids as a symlink to a directory of droid definitions works fine — custom droids are discovered and usable.

    Repro for the output style case:

    1. Create a valid style file, e.g. ~/styles/mystyle.md.
    2. ln -s ~/styles/mystyle.md ~/.factory/output-styles/mystyle.md
    3. Run droid → /diagnostics shows "Output style file could not be read"; /settings shows the style as Invalid.
    4. Replace the symlink with a copy → the style loads correctly.

    Ideally all user-level config files and directories would resolve symlinks consistently.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions