What
The working directory is the folder a session runs in. A few parts of Claude Code now allow for it to be missing:
- Headless runs (Claude Code run by another program, with no interactive screen) skip the setup that depends on the working directory when there is none.
- The check for whether a subagent (a helper agent Claude starts for a subtask) is working in a separate copy of the project returns no when the parent session has no working directory.
- A helper that works out a file path relative to a folder returns nothing when there is no folder.
Before, the working directory was always resolved.
Why
This looks like groundwork for sessions that run without a working directory.
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubt
What puts a session into the state of having no working directory is not known.