anthropics / anthropics/claude-code
[Bug] Assistant creates monitored files with secrets without warning user of automatic content re-ingestion
- Ngôn ngữ chính
- Python
- Star
- 145k
- Fork
- 23.1k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
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
[]
---
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- cli, security
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100