[DOCS] Status line schema is missing the `worktree` payload field for `--worktree` sessions

Resolved 💬 2 comments Opened Mar 4, 2026 by coygeek Closed Mar 7, 2026

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:

  1. worktree object structure (name, path, branch, original_repo_dir).
  2. Presence conditions (--worktree session only).
  3. 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 worktree field to status line hook commands with name, path, branch, and original repo directory when running in a --worktree session.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗