anthropics / anthropics/claude-code
[Bug] Assistant creates monitored files with secrets without warning user of automatic content re-ingestion
- 主要言語
- Python
- スター
- 145k
- フォーク
- 23.1k
- PR マージ指標
- PR 指標を取得中
説明
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
[]
---
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- cli, security
- issue の種類
- バグ
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 活発
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100