mirror of
https://github.com/open-webui/computer.git
synced 2026-11-05 01:17:24 +00:00
[GH-ISSUE #84] fix: Cursor agent fails with ACP protocol mismatch (NDJSON vs Content-Length framing) #38
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/computer#38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @steamEngineer on GitHub (Jun 28, 2026).
Original GitHub issue: https://github.com/open-webui/computer/issues/84
Problem
The Cursor CLI agent (
agent acp) uses newline-delimited JSON (NDJSON) for stdin/stdout communication, but the ACP client in cptr only supported Content-Length framed JSON-RPC (Content-Length: N\r\n\r\n{json}). This caused a bidirectional protocol mismatch:Result: the Cursor agent could appear connected but fail with auth/protocol errors, and models were not discoverable in the UI.
Root cause
cptr/utils/agents/acp.pyhardcoded Content-Length framing in_send()and expected Content-Length framing in_reader_loop(). Both Cursor (agent acp) and Grok (agent stdio) actually speak NDJSON with current CLIs.Proposed fix
_send()to write NDJSON ({json}\n) instead of Content-Length framing_reader_loop()to parse NDJSON as the primary protocol_extract_json_message()for other ACP implementationsVerification
Tested locally on this machine:
agent acpgrok agent stdioThe previous Content-Length-only
_send()was incompatible with both agents.Contribution status
I have a fix ready on my fork (
steamEngineer/computer, branchfix/cursor-agent-ndjson-support), but PR creation appears restricted on this repository for outside contributors. If maintainers can enable PRs from forks or accept the patch another way, I am happy to submit.Files affected
cptr/utils/agents/acp.py(~18 insertions, 8 deletions)@steamEngineer commented on GitHub (Jun 28, 2026):
PR submission blocked
I attempted to open a PR from
steamEngineer/computer:fix/cursor-agent-ndjson-support→open-webui/computer:main, but GitHub returned:The fix is ready on the fork:
fix/cursor-agent-ndjson-supportIf maintainers can grant fork PR permissions or cherry-pick from the branch above, the patch is a single commit touching
cptr/utils/agents/acp.py(18 insertions, 8 deletions).Proposed PR title
fix(acp): add newline-delimited JSON support for Cursor agentProposed PR body (for when PRs are enabled)
What does this fix/solve?
agent acpand Grok CLI 0.2.67agent stdio)Verification
agent acpgrok agent stdioThe previous Content-Length-only
_send()was incompatible with both agents.@tjbck commented on GitHub (Jun 30, 2026):
Should be addressed!