Skip to content

fix(cursor-cli-oauth): keep tool protocol out of assistant text - #1107

Open
eddieparc wants to merge 2 commits into
code-yeongyu:mainfrom
eddieparc:cursor-cli-oauth-hide-tool-frames
Open

fix(cursor-cli-oauth): keep tool protocol out of assistant text#1107
eddieparc wants to merge 2 commits into
code-yeongyu:mainfrom
eddieparc:cursor-cli-oauth-hide-tool-frames

Conversation

@eddieparc

@eddieparc eddieparc commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • stop mapping Cursor CLI internal tool_call protocol into assistant text
  • keep Cursor-executed operations out of host toolCall blocks so Senpi cannot execute them a second time
  • add a regression proving only final assistant prose reaches text deltas and stored content

User-facing OmO issue: code-yeongyu/oh-my-openagent#7169

Root cause

renderToolFrame() serialized Cursor started and completed tool events, including arguments and results, into <cursor-cli-tool> strings. appendToolFrame() sent those strings through pushTextDelta(), so consumers persisted and rendered provider-internal JSON as assistant prose.

Cursor already executed these tools in its subprocess. Suppressing the protocol frames at the provider boundary avoids both conversation-context contamination and duplicate host-side execution.

Validation

  • focused regression: 13/13 passed
  • npm run check: passed
  • npm run build: passed
  • full workspace suite: 8,685 passed, 36 skipped; one unrelated timestamp precision assertion failed and its isolated rerun passed 6/6
  • real provider QA: locally built Senpi returned the independently confirmed result 22 and emitted no <cursor-cli-tool> or serialized tool JSON in visible output

Summary by cubic

Prevents leaking Cursor CLI tool protocol into assistant text and avoids duplicate host execution for cursor-cli-oauth. Previously we serialized tool_call events into <cursor-cli-tool> strings and sent them via text deltas; now we suppress those events and store/render only model prose.

  • Stream behavior: tool_call events are ignored; Cursor executes tools in its subprocess; no host toolCall blocks emit.
  • UX/storage: no <cursor-cli-tool> tags or provider JSON in deltas or persisted messages; only the assistant’s final prose remains.
  • Tests/docs: updated regression in stream.test.ts; AGENTS.md, changes.md, and CHANGELOG.md document the behavior and resolve the concurrent release entry.
  • Migration: if any downstream code parsed <cursor-cli-tool> assistant text, remove that logic—these frames no longer emit.

Written for commit 29ed15f. Summary will update on new commits.

Review in cubic

Keep Cursor-executed tool protocol out of assistant text and host tool calls, with regression coverage and provider documentation.

OmO issue: code-yeongyu/oh-my-openagent#7169

Ultraworked with [omo](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
Resolve the concurrent release changelog while preserving the Cursor provider fix.

Ultraworked with [omo](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
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