Skip to content

[FEATURE] Support @ references for files in /add-dir directories #16792

Description

@Vwings

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

I often need to reference code from other local repositories, but Claude Code doesn't support using @ to reference files in directories added via /add-dir.
The current workflow requires me to manually type full absolute paths or read files first before I can reference them, which is tedious and error-prone.

Proposed Solution

I would like to be able to reference files from added directories using a prefix syntax like @workspace:alias/, while keeping @ for the current workspace. For example:

/add-dir /path/to/other-project as other
@workspace:other/src/utils.ts // reference from other project
@src/utils.ts // reference from current project

This prefix approach avoids conflicts with files in the current directory and clearly indicates the file is from another workspace.

Alternative Solutions

No response

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions