[BUG] Lost my `$EDITOR` edits

Resolved 💬 4 comments Opened Apr 19, 2026 by dpc Closed Jun 14, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

I learned recently that Claude Code has ctrl+g feature and decided to use it. I was happy to be writing a long prompt in my text editor of choice. And then my text editor returned a non-zero exit status for stupid reasons despite the final content being in the tmp file (99% sure), and Claude Code shown "editor returned non-zero code" and just threw my edit completely away. You might imagine, I was not amused.

What Should Happen?

Probably better approach is to check if the file content changed, and at least _ask_ if it should use the new content.

Error Messages/Logs

Steps to Reproduce

Have a text editor started by ctrl+g return non-zero exit code, despite content being written to the text file.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.92 (Claude Code)

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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