Keyboard Interaction: Preserve Plan Progress on Escape Key
Status Fixed / completed
Maintainer reply ✓ Yes — rboyce-ant
Activity 13 comments · opened Jul 6, 2025 · closed Jul 12, 2025
💡 Likely answer: A maintainer (rboyce-ant, contributor)
responded on this thread — see the highlighted reply below.
Bug Description
When claude proposes a plan, there are two options: "yes" and "no, do something different". If you press "esc" key in your keyboard, then it interrupt the plan, losing all the progress made with the plan, which is a shame as you cannot go back to the plan. What I propose is that pressing "esc" shouldn't make you lose the plan progress, possible ideas:
- Pressing "esc" in the plan context is "No, do something different".
- Pressing "esc" in the plan context is interrupt, but the plan should be still part of the chat history.
- Pressing "esc" in the plan context is interrupt, plan is gone, but you can still go back to the plan, using /plan command the same way you can /resume.
- Pressing "esc" in the plan context ask you to confirm that you will lose the plan progress.
Again, the goal of making claude better as user may spend a lot of time planning and losing the time by just pressing "esc" which is not that obvious.
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 1.0.43
- Feedback ID: 4ef83585-d9f3-4266-b470-c44d419e8c3f
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:883:11)\n at execSync (node:child_process:955:15)\n at ED (file:///Users/ingmferrer/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:702:3921)\n at file:///Users/ingmferrer/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:9038\n at Q (file:///Users/ingmferrer/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:13327)\n at hJ (file:///Users/ingmferrer/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:8184)\n at S_ (file:///Users/ingmferrer/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:7265)\n at NB (file:///Users/ingmferrer/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:11432)","timestamp":"2025-07-06T16:05:55.195Z"},{"error":"Error: Error opening file /Users/ingmferrer/.claude/projects/-Users-ingmferrer-development-pronto/8c6708bd-2637-4d3b-bb0c-03ad03744155.jsonl: Error: ENOENT: no such file or directory, open '/Users/ingmferrer/.claude/projects/-Users-ingmferrer-development-pronto/8c6708bd-2637-4d3b-bb0c-03ad03744155.jsonl'\n at yj1 (file:///Users/ingmferrer/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:619:176)\n at async Bu1 (file:///Users/ingmferrer/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:626:3274)\n at async file:///Users/ingmferrer/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:626:3689\n at async BU0.appendEntry (file:///Users/ingmferrer/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:624:43)\n at async BU0.insertMessageChain (file:///Users/ingmferrer/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:25454)\n at async VF1 (file:///Users/ingmferrer/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:626:1903)","timestamp":"2025-07-06T16:30:55.912Z"},{"error":"Error: Request was aborted.\n at Ae._createMessage (file:///Users/ingmferrer/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1325:7931)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-06T16:51:49.649Z"}]
13 Comments
@ingmferrer If you press "esc" you can still refer to the rejected plan – it's not visible on screen but Claude will still have it in the history. We should also make this clearer in the UI!
@rboyce-ant Just to be clear, sometimes I press "esc" and it says something like "the user rejected the plan" and the plan is visible in the chat. Other times I press "esc" and it says something like "interrupted by user" twice, the plan is not visible in the chat, then I write something to improve the plan and it says that it needs to review the files, something that it already did in order to make the previous plan. My suspicion is that in this case, the plan is lost, and it's no longer in the context, so it needs to read all the files again. It may be a bug, or it may not be a bug, you know better than me, but this is how it feels.
Thanks for the clarification! That shouldn't happen, I'll look into it!
+1 on this! It also disappears from the UI when i press accept.
@ingmferrer @beagreenlite Are either of you able to reproduce this consistently? I've been able to get both the main agent and subagents to submit plans, and reject them, with the plan still appearing as expected in the chat.
@rboyce-ant I don’t have a reliable way to consistently reproduce this error, as it usually occurs during longer chat sessions. For example, I just experienced it: Claude Code proposed a plan, and I selected “No, tell Claude to do something different.” I then received an “Interrupted by user” message, and the plan disappeared from the chat. I initially reported this when it happened after pressing the "Esc" key, but it’s also occurring when using the “No, tell Claude…” option from the menu.
Please see the attached image for reference.
<img width="1152" height="1056" alt="Image" src="https://github.com/user-attachments/assets/56d5552a-4efb-4549-8d50-f1caeb7a63b6" />
I just experienced this again. I started a new session, then when the limit was about to be reached, I used /compact. Then I started planning again, but I needed to change the plan, so I pressed "No, ..." and got the "Interrupted by user" message. So it definitely happens in long chats, as I cannot reproduce it without compacting, etc. Also, not sure if it's related, but when I selected the "No" option, the terminal scrolled through my history very quickly. Again, I don't have any way to reproduce it, but we are on track to find the root cause.
@rboyce-ant there's a high probability this occurs when reviewing a plan where Claude's last action was a Task. That's the only common factor I've identified. I just started a fresh chat using
claude --ide -c, then ran/compact, viewed the plan, and it happened again. The pattern is clear.https://github.com/user-attachments/assets/2eafb76a-c143-4283-b55b-0d833ab0a71b
The same bug happens for me with the plan mode. But I think a similar problem exists when you tell claude to "No (tell Claude what to do differently)". So when claude is doing coding it can sometimes stop and ask qustions like "can i run npm run dev", i choose "No (tell Claude what to do differently)", and it breaks and loses context. So if i tell it "no, do not run npm commands" it then tries to start the task from the beginning
@rboyce-ant here are my findings: if you ask Claude to create a plan, and the last action before presenting the plan is a Task, you'll see that the task status (bullet point) is not marked as completed (green) but stays gray (in progress, I assume). Then it will show the error if you press the "Esc" key or press the "No" option in the menu. I'd say the repro rate is 100% if the conditions are met. Heck, I knew beforehand that I was going to get the error when I saw the Task as the previous step from the plan, so I recorded it. Last thing to say: if you agree with the plan, the Task will be marked as success (green), or if you don't agree with it, the error is shown, the plan is lost, and the Task is failed (red). Here is the video.
P.S. I sacrificed my plan for this make it worth it 😢
https://github.com/user-attachments/assets/c1f3e60d-635c-4532-a8e1-f6f7ed8bf103
I think that I'm running into this problem to. I get the "Interrupted by user" when I select "No" to continue planning:
After which it starts to generate a new plan. Having lost the proposed plan.
Restarting
claudedoes not help. In this specific project, I have found no way to reject plans and continue planning. In other projects on the same machine I do not have this problem. I'm on Linux with1.0.48 (Claude Code).Let me know if I can help you debug this problem with this consistent behaviour.
The fix for this is in version 1.0.51 and newer, please update and it should work! Thank you for reporting!
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.