[DOCS] Status line schema is missing the `worktree` payload field for `--worktree` sessions
Documentation Type
Incorrect/outdated documentation
Documentation Location
https://code.claude.com/docs/en/statusline
Section/Topic
Full JSON schema for status line command input.
Current Documentation
The current schema shows:
"workspace": { "current_dir": "...", "project_dir": "..." }
There is no worktree field documenting worktree name/path/branch/original repo directory.
What's Wrong or Missing?
Changelog v2.1.64 adds a worktree field to status line hook commands when running in --worktree sessions. The statusline schema docs do not include this field, so script authors cannot discover or reliably consume this metadata.
Suggested Improvement
Update the statusline schema docs to include:
worktreeobject structure (name,path,branch,original_repo_dir).- Presence conditions (
--worktreesession only). - Example input payload and a small script snippet using worktree metadata.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Line(s) | Context |
|------|---------|---------|
| https://code.claude.com/docs/en/statusline | 170-184 | Full JSON schema includes workspace but no worktree object |
| https://code.claude.com/docs/en/settings | 163 | statusLine setting links to statusline docs, which currently lack worktree field details |
Total scope: 2 pages affected
Source: Changelog v2.1.64
- Added
worktreefield to status line hook commands with name, path, branch, and original repo directory when running in a--worktreesession.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗