Overview
Continue’s Agent and Plan modes can read files and list directories both within and outside your IDE workspace. For security, accessing files outside the workspace requires explicit user permission.How File Access Works
When you use tools likeread_file
, ls
, view_subdirectory
, or read_file_range
, Continue:
- Resolves the path - Normalizes the provided path (relative, absolute, tilde, or file:// URI)
- Checks workspace boundaries - Determines if the path is within or outside your workspace
- Applies access policy - Files within workspace are read automatically; files outside require permission
Supported Path Formats
Continue supports multiple path formats for flexible file access:Relative Paths
Paths relative to your workspace root:Absolute Paths
Full system paths:Tilde Paths
Home directory expansion:~
expands to your home directory (e.g., /home/user
or C:\Users\username
).
File URIs
File protocol URIs:Windows Network Paths
UNC paths for network shares:Workspace Boundary Detection
Continue determines workspace boundaries by checking if a resolved path starts with any of your IDE’s workspace directories. This applies to:- Single-folder workspaces
- Multi-root workspaces (e.g., VS Code multi-root)
- Monorepo setups with multiple workspace directories
Example Scenarios
Scenario 1: Reading within workspaceSecurity and Permissions
Permission Policy
- Within workspace: Files are accessible without permission (policy:
allowedWithoutPermission
) - Outside workspace: Files require explicit user permission (policy:
allowedWithPermission
) - Disabled tools: Respects tool policy settings if explicitly disabled
User Experience
When Agent or Plan mode attempts to access a file outside the workspace:- The tool call is displayed with the full path
- A permission prompt appears asking for confirmation
- You can approve or deny the access
- Future accesses may still require permission depending on your settings
Best Practices
Be cautious when granting permission to access files outside your workspace. Verify the path and ensure you trust the operation being performed.
- Review paths carefully - Check that file paths in permission prompts are expected
- Understand the context - Know why the agent is requesting external file access
- Limit scope - Consider moving frequently accessed external files into your workspace
- Use tool policies - Configure tool policies in your settings to control access patterns
Available Tools with External Access
The following tools support reading files outside the workspace:Read-Only Tools (Plan & Agent Mode)
- read_file - Read complete file contents
- read_file_range - Read specific line ranges from a file
- ls - List files and directories
- view_subdirectory - View directory structure
Path Resolution
All these tools use the same path resolution logic:- Parse the input path (relative, absolute, tilde, URI)
- Resolve to an absolute system path
- Check workspace boundaries
- Apply appropriate permission policy
Examples
Reading Configuration Files
Listing External Directories
Comparing Files Across Locations
Troubleshooting
Permission Denied Errors
If you see permission denied errors:- Check file system permissions - Ensure your user account can read the file
- Verify path resolution - Confirm the path resolves correctly for your OS
- Review tool policies - Check if the tool is disabled in settings
Path Not Found
If paths aren’t resolving:- Use absolute paths - Try providing full system paths
- Check tilde expansion - Verify
~
expands to the correct home directory - Escape special characters - Quote paths with spaces or special characters
- Windows paths - Use forward slashes or properly escaped backslashes
Unexpected Permission Prompts
If you’re prompted for files you expect to be in the workspace:- Verify workspace configuration - Check your IDE’s workspace settings
- Check symbolic links - Symlinks may resolve outside workspace boundaries
- Review path normalization - Ensure paths are being resolved correctly