yes typed at permission prompt executes as background bash command, fills disk
Description
When prompted for tool permission approval, typing yes (instead of y or !yes) causes Claude Code to execute the Unix yes command as a background bash task instead of treating it as a permission response. The yes command outputs infinite y\n to the task output file, filling the disk.
Steps to reproduce
- Have a tool call pending permission approval
- Type
yesat the prompt - Claude Code interprets it as a bash command and runs it in the background via the task system
Expected behavior
yes should be treated as a permission approval, same as y.
Actual behavior
yes is executed as the Unix yes command in the background. Output is written to a task file in AppData/Local/Temp/claude/<project>/tasks/<task-id>.output. The file grows unboundedly until the disk fills up and the process crashes.
In my case the output file reached 117GB before the disk was full and the task failed with exit code 1.
Impact
- Fills disk completely, potentially crashing other applications
- Requires manual identification and deletion of the output file
- No obvious indication of what's happening until disk space runs out
Environment
- Claude Code version: 2.1.70
- OS: Windows 11
- Shell: bash (Git Bash)
Suggested fix
The permission prompt input handler should recognize yes as an affirmative response (alongside y and !yes), or at minimum should not route unrecognized permission responses to the bash executor.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗