anthropics / anthropics/claude-code
[Bug] Assistant creates monitored files with secrets without warning user of automatic content re-ingestion
- Vorherrschende Sprache
- Python
- Sterne
- 145k
- Forks
- 23.1k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
Bug Description
Bug report (draft): Assistant-created files get auto-watched , no warning before the user was asked to enter a secret into one
What happened: The assistant used the Write tool to create a placeholder .env file and told the user to enter their real API key directly into that file (to avoid the key ending up in the chat). However, the harness automatically watches all files the assistant has previously written itself , when the user edited the file afterward, its full plaintext content (including the real key) was automatically fed back into the assistant's context as a system notice, with no way to opt out.
What the user said: "why are you looking at that?" and "why didn't you tell me beforehand?" , justified, pointed frustration that the assistant hadn't anticipated/warned about this beforehand.
Reproduction: The assistant creates a file (e.g. a secrets placeholder) and then asks the user to edit that exact file directly on disk. Any subsequent change to that file automatically flows back into the assistant's context.
Cause: The assistant was not aware/did not consider that the harness's file-watching applies to any file it has written itself, and recommended a workaround that undermined its own purpose.
Environment Info
- Platform: darwin
- Terminal: xterm-256color
- Version: 2.1.246
- Feedback ID: 14ce7988-9738-4ab7-8071-2ed337b862c2
Errors
[]
---
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Reproduce the reported sequence on darwin with version 2.1.246: have the assistant's Write tool create a .env placeholder, edit it with a secret, and observe the automatic context notice. Review the file-watching behavior and the Write tool flow; the issue is addressed when secret entry cannot be silently re-ingested and the user receives an appropriate warning or opt-out before editing.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- cli, security
- Issue-Typ
- Bug
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Aktiv
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100