Skip to content

fix(claude-code): add /workspace to allowed directories#442

Merged
zbigniewsobiecki merged 1 commit intodevfrom
fix/claude-code-workspace-path
Feb 20, 2026
Merged

fix(claude-code): add /workspace to allowed directories#442
zbigniewsobiecki merged 1 commit intodevfrom
fix/claude-code-workspace-path

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

  • Adds additionalDirectories: [getWorkspaceDir()] to the Claude Code SDK query() options
  • Fixes "Path access denied: /workspace/cascade-damisa-*" errors that started occurring with Claude Code CLI 2.1.44

Context

The planning agent for damisa (DAI-5) was failing immediately after successful repo clone with:

Path access denied: /workspace/cascade-damisa-1771617521968. Path must be within working directory or allowed paths (/tmp)

Claude Code CLI 2.1.44 has stricter path validation. The /workspace directory (where repos are cloned) wasn't in the allowed paths list. The SDK's additionalDirectories option explicitly whitelists it.

Test plan

  • npm run typecheck — clean
  • Backend tests — 218 passed
  • Deploy to prod and verify damisa planning agent runs successfully

🤖 Generated with Claude Code

…de SDK

Claude Code CLI 2.1.44 introduced stricter path validation that rejects
cwd paths outside the working directory. This caused "Path access denied"
errors for the planning agent on damisa (and any project using claude-code
backend). Adding `additionalDirectories: [getWorkspaceDir()]` explicitly
allows the /workspace directory tree.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zbigniewsobiecki zbigniewsobiecki merged commit 18b8fb7 into dev Feb 20, 2026
5 checks passed
@zbigniewsobiecki zbigniewsobiecki deleted the fix/claude-code-workspace-path branch March 16, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant