Repository navigation
fix(acp): show why an agent's turn produced no answer - #446
Merged
Merged
Conversation
When an ACP agent ended a turn without assistant text, DevSpace said "acp ACP did not return a final assistant response" with no detail: the label was the driver kind, and the cause was only the bare prompt response. Grok in particular reports a failed turn only as stopReason "error" and writes the cause, such as a 401 for an expired login, to its own log. The error now names the agent (grok ACP, cursor ACP), and its detail carries the stop reason, the update kinds received, the agent's recent stderr, and for Grok the session's terminal failure read from the end of ~/.grok/logs/unified.jsonl, with a login hint when none is found. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-acp-error-detail-devspace-site.waishnav.workers.dev (commit 44cae76)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
During QA, Grok failed with
acp ACP did not return a final assistant response.and nothing else. The real cause was a 401: Grok wasn't signed in. Two things hid it. Every ACP error message used the driver kind (acp) instead of the agent, and when a turn ended without assistant text the error's only cause was the bare prompt response, which DevSpace's error detail can't render.Reproducing the exact failure (Grok's full config without its
auth.json) showed why the 401 never surfaced: Grok sends nothing over ACP but{ "stopReason": "error" }, with no message, no session updates, and only model listings on stderr. The 401 exists only in Grok's own log,~/.grok/logs/unified.jsonl, as aturn.terminal_failureentry for the session.ACP error messages now name the agent (
grok ACP,cursor ACP,copilot ACP, orACP agent). A turn without assistant text reports the stop reason, the update kinds received, and the tail of the agent's stderr. For Grok it also reads the session's terminal failure from the end of its log: a bounded, best-effort read keyed by session ID. If the entry isn't found, it falls back to a hint pointing at the log and the login. Secrets in the detail still go through the existing redaction.Verified against the real Grok CLI in the reproduced signed-out state: the error is now
grok ACP did not return a final assistant response.with detailUnauthorized (401) … Invalid or expired credentials …; stop reason: error; …, with the token value redacted. A signed-in Grok run still completes normally. Unit tests cover the detail summary and the log lookup, including other sessions' entries and a missing log.Stacked on #445.
🤖 Generated with Claude Code