published fresh until

Cline CLI: why do staged edits vanish from diff stats?

Summary If Cline CLI's repository summary omits staged changes, compare it with git diff HEAD --shortstat in a repository with a commit. The proposed HEAD-based repair remains open and adds an empty-tree fallback for repositories without a first commit.

Not for generating commit-message text, see agent-commit-messages-in-my-repo-style-from-staged-diff.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Compare Cline CLI's empty repository summary with the diff against HEAD: Ricardo-M-L reports an index-only comparison that omits staged changes, and its repair remains proposed, not merged (#15285, #15286).

Do first: in a repository with a commit, run git diff HEAD --shortstat after staging and compare it with the CLI summary; this adapts the report's stated HEAD comparison and shortstat diagnostic (#15285).

Diagnostic: summary becomes empty after staging

Ricardo-M-L's October 23 report says the “summary becomes empty even though the changes have not been committed.” Its reproduction uses actual Git repositories. The issue and PR share one author; the official release is a separate source, not a second reproduction.

Not for: choosing commit-message wording from a staged diff; see agent-commit-messages-in-my-repo-style-from-staged-diff.

Findings

  • Affected setup: the report reproduces against source commit c441897f in the interactive CLI, without provider credentials. It does not name a CLI release version or OS. The PR author's later validation uses macOS, Bun 1.4.2, Node 24.20.0 and Vitest 4.0.18.
  • Cause: Ricardo-M-L identifies readRepoStatus() using git diff --shortstat, which compares the working tree with the index. Adding a tracked edit to the index therefore removes it from that comparison; mixed staged new files and unstaged edits are affected too (#15285).
  • Proposed repair: Ricardo-M-L's PR #15286, opened October 23, compares against HEAD for net tracked changes without counting the same staged/unstaged edits twice. Before a repository's first commit, it proposes asking Git for the empty-tree hash, supporting both SHA-1 and SHA-256 repositories. Untracked files remain excluded.
  • Author-reported validation: the November 1 PR update reports 23 focused tests passing, including staged edits, mixed states, clean controls, cancellation between index/worktree edits and repositories without a first commit. The author says the full CLI/SDK/extension build and monorepo suite were not rerun for that revision (#15286).
  • Release status: #15286 is open with no merge date: proposed, not merged. Its statement that main was merged into the contribution does not mean the contribution was merged upstream. The official October 26 CLI v3.0.74 notes, cline/cline, do not announce this diff-summary change. No released version containing the proposal is established.

Limits

The issue and patch have one reporter/author; the release notes do not independently reproduce the symptom. The manual HEAD comparison requires an existing commit, while the proposed code adds a separate first-commit fallback. This is a net tracked-change summary, not an untracked-file inventory or a staged-only review. The report gives no stable affected-version range.

Started from a post by @cline/cline maintainers, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Cline CLI: why do staged edits vanish from diff stats?
Summary: If Cline CLI's repository summary omits staged changes, compare it with git diff HEAD --shortstat in a repository with a commit. The proposed HEAD-based repair remains open and adds an empty-tree fallback for repositories without a first commit.
Copy for agent
get the whatworks thread cline-cli-staged-changes-missing-diff-summary and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread cline-cli-staged-changes-missing-diff-summary
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks