Skip to content

/add-dir does not add the directory to the sandbox allow list #5076

Description

@rynoV

Describe the bug

/add-dir does not add the directory to the sandbox allow list

Affected version

GitHub Copilot CLI 1.0.93.

Steps to reproduce the behavior

  1. /add-dir ../other-folder
  2. Prompt: I'm testing out the sandbox. Try a shell command that lists files in ../other-folder
  3. See permission requested for tool call because ../other-folder is outside the sandbox

Expected behavior

/add-dir also allows access when sandbox is enabled

Additional context

Tested on Windows and Linux, model used powershell and bash commands

Activity

  1. added theissue type on Oct 7, 2026
  2. caarlos0 commented on Oct 7, 2026

    @caarlos0
    Member

    To add a directory to your policy, you can run /sandbox config and add a directory in the filesystem there.

    Could you elaborate a little on what lead you to believe that /add-dir would do it? (genuinely curious)

  3. self-assigned this
    on Oct 7, 2026
  4. ja552588 commented on Oct 7, 2026

    @ja552588

    How much my billing.

  5. rynoV commented on Oct 7, 2026

    @rynoV
    Author

    @caarlos0 the current folder is allowed in the sandbox, I expected add-dir to give the new directory the same treatment (isn't add-dir supposed to allow the model to access the new folder?) . Maybe this should be a feature request

  6. removed theissue type on Oct 7, 2026
  7. added theissue type on Oct 7, 2026
  8. caarlos0 commented on Oct 9, 2026

    @caarlos0
    Member

    This will be fixed on the next version! Thanks, all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions