Skip to content

When passing multiple --add-dir flags, the last silently overwrites instead of being combined #1215

@Nemo157

Description

@Nemo157

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",
]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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