feat: expose additional working directories in statusline JSON
Summary
The statusline JSON input doesn't include additional working directories passed via --add-dir. This makes it impossible for custom statusline scripts to show which resources are attached to a session.
Current behavior
When launching claude --add-dir /path/to/other-repo, the statusline JSON contains cwd, workspace.current_dir, and workspace.project_dir, but no field for the additional directories.
Proposed addition
Add a field like workspace.additional_dirs to the statusline JSON:
{
"workspace": {
"current_dir": "/Users/alex/repos/main-project",
"project_dir": "/Users/alex/repos/main-project",
"additional_dirs": [
"/Users/alex/repos/other-repo"
]
}
}
Why this matters
Teams working across multiple repos frequently use --add-dir to give Claude context on related projects. Seeing which resources are attached at a glance (via the statusline) helps users understand what context Claude has access to — especially when switching between sessions with different resource configurations.
Current workaround
Setting a CLAUDE_RESOURCES env var before launch and reading it in the statusline script. This works but requires a shell wrapper function around the claude command.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗