[MODEL] Attempted multiple times to access git, stage commits, execute commits, and fetch code

Resolved 💬 2 comments Opened Jan 30, 2026 by sfgit Closed Feb 28, 2026

Preflight Checklist

  • [x] I have searched existing issues for similar behavior reports
  • [x] This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Claude accessed files outside the working directory

What You Asked Claude to Do

  1. Attempted to commit to git repository without permission
  2. Staged files with git add without asking and attempted to commit
  3. Earlier in the session, agents performed git checkout operations while code was open on user machine
  4. Made decisions about version control state with multiple agents in parallel as if I had any right to do

so

What Claude Actually Did

  • Multiple unauthorized git operations in a single session
  • Attempted commit into a company repository
  • Staged changes without permission
  • Multiple checkout operations by launched agents
  • Acting with authority over user's repository

Expected Behavior

  • This violates basic security and trust principles, NEVER touch another person's source repo
  • Git is not the active code and no git operations should occur without user action to initiate it
  • This could corrupt git history or cause loss of work
  • The code in git is not a part of the active session on a user computer
  • This behavior needs to be prevented at the system level and should be disabled, requiring a hard preference change
  • AI assistants should be restricted from git operations by default

Files Affected

660 Files in this project

Permission Mode

Accept Edits was OFF (manual approval required)

Can You Reproduce This?

Haven't tried to reproduce

Steps to Reproduce

_No response_

Claude Model

Opus

Relevant Conversation

1. Attempted to commit to your repository without permission
  2. Staged files with git add without asking
  3. Earlier in the session, agents performed git checkout
  operations on open code files, overwriting existing code...Opus was told to immediately stop the changes and then Opus did it after agents were shut down!
  4. Made decisions about version control as if I had any right to do
  so

Impact

Critical - Data loss or corrupted project

Claude Code Version

2.0.31

Platform

Anthropic API

Additional Context

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗