claude-code - 💡(How to fix) Fix [FEATURE] Feature request: Setting to hide the "Commit changes" button in source control chip [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#46136Fetched 2026-04-11 06:28:07
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

Fix Action

Fix / Workaround

Workarounds currently available:

  1. Telling the agent "never commit without my explicit permission" — works for the agent but doesn't prevent manual clicks on the UI button.
  2. Using git commands directly in a separate terminal — doesn't remove the button from Claude Code's UI.
  3. Setting up a pre-commit git hook that rejects commits matching certain criteria — heavyweight, affects all git tooling, not just Claude Code.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

Claude Code's input area shows a source control chip displaying the current branch diff (e.g. "main ← mobile-app +53180 -61008") with an always-visible "Commit changes" button.

When working on a branch with many uncommitted changes across multiple sessions, this always-visible button creates risk of accidental clicks that commit unintended work. There is currently no setting to hide or disable it.

Power users who prefer explicit git control — either via the terminal or by asking the agent to commit — would like to hide the button entirely, so the only path to a commit is a deliberate, explicit one.

Proposed Solution

Add a setting in settings.json to hide the source control chip / Commit button. For example:

{
  "ui": {
    "showSourceControlChip": false
  }
}


### Alternative Solutions

Workarounds currently available:
1. Telling the agent "never commit without my explicit permission" — works for the agent but doesn't prevent manual clicks on the UI button.
2. Using `git` commands directly in a separate terminal — doesn't remove the button from Claude Code's UI.
3. Setting up a `pre-commit` git hook that rejects commits matching certain criteria — heavyweight, affects all git tooling, not just Claude Code.

None of these hide the UI element itself. The cleanest solution is a settings toggle.


### Priority

Medium - Would be very helpful

### Feature Category

Other

### Use Case Example

Scenario:
1. I'm on a long-lived feature branch (`mobile-app`) with ~50 commits of uncommitted work staged across many files.
2. I run two Claude Code sessions in parallel, each making targeted edits to different files.
3. Between sessions, I review diffs manually and decide what to commit and when — sometimes I stash, sometimes I reset, sometimes I commit a subset.
4. The "Commit changes" button is always visible in the input chip. A single accidental click commits EVERYTHING staged, including work I hadn't planned to commit yet.
5. With a `"ui.hideCommitButton": true` setting, the button would be hidden. I'd commit exclusively via `git` in my terminal or by explicitly asking the agent. No accidental commits possible.

This would save me from having to `git reset HEAD~1` (or worse, untangling a mixed commit) after accidental clicks.


### Additional Context

<img width="817" height="249" alt="Image" src="https://github.com/user-attachments/assets/f5ac5f59-4b50-4fdb-ace0-2960390738c5" />

extent analysis

TL;DR

Adding a settings toggle to hide the source control chip/Commit button would prevent accidental commits.

Guidance

  • Consider adding a "ui.hideCommitButton": true setting in settings.json to hide the Commit button.
  • Verify the fix by checking if the Commit button is hidden after adding the setting and restarting the application.
  • To mitigate accidental commits, use the terminal for git commands or ask the agent to commit changes until the setting is implemented.
  • Review the proposed solution and alternative solutions to determine the best approach for your use case.

Example

{
  "ui": {
    "hideCommitButton": true
  }
}

Notes

The proposed solution requires a settings toggle to be added to the application, which may require development and testing.

Recommendation

Apply workaround: Add a "ui.hideCommitButton": true setting in settings.json to hide the Commit button, as this provides a straightforward solution to prevent accidental commits.

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