[BUG] Stuck in edit dialog when trying to edit an agent in Claude Code CLI with AgentSDK installed
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?
When I try to create a new agent and then edit the details that were generated by Claude, I get stuck in the edit dialog. No shortcut keys (Esc, control + O, etc. \ + Enter) work. Changes cannot be made nor can the default description be approved. I have installed the latest version of Claude Code and am using AgentSDK. I have searched existing issues and found no previous report.
What Should Happen?
Claude should allow the user to make and then save edits (through use of hot keys or an additional dialog box) or reject the edits they have made (i.e. accept Claude Code's default generation for the new agent) through hitting Esc or some hot key combination.
Error Messages/Logs
"E37: No write since last change (add ! to override)"
Steps to Reproduce
- /agent
- Create new agent
- Choose "2. Personal"
- Choose "1. Generate with Claude (recommended)
- When prompted to "Create new agent" describe what the agent should do and hit Enter
- Wait while "Generating agent from description..." process completes
- Select tools and continue
- Select model
- Choose background color
- Press e to save and edit
- Agent description opens in Claude Code CLI but is read-only
- User can't use Esc or hot keys to escape
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Claude Code version 2.0.56
Platform
Other
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗