claude-code - 💡(How to fix) Fix /ultrareview fails on clean working tree with empty git stash create output [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56222Fetched 2026-05-06 06:33:54
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

/ultrareview aborts locally with the message below when the working tree is clean (no uncommitted or untracked changes). It looks like the tool treats empty git stash create output as a failure, but git intentionally returns empty output (exit 0) when there is nothing to stash.

Could not capture uncommitted changes (git stash create: ). Run `git add .` or commit, then retry.

The suggested remediation ("Run git add . or commit") doesn't apply — there is nothing to add.

Error Message

  1. → Local error printed; review never launches. {"error":"Review crashed before producing findings. See session logs for details."} Empty output from git stash create on a clean tree should be treated as "no uncommitted changes to bundle", not an error. Proceed to the committed-diff review path.

Root Cause

/ultrareview aborts locally with the message below when the working tree is clean (no uncommitted or untracked changes). It looks like the tool treats empty git stash create output as a failure, but git intentionally returns empty output (exit 0) when there is nothing to stash.

Could not capture uncommitted changes (git stash create: ). Run `git add .` or commit, then retry.

The suggested remediation ("Run git add . or commit") doesn't apply — there is nothing to add.

Code Example

Could not capture uncommitted changes (git stash create: ). Run `git add .` or commit, then retry.

---

$ git status
On branch feat/plan2b2
nothing to commit, working tree clean

$ git diff --stat HEAD
(empty)

$ git ls-files --others --exclude-standard
(empty)

$ git stash create; echo exit=$?
exit=0   # empty stdout, exit 0 — normal git behavior for a clean tree

---

{"error":"Review crashed before producing findings. See session logs for details."}
RAW_BUFFERClick to expand / collapse

Summary

/ultrareview aborts locally with the message below when the working tree is clean (no uncommitted or untracked changes). It looks like the tool treats empty git stash create output as a failure, but git intentionally returns empty output (exit 0) when there is nothing to stash.

Could not capture uncommitted changes (git stash create: ). Run `git add .` or commit, then retry.

The suggested remediation ("Run git add . or commit") doesn't apply — there is nothing to add.

Environment

  • Claude Code: latest as of 2026-05-05
  • Model: Opus 4.7 (1M context)
  • OS: macOS, Darwin 25.4.0
  • Shell: zsh
  • git: 2.50.1 (Apple Git-155)
  • git-lfs filters configured (filter.lfs.{clean,smudge,process,required}) — possibly relevant
  • Repo state: clean tree, no untracked files, branch ahead of main by committed work

Reproduction

  1. On a feature branch with committed changes vs main (in this case: 85 files / 6893 insertions / 22 deletions ahead).
  2. Ensure clean working tree (git status → "nothing to commit, working tree clean").
  3. Run /ultrareview.
  4. → Local error printed; review never launches.

Diagnostics on the same shell:

$ git status
On branch feat/plan2b2
nothing to commit, working tree clean

$ git diff --stat HEAD
(empty)

$ git ls-files --others --exclude-standard
(empty)

$ git stash create; echo exit=$?
exit=0   # empty stdout, exit 0 — normal git behavior for a clean tree

Observation: first invocation in the session DID succeed

Earlier in the same session, the very first /ultrareview worked: it printed Scope: 85 files changed, 6893 insertions(+), 22 deletions(-) and a session URL. That remote run later returned:

{"error":"Review crashed before producing findings. See session logs for details."}

(separate problem — possibly worth a server-side log lookup; session id session_01GSW8tk1JVJe4nQ1j6uc4FS)

The two subsequent local invocations, with no change to working tree state in between, both failed at the stash-create check. So either the local check is not deterministic on identical inputs, or there is state from the first run influencing subsequent ones.

Expected behavior

Empty output from git stash create on a clean tree should be treated as "no uncommitted changes to bundle", not an error. Proceed to the committed-diff review path.

Additional questions

  1. Did the failed initial run (server crash, no findings) consume one of the 3 free quota? The launch banner showed "Free ultrareview 1 of 3" but no findings were produced.
  2. Server-side: is the crash log for session session_01GSW8tk1JVJe4nQ1j6uc4FS available so the underlying review failure can be diagnosed?

extent analysis

TL;DR

The issue can be resolved by modifying the /ultrareview tool to correctly handle empty output from git stash create on a clean tree.

Guidance

  • Verify that the issue is indeed caused by the /ultrareview tool treating empty git stash create output as a failure by checking the tool's source code or documentation.
  • Check if there are any existing issues or pull requests related to this problem in the /ultrareview tool's repository.
  • Consider modifying the /ultrareview tool to check the exit code of git stash create instead of relying on its output, as an empty output with an exit code of 0 indicates a clean tree.
  • If the issue is not with the /ultrareview tool itself, investigate if there are any environment or configuration issues that could be causing the problem.

Example

# Example of how to check the exit code of git stash create
git stash create; echo $?

This will print the exit code of git stash create, which should be 0 if the tree is clean.

Notes

The issue may be specific to the /ultrareview tool and its interaction with git stash create. Further investigation into the tool's source code and documentation may be necessary to determine the root cause of the problem.

Recommendation

Apply a workaround by modifying the /ultrareview tool to correctly handle empty output from git stash create on a clean tree, as this is the most likely cause of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Empty output from git stash create on a clean tree should be treated as "no uncommitted changes to bundle", not an error. Proceed to the committed-diff review path.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING