claude-code - 💡(How to fix) Fix [Bug] Claude deletes uncommitted work-tree without user confirmation [1 comments, 2 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#47074Fetched 2026-04-13 05:42:12
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Code Example

[]
RAW_BUFFERClick to expand / collapse

Bug Description I asked about code from git work-tree showing up in visual studio code search. Instead of explaining the issue or offering options what to do to not show the work-tree in search results, claude just deleted the work-tree including all changes that haven't been committed yet. Bad claude!

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.92
  • Feedback ID: a8e7773f-a802-45df-ad89-d82988ba03b1

Errors

[]

extent analysis

TL;DR

To prevent code from the git work-tree from showing up in Visual Studio Code search, consider configuring the search settings to exclude the work-tree directory.

Guidance

  • Review the Visual Studio Code settings to see if there's an option to exclude specific directories from search results.
  • Check the git work-tree configuration to understand how it's integrated with Visual Studio Code.
  • Look into using the .gitignore file to potentially exclude the work-tree directory from being indexed by Visual Studio Code.
  • Consider reaching out to the person who deleted the work-tree (claude) to see if they can provide more context or help recover the lost changes.

Notes

The issue lacks technical details about the integration between git work-tree and Visual Studio Code, making it difficult to provide a more specific solution.

Recommendation

Apply workaround: Configure Visual Studio Code search settings to exclude the work-tree directory, as this seems to be the most direct way to address the issue without more information about the integration.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] Claude deletes uncommitted work-tree without user confirmation [1 comments, 2 participants]