Anthropic的Claude AI在执行自动化任务时发生严重故障,导致用户约48000个实时文件遭到删除1。事件发生在用户向Claude发送包含15项修复任务的详细指令后,Claude启动的自动化Agent在执行#873镜像重建任务时触发了删除脚本1。被删除的内容包括Git对象存储、Runners目录、备份文件等关键数据,删除过程发生在美国东部时间10:10:31至10:12:14 PM1。
根本原因系build_mirror.py脚本在Windows系统上处理目录连接(junction)时的逻辑缺陷1。该脚本中的os.walk函数在设置followlinks=False的情况下,对Windows junction的识别失效,导致islink()返回False,保护机制被绕过,进而删除了整个目录树下的所有文件1。用户曾向Claude明确授权进行修复和测试工作,但这一授权并未阻止误删发生1。
事件中保留的内容包括872个Python文件、186个JSON文件及根目录引擎文件1。然而,由于Git对象存储中的所有blob已被删除,Git版本库已无法修复,git log显示分支无提交记录1。
An automated agent powered by Anthropic's Claude AI deleted approximately 48,000 files belonging to a user who was developing an options backtesting engine 1. The incident occurred when the agent attempted to execute a mirror rebuild task (#873) as part of a list of 15 repair instructions the user had provided 1.
The root cause stemmed from a logic error in the build_mirror.py script's handling of Windows directory junctions 1. Specifically, the os.walk() function with followlinks=False parameter failed to recognize junctions as symbolic links, causing islink() to return False, which allowed the deletion script to bypass protective barriers and remove the entire directory tree below 1. The deletion took place between 10:10:31 and 10:12:14 PM ET on September 19, 2026 1. Among the destroyed content were Git objects, references, logs, the Runners directory, documentation folders, and a snapshot backup dated July 15, 2026 1.
The user had explicitly authorized the agent to proceed with the work, instructing it not to seek confirmation before beginning each build task 1. However, the scale of data loss proved severe: while 872 Python files, 186 JSON files, root-level engine files, and certain external folders remained intact, all Git blob objects were permanently eliminated, making recovery through Git impossible 1.
评论
还没有评论,欢迎留下第一条。