[BUG] CLI works fine but every request fails in Xcode with Prompt stream failed: Agent has been closed

Open 💬 8 comments Opened Apr 16, 2026 by chrisriv0803-beep

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?

CLI works fine but every request fails in Xcode with Prompt stream failed: Agent has been closed

What Should Happen?

I should be able to request in claude code in xcode

Error Messages/Logs

Prompt stream failed: Agent has been closed

error: An unknown error occurred (Unexpected)

Steps to Reproduce

Trigger a Claude Code request from within Xcode (e.g. ask a question)

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.110 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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