[BUG] Stuck in edit dialog when trying to edit an agent in Claude Code CLI with AgentSDK installed

Resolved 💬 6 comments Opened Dec 3, 2025 by kevinselhi Closed Feb 11, 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?

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

  1. /agent
  2. Create new agent
  3. Choose "2. Personal"
  4. Choose "1. Generate with Claude (recommended)
  5. When prompted to "Create new agent" describe what the agent should do and hit Enter
  6. Wait while "Generating agent from description..." process completes
  7. Select tools and continue
  8. Select model
  9. Choose background color
  10. Press e to save and edit
  11. Agent description opens in Claude Code CLI but is read-only
  12. 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_

View original on GitHub ↗

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