Skip to content

update-agent-context.sh breaks symlinks #1464

@przadka

Description

@przadka

Bug

update-agent-context.sh doesn't check if the target agent file (e.g., CLAUDE.md) is a symlink before writing to it. This converts the symlink into a regular file.

Steps to Reproduce

  1. Create AGENTS.md with your agent instructions
  2. Create symlink: ln -s AGENTS.md CLAUDE.md
  3. Run /speckit.plan which calls update-agent-context.sh claude
  4. Check CLAUDE.md - it's now a regular file instead of a symlink

Expected Behavior

The script should either:

  • Detect symlinks and update the target file instead
  • Skip updating symlinked files
  • Warn the user that a symlink will be converted

Workaround

Manually restore the symlink after running the script:

rm CLAUDE.md && ln -s AGENTS.md CLAUDE.md

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