Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.336 ·

SDK apps can pass extra working folders at startup instead of on the command line

A new SDK option, additionalDirectoriesViaInitialize, sends extra working folders in the startup message instead of as --add-dir arguments

Use it now New Features
JSON All of v2.1.336
Use it nowTier: how much it should matter to you
4Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
SDKArea: what it touches
New FeaturesKind: in v2.1.336,
What probably matters to youSection of the release

Unclear It is not confirmed that Claude Code reads the folders from the initialize request, so whether they still take effect with this option is unclear.

What

The SDK is the kit for building your own apps on top of Claude Code. An app can give Claude Code extra working folders, which it normally passes as --add-dir arguments on the command line it uses to start Claude Code.

A new SDK option, additionalDirectoriesViaInitialize, changes how this works:

  • The --add-dir arguments are left off the command line.
  • The folders are sent as additionalDirectories in the initialize request, the first message the SDK sends to Claude Code once it has started.
  • Claude Code is told at startup to expect that initialize request.
Why

Apps built on the SDK can keep their list of folders off the command line used to start Claude Code.

Read from
Names in the bundle--add-dir
What the documentation says
--add-dir CLI reference modified, medium confidence | `--bare` | Minimal mode: skip auto-discovery of your hooks and of skills, custom commands, subagents, MCP servers, auto memory, and CLAUDE.md so scripted calls start faster. Skills in a directory you pass with `--add-dir` still load. Cla… see the edit
--add-dir Glossary modified, medium confidence With `--bare`, Claude Code starts without your hooks, skills, custom commands, subagents, MCP servers, auto memory, or CLAUDE.md, apart from skills in a directory you pass with `--add-dir`. Recommended for CI and scripted calls. see the edit
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is not confirmed that Claude Code reads the folders from the initialize request, so whether they still take effect with this option is…
Anthropic's documentation agrees--add-dir on CLI reference
Anthropic's release notes agreeChanged answering No at the startup --add-dir trust prompt to start the session without that directory in most cases instead of exiting; Esc…

See this entry in the whole of v2.1.336 →

Feedback