[Feature Request] Auto-recover from "File must be read first" error in Auto Mode

Resolved 💬 3 comments Opened Apr 27, 2026 by daezoxx Closed May 1, 2026

Bug Description

Feature Request: Auto-recover from “File must be read first” in Auto Mode

When using Claude Code Auto Mode during iterative coding sessions, Claude sometimes attempts to update a file before reading its current contents and triggers:

File must be read first

Currently this breaks flow because Auto Mode stops and waits for manual intervention. In this scenario, the next valid action is obvious and low risk: read the file, then retry the update.

Requested Improvement

Auto Mode should automatically recover from deterministic prerequisite errors like this by performing the required file read and retrying the update without user intervention.

Impact

  • Breaks momentum during multi-step coding tasks
  • Requires babysitting Auto Mode
  • Reduces trust for longer autonomous workflows
  • Makes Auto Mode feel less autonomous during common iterative edit loops

Platform

Desktop (Windows)

Occurs during repeated edits to the same file in normal coding workflows.

---

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Claude Code Version: 2.1.119

---

Related Errors

[
  {
    "error": "ENOENT: no such file or directory, unlink '<temp_dir>/tasks/<id>.output'",
    "timestamp": "2026-04-27T16:15:22Z"
  },
  {
    "error": "ENOENT: no such file or directory, unlink '<temp_dir>/tasks/<id>.output'",
    "timestamp": "2026-04-27T16:15:33Z"
  },
  {
    "error": "ENOENT: no such file or directory, unlink '<temp_dir>/tasks/<id>.output'",
    "timestamp": "2026-04-27T16:15:43Z"
  },
  {
    "error": "ENOENT: no such file or directory, unlink '<temp_dir>/tasks/<id>.output'",
    "timestamp": "2026-04-27T16:15:56Z"
  },
  {
    "error": "File does not exist. Note: current working directory was a local project folder.",
    "timestamp": "2026-04-27T16:16:31Z"
  },
  {
    "error": "File does not exist. Note: current working directory was a local project folder.",
    "timestamp": "2026-04-27T16:17:02Z"
  },
  {
    "error": "File does not exist. Note: current working directory was a local project folder.",
    "timestamp": "2026-04-27T16:17:07Z"
  },
  {
    "error": "ENOENT: no such file or directory, unlink '<temp_dir>/tasks/<id>.output'",
    "timestamp": "2026-04-27T16:24:46Z"
  }
]

---

Notes

Sensitive local filesystem paths, usernames, and project directory names have been redacted. The issue is reproducible without those specifics.

View original on GitHub ↗

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