Xcode ACP custom agent: session/prompt always fails with "failed to produce a response" despite a working CLI and valid auth
Personne n'a encore pris cette issue.
- Langage dominant
- Shell
- Étoiles
- 11.2k
- Forks
- 1.9k
- Merge moyen
- 14 h 16 min
- PR mergées (30 j)
- 6
Description
Goal: Set up GitHub Copilot CLI as a custom agent in Xcode's Coding Intelligence settings via the Agent Client Protocol ( --acp ).
Setup:
• Copilot CLI 1.0.73, installed via Homebrew ( /opt/homebrew/bin/copilot )
• Xcode Coding Intelligence → custom agent config:
• Executable: /opt/homebrew/bin/copilot
• Arguments: --acp
• Interpreter: blank
• Environment Variables: blank (later also tried setting these — see below)
• copilot works fine standalone in Terminal (chat, auth all functional)
Symptom:
As soon as I send any prompt in Xcode (even plain text like "test" ), it fails with:
JSON-RPC request with ID JSONRPCID(rawValue: "D1C50172-B98A-4ABD-8550-6E06581D4B42", intValue: nil) failed to produce a response.
initialize , authenticate , and session/new all appear to succeed — only the prompt request fails, immediately, every time.
Troubleshooting already attempted (no change in any case):
- Fully quit and relaunched Xcode.
- Removed and re-added the custom agent entry.
- Set GITHUB_TOKEN and COPILOT_GITHUB_TOKEN explicitly in Xcode's agent Environment Variables field (I have these set in my shell profile normally, suspecting Xcode's spawned process doesn't inherit them — no effect either way).
- Confirmed Xcode's agent config only supports Executable + Arguments (stdio) — no URL/host/port field available to try TCP mode ( --acp --port ) as a workaround.
- Don't have admin access, so can't use Console.app to pull crash/error logs for the copilot process.
Independent verification (works fine outside Xcode):
I manually replayed the full ACP handshake and prompt flow over raw stdio JSON-RPC against the same CLI binary/version:
initialize → authenticate → session/new → session/prompt , using both plain integer IDs and UUID-string IDs (matching the format Xcode uses). All four requests completed successfully, including a real streamed model response and stopReason: "end_turn" .
This strongly suggests the CLI's ACP server implementation is functioning correctly, and the issue lies in Xcode's ACP client — possibly around stdio pipe handling, a client-side capability/callback (e.g., permission requests) that isn't being answered, or some other difference between how Xcode spawns the process versus how Terminal/a manual harness does.
Ask: Any guidance on Xcode-side ACP client debugging, or known issues with this specific integration path, would be appreciated.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par la configuration de l’agent personnalisé de Xcode Coding Intelligence et le point d’entrée /opt/homebrew/bin/copilot --acp. Reproduisez session/prompt dans Xcode en le comparant au flux JSON-RPC stdio brut qui fonctionne ; c’est terminé lorsque Xcode reçoit la réponse diffusée et le résultat end_turn au lieu de l’erreur failed-to-produce-a-response.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- github
- Domaine
- cli, devtools
- Type d'issue
- Bug
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- Calme
- Clarté
- À clarifier
- Accessibilité débutants
- 30/100