Skip to content

fix(cli): accumulate multiple --add-dir flags into array (#1215)#1232

Open
xodn348 wants to merge 1 commit intoanthropics:mainfrom
xodn348:fix/issue-1215-add-dir-merge
Open

fix(cli): accumulate multiple --add-dir flags into array (#1215)#1232
xodn348 wants to merge 1 commit intoanthropics:mainfrom
xodn348:fix/issue-1215-add-dir-merge

Conversation

@xodn348
Copy link
Copy Markdown

@xodn348 xodn348 commented Apr 17, 2026

Summary

Fixes #1215 - When multiple --add-dir flags are passed via claude_args, only the last value was kept due to overwrite semantics. This PR adds "add-dir" to the ACCUMULATING_FLAGS set so that all values are properly accumulated using the null-char delimiter, consistent with how --allowed-tools, --disallowed-tools, and --mcp-config already work.

Changes

  • Added "add-dir" to ACCUMULATING_FLAGS in base-action/src/parse-sdk-options.ts

Testing

  • All 664 existing tests pass (0 failures, 1409 expect() calls across 35 files)
  • The fix follows the exact same pattern used for other accumulating flags

…1215)

Add 'add-dir' to ACCUMULATING_FLAGS set so that multiple --add-dir
flags passed via claude_args are joined with null-char delimiter
instead of the last value overwriting previous ones.
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.

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

1 participant