Describe the bug
When passing multiple --add-dir flags via claude_args, only the last value is used.
To Reproduce
Run a workflow like:
claude_args: |
--add-dir "/path/to/dir-a"
--add-dir "/path/to/dir-b"
Only dir-b ends up in the session's allowed directories.
Expected behavior
Both args are actually passed along.
API Provider
[x] Anthropic First-Party API (default)
[ ] AWS Bedrock
[ ] GCP Vertex
Additional context
Presumably just needs adding here:
|
// Flags that should accumulate multiple values instead of overwriting |
|
// Include both camelCase and hyphenated variants for CLI compatibility |
|
const ACCUMULATING_FLAGS = new Set([ |
|
"allowedTools", |
|
"allowed-tools", |
|
"disallowedTools", |
|
"disallowed-tools", |
|
"mcp-config", |
|
]); |
Describe the bug
When passing multiple
--add-dirflags viaclaude_args, only the last value is used.To Reproduce
Run a workflow like:
Only
dir-bends up in the session's allowed directories.Expected behavior
Both args are actually passed along.
API Provider
[x] Anthropic First-Party API (default)
[ ] AWS Bedrock
[ ] GCP Vertex
Additional context
Presumably just needs adding here:
claude-code-action/base-action/src/parse-sdk-options.ts
Lines 14 to 22 in 65f29cf