Skip to content

trusted_folders config not respected for /tmp paths #2152

@levenleven

Description

@levenleven

Describe the bug

On macOS, /tmp is a symlink to /private/tmp. Even when both /tmp and /private/tmp are added to trusted_folders in ~/.copilot/config.json, the CLI still prompts for permission when writing to /tmp subdirectories.

Affected version

1.0.9

Steps to reproduce

  1. Add /tmp and /private/tmp to trusted_folders:
{
  "trusted_folders": [
    "/tmp",
    "/private/tmp"
  ]
}

Also tried via copilot config set trusted_folders — same result.

  1. Restart the CLI
  2. Ask Copilot to write a file to /tmp/foo/bar/file.txt
  3. Permission prompt appears:
This action may read or write the following paths outside your allowed directory list.
/tmp/foo/bar/file.txt, /tmp/foo/bar

Expected behavior

No permission prompt should appear since /tmp (and its resolved path /private/tmp) are both in trusted_folders.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions