Skip to content

fix(protocol): recognize Claude Desktop local-agent requests (#511 upstream) - #512

Closed
dofastted wants to merge 37 commits into
mainfrom
cursor/fix-claude-desktop-local-agent-511-96aa
Closed

dofastted wants to merge 37 commits into
mainfrom
cursor/fix-claude-desktop-local-agent-511-96aa

Conversation

@dofastted

@dofastted dofastted commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

概要

上游等价于 fork PR #511(a2662007798-boop/vm2api @ a120f38),并补充 CHANGELOG.md「未发布」条目。

变更

  • Claude Desktop local-agent:在 UA 含 local-agent + agent-sdk、平台 desktop_app、合法 anthropic-client-version 时,不再仅凭 cc_entrypoint=local-agent 判为 OMP,避免 claude_code_only 误 403;OMP 专属 system 特征与 body-only relay 路径仍保守。
  • 文档与单测与 fix(protocol): recognize Claude Desktop local-agent requests #511 对齐。

未发布 CHANGELOG

后续

参考

Open in Web Open in Cursor 

Note

Medium Risk
Changes inbound client classification for claude_code_only gating; mis-tuning could admit non-official traffic or still block Desktop, but scope is limited to Desktop fingerprinting with OMP/relay paths left strict.

Reviewed by Cursor Bugbot for commit 8ca4f7e. Configure here.

Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.
Upstream equivalent of fork PR #511 with unreleased CHANGELOG entry.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8ca4f7e. Configure here.

status: 403,
})
}
@file:/workspace/src/lib/identity/claude-code-only.mjs No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Source files replaced with placeholders

High Severity

This commit overwrites claude-code-only.mjs, claude-code-only.test.mjs, CHANGELOG.md, and docs/PROTOCOL.md with @file: workspace pointers instead of the intended local-agent recognition code. Protocol imports of isClaudeCodeFamilyRequest will fail to parse, so the gateway cannot start, and changelog/protocol docs are gone.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8ca4f7e. Configure here.

Copy link
Copy Markdown
Owner Author

关闭:HEAD 8ca4f7e3 五个变更文件被写成占位串 @file:/workspace/...(非真源码),合入会掏空。发版已拒审。将按 fork #511 @ a120f38f 重开干净上游 PR(真 diff + CHANGELOG「未发布」#511 + PROTOCOL),本 PR 作废。

@dofastted dofastted closed this Oct 17, 2026
dofastted added a commit that referenced this pull request Oct 18, 2026
…511) (#518)

Cherry-pick from fork a120f38. Adds CHANGELOG unreleased entry.

Supersedes closed fork PR #511 and bad upstream #512.

Co-authored-by: ted <kuhlmangarry24@gmail.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