Skip to content

Add Cursor Agent engine adapter#395

Closed
hugobiais wants to merge 5 commits intobrowser-use:mainfrom
hugobiais:add-cursor-agent-engine
Closed

Add Cursor Agent engine adapter#395
hugobiais wants to merge 5 commits intobrowser-use:mainfrom
hugobiais:add-cursor-agent-engine

Conversation

@hugobiais
Copy link
Copy Markdown

@hugobiais hugobiais commented May 5, 2026

Summary

Adds a Cursor Agent engine adapter (binary agent) alongside Claude Code and Codex, with login/auth, stream-json parsing, and a Connections-pane card.

Test plan

  • Make sure Cursor Agent shows in the engine picker, Connections card reflects install/auth, login flow opens, a sample task runs and streams output

Screenshots

To add.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="app/src/main/hl/engines/cursor-agent/adapter.ts">

<violation number="1" location="app/src/main/hl/engines/cursor-agent/adapter.ts:287">
P2: Whitespace-only streamed deltas are discarded, which can remove spaces/newlines from Cursor's partial output and concatenate adjacent words in the UI.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread app/src/main/hl/engines/cursor-agent/adapter.ts Outdated
Wraps `agent -p --output-format stream-json --stream-partial-output` so
sessions can be driven by Cursor's CLI alongside Claude Code and Codex.
Self-registers via the existing engine registry, so the EnginePicker and
engineLogin IPC pick it up with no UI changes.
@hugobiais hugobiais force-pushed the add-cursor-agent-engine branch from bb6c34a to 7af36e5 Compare May 5, 2026 07:34
Filtering with txt.trim() drops chunks that are just spaces/newlines,
which can run adjacent words together when Cursor splits its partial
output across deltas. Only skip truly empty strings now, and keep
lastNarrative anchored to non-whitespace text.
@hugobiais
Copy link
Copy Markdown
Author

Folding into #397 — combining into a single PR for simpler review and iteration.

@hugobiais hugobiais closed this May 5, 2026
@hugobiais hugobiais deleted the add-cursor-agent-engine branch May 5, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant