# additionalDirectories Option

> The option that gives the agent more folders to work in.

**Field:** Artificial Intelligence  
**Category:** Claude Agent SDK  
**Also known as:** add_dirs, Agent SDK extra folders, Claude Agent SDK additionalDirectories

## Think of it like

It is like giving a helper the keys to two more rooms.

## Definition

This Agent SDK option lets the agent reach folders outside its working folder. You give it a list of paths, and the SDK passes each one to Claude Code as --add-dir. The agent can then read and edit files in those folders too. With project settings loaded, it also picks up the skills, commands and subagents kept there. In Python the option is called add_dirs.

## Example

An agent works in an app's folder but needs a shared library next to it. Adding that path lets it read and fix both.

## Example code

```typescript
additionalDirectories: ["../shared-lib"]
```

Let the agent reach one more folder.

## Why it matters

Real work often spans more than one folder. This opens the ones you choose and no more.

## Common mistake

Adding a whole home folder. Each folder you add is one more place the agent can change.

## Three principles

- **More folders.** Past the main one.
- **Same as --add-dir.** Passed to Claude Code.
- **add_dirs in Python.** Same list.

## Related terms

- [cwd Option](https://learn.benibix.com/term/ai/cwd-option)
- [Additional Directories](https://learn.benibix.com/term/ai/additional-directories)
- [/add-dir Command](https://learn.benibix.com/term/ai/add-dir-command)
- [ClaudeAgentOptions](https://learn.benibix.com/term/ai/claude-agent-options)
- [settingSources Option](https://learn.benibix.com/term/ai/setting-sources-option)

![The agent at the top with three arrows down. The highlighted one goes to its cwd, /work/app, where its tools start. The other two go to added folders, ../shared-lib and ../docs. A note says every other folder on the machine stays out of reach.](https://learn.benibix.com/diagrams/ai9-sdk-folders.svg)

---

Source: https://learn.benibix.com/term/ai/additional-directories-option
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
