[MODEL] Sonnet 4.6 DOES NOT FOLLOW GITIGNORE AND USES -F BY DEFAULT

Resolved 💬 3 comments Opened May 14, 2026 by troyaustria Closed Jun 12, 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 modified files I didn't ask it to modify

What You Asked Claude to Do

Create a build log, that was in a folder where all the files are inside gitignore

What Claude Actually Did

It created the build log and -f to force the log into the repo

Expected Behavior

just create the build log not try to force it into the damn repo

Files Affected

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

Yes, every time with the same prompt

Steps to Reproduce

Have a build log folder
have it in a folder that's part of a repo

make sure the build log folder is in gitignore
ask claude to make a build log after a long enough session

Claude Model

Sonnet

Relevant Conversation

Impact

High - Significant unwanted changes

Claude Code Version

claude code via vs code. it doesn't tell me what version it is

Platform

Anthropic API

Additional Context

_No response_

View original on GitHub ↗

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