[DOCS] Status line docs omit GitHub repository and pull request JSON fields

Status Fixed / completed
Maintainer reply None cached
Activity 3 comments · opened May 19, 2026 · closed May 23, 2026

Documentation Type

Incorrect/outdated documentation

Documentation Location

https://code.claude.com/docs/en/statusline

Section/Topic

The "Available data" reference and "Full JSON schema" for status line input

Current Documentation

The page presents the status line payload reference as a complete list of available fields:

Claude Code sends the following JSON fields to your script via stdin: | model.id, model.display_name | Current model identifier and display name | | cwd, workspace.current_dir | Current working directory. Both fields contain the same value; workspace.current_dir is preferred for consistency with workspace.project_dir. | | workspace.project_dir | Directory where Claude Code was launched, which may differ from cwd if the working directory changes during a session | | workspace.added_dirs | Additional directories added via /add-dir or --add-dir. Empty array if none have been added | | workspace.git_worktree | Git worktree name when the current directory is inside a linked worktree created with git worktree add. Absent in the main working tree. Populated for any git worktree, unlike worktree.* which applies only to --worktree sessions | ... | worktree.original_branch | Git branch checked out before entering the worktree. Absent for hook-based worktrees |

The example schema also shows workspace with only these fields:

"workspace": { "current_dir": "/current/working/directory", "project_dir": "/original/project/directory", "added_dirs": [], "git_worktree": "feature-xyz" }

What's Wrong or Missing?

This reference is outdated for v2.1.145.

The page lists the status line JSON fields and shows a full example payload, but it does not document the GitHub repository and pull request information now included when Claude Code detects that context.

Because those fields are missing from both the "Available data" table and the schema example, status line script authors cannot discover:

  • the exact field names
  • where the repo / PR data is nested
  • when those fields are present versus absent

Suggested Improvement

Update the status line page to document the new GitHub repository and pull request metadata alongside the existing fields.

At minimum:

  1. Add the new fields to the "Available data" table with their exact names, types, and presence conditions.
  2. Update the full JSON schema example so it includes the repo / PR structure when detected.
  3. Add a small example status line snippet that conditionally renders repository and pull request context when those fields are present.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:
| Page | Line(s) | Context |
|------|---------|---------|
| https://code.claude.com/docs/en/statusline | 151-185 | "Available data" table enumerates status line JSON fields but does not include GitHub repository or pull request metadata |
| https://code.claude.com/docs/en/statusline | 200-205 | Full JSON schema shows workspace with only current_dir, project_dir, added_dirs, and git_worktree |

Total scope: 1 page affected

Version context: This gap affects the v2.1.145 status line JSON update.

View original on GitHub ↗

3 Comments

github-actions[bot] · 4 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/45465

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

coygeek · 4 months ago

Issue #60688 Verification

Title: [DOCS] Status line docs omit GitHub repository and pull request JSON fields
Issue Date: Unknown
Verification Date: 2026-05-22
Status: RESOLVED

---

Issue Summary

This issue reports that the status line documentation omitted the GitHub repository metadata under workspace.repo and the pull request metadata under pr, including where those fields appear in the payload and when they are present or absent.

---

Verification Results

Claim 1: The “Available data” reference omitted GitHub repository and pull request fields

Status: RESOLVED

At https://code.claude.com/docs/en/statusline, line 160 documents workspace.repo.host, workspace.repo.owner, and workspace.repo.name as: "Repository identity parsed from the origin remote, for example \"github.com\", \"anthropics\", \"claude-code\". Absent outside a git repository or when no origin remote is configured".

At https://code.claude.com/docs/en/statusline, lines 182-183 document pr.number, pr.url, and pr.review_state as: "Open pull request for the current branch... Absent until a PR is found, when not in a git repository, or once the PR merges or closes" and "Review status of the open PR... May be independently absent even when pr is present".

Verdict: The current “Available data” table now includes the repository and pull request fields with exact names and presence conditions, so this omission no longer exists.

---

Claim 2: The full JSON schema omitted the repository and pull request structures

Status: RESOLVED

At https://code.claude.com/docs/en/statusline, lines 203-213 show workspace.repo in the schema example, including "host": "github.com", "owner": "anthropics", and "name": "claude-code".

At https://code.claude.com/docs/en/statusline, lines 261-264 show the pr object in the schema example, including "number": 1234, "url": "https://github.com/anthropics/claude-code/pull/1234", and "review_state": "pending".

At https://code.claude.com/docs/en/changelog, line 85 states: "Status line JSON input now includes GitHub repo and PR information when detected" under the 2.1.145 update.

Verdict: The schema example now includes both the repository and pull request structures, and the changelog confirms this update in the reported version context.

---

Current State

| Claim | Status |
|-------|--------|
| Available data table omitted GitHub repository and pull request fields | RESOLVED |
| Full JSON schema omitted repository and pull request structures | RESOLVED |

---

Suggested Fix

N/A - issue has been resolved.

---

References

  • URL: https://code.claude.com/docs/en/statusline
  • Lines 160-160: workspace.repo.host, workspace.repo.owner, and workspace.repo.name are documented with absence conditions.
  • Lines 182-183: pr.number, pr.url, and pr.review_state are documented with presence and absence conditions.
  • Lines 203-213: The schema example includes the nested workspace.repo object.
  • Lines 261-264: The schema example includes the pr object.
  • Lines 276-285: The page explicitly states when workspace.repo and pr may be absent.

---

Conclusion & Recommendation

Primary Concern: The issue reported that the status line documentation did not expose the GitHub repository and pull request fields now available in the status line JSON payload.

Resolution Status: RESOLVED

Recommendation: CLOSE

The current status line page documents both workspace.repo and pr fields in the reference table and the schema example. The reported documentation gap is no longer present in the current docs.

github-actions[bot] · 3 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.