Cursor、デスクトップAIエージェントを操作するための隠しターミナルコマンドを構築

RuntimeWireがCursor 3.16.17で発見したところによると、Cursorはデスクトップアプリで既に実行中のAIエージェントとの会話を外部スクリプトが検出して制御できる、動作するコマンドラインブリッジを構築している。

By · Published · Updated

RUNTIMEWIRE INVESTIGATION — Scoop

Original reporting by RuntimeWire, based on reverse engineering, testing.

Why it matters

Desktop Bridge turns visible Cursor conversations into scriptable workers, giving developers a local supervision layer while expanding what same-user processes can tell desktop agents to do.

Reporting record

Finding

Cursor 3.16.17 contains a working, gated Desktop Bridge that lets the bundled cursor CLI enumerate agent threads open in Cursor Desktop and submit follow-up instructions to them.

How we verified

Methods: reverse engineering, testing.

Cursor’s packaged application contains the cursor desktop CLI parser and help text, an authenticated local Desktop Bridge service, a gated Beta settings card, and desktop handlers for listing and messaging agent threads. In a reporter-owned test, cursor desktop ls --json returned the prepared thread’s ID, title, completed status, local source and window ID. cursor desktop send reported that the follow-up was submitted. Cursor Desktop displayed the terminal-sent instruction and returned the exact requested response: DESKTOP-BRIDGE-LIVE-OK. Cursor’s CLI guide and CLI changelog contained no reference to cursor desktop or Desktop Bridge when reviewed on August 18, 2026.

RuntimeWire extracted and examined the packaged JavaScript from Cursor’s stable Windows x64 build, version 3.16.17. We confirmed the build version, commit and date from package.json and product.json, then traced the desktop_bridge feature gate, disabled-by-default user setting, local bridge startup, discovery mechanism, bearer authentication, CLI commands and desktop message handlers. We activated the feature through Cursor’s built-in test-feature mechanism, enabled “Allow CLI to access desktop agents” in the exposed Beta card and restarted Cursor with real agent HTTP enabled. We created a disposable thread on a reporter-controlled account, enumerated it through cursor desktop ls --json and sent a deterministic no-operation instruction through cursor desktop send. The agent returned the exact requested token inside the original desktop conversation. We preserved screenshots and calculated SHA-256 hashes for the source archive, relevant application files and successful test image. No third-party account, conversation or data was accessed.

Tested versions: Cursor 3.16.17, Windows x64 stable, commit 6b2afae0257df2bb5e1835f15165dc2f0de056b0, built 2026-08-14T01:41:12.803Z.

Reproduction

RuntimeWire independently reproduced the core finding.

Requirements: Cursor 3.16.17 for Windows x64 and a reporter-controlled Cursor account. Quit every running Cursor process. Launch Cursor with its built-in smoke-test driver, real agent HTTP and the desktop_bridge feature override: $CursorExe = "$env\Programs\cursor\Cursor.exe" $DesktopBridgeFlag = "eyJkZXNrdG9wX2JyaWRnZSI6dHJ1ZX0=" Start-Process -FilePath $CursorExe -ArgumentList @( "--glass" "--enable-smoke-test-driver" "--smoke-test-use-real-agent-http" "--test-feature-flags=$DesktopBridgeFlag" ) Open Cursor Settings → Beta. Enable “Allow CLI to access desktop agents.” Quit Cursor completely and relaunch it with the same arguments. Create a disposable agent thread titled “Bridge thread readiness.” Ask it to reply with BRIDGE-THREAD-READY without editing files or running commands. In PowerShell, locate the thread: $CursorCmd = "$env\Programs\cursor\resources\app\bin\cursor.cmd" $Threads = (& $CursorCmd desktop ls --json) | ConvertFrom-Json $Target = $Threads | Where-Object { $_.title -eq "Bridge thread readiness" } | Select-Object -First 1 Confirm that $Target contains an ID, title, status, source and window ID. Submit the follow-up: & $CursorCmd desktop send $Target.id "Reply with exactly DESKTOP-BRIDGE-LIVE-OK. Do not edit files or run commands." Confirm that PowerShell reports the message as submitted and that DESKTOP-BRIDGE-LIVE-OK appears inside the original Cursor Desktop conversation.

File hashes

  • sha256 resources/app/out/cli.js
  • sha256:4ca5f52518ec5fea1a0c4732c6216dc45182b59a1fe2146d3f9ad6062a3490cd resources/app/out/main.js
  • sha256:50ec9d3e80b9f797378eb1a6896ecdadc3a0e3daabe9fec440a1f4e2d6c1878d resources/app/out/vs/workbench/workbench.glass.main.js
  • sha256:2100a37e6ddd23fd3f0adf982dcd6779a525c25f0d6acb9fa0683a44cb947592 resources/app/out/vs/workbench/workbench.desktop.main.js
  • sha256:9dabecdb4d25cdf8a7b29800fa186bd227b25483789cd7536bbe68b2c5cd92f2 successful-desktop-bridge-test.png

Company response

RuntimeWire requested comment; the company had not responded by publication time.

A tiny computer monitor on a vast desk shows a command-line window sending instructions to an AI agent conversation in a desktop application.

この機能は Desktop Bridge と呼ばれる。隠しの cursor desktop コマンドを追加し、次の2つの操作を提供する:

cursor desktop ls cursor desktop send <thread> [text...]

RuntimeWire は、記者が管理する Windows インストールでゲート機能を有効にし、使い捨てのエージェントスレッドを相手にテストを行った。ls コマンドは会話の ID、タイトル、ソース、ステータス、ウィンドウ番号を返した。RuntimeWire はその後 PowerShell を使って完了済みのスレッドに新しい命令を送った:

"Reply with exactly DESKTOP-BRIDGE-LIVE-OK. Do not edit files or run commands."

コマンドラインはメッセージが選択したスレッドに送信されたと報告した。Cursor Desktop は既存の会話内に指示を表示し、新しいエージェントターンを開始して DESKTOP-BRIDGE-LIVE-OK を返した。

この結果は、シェルから Cursor のグラフィカルアプリ内のエージェントまでの完全な経路にわたって Desktop Bridge が機能することを確認する。開発者は各会話を手動で開いて別のプロンプトを入力することなく、Cursor Desktop の周りにスーパーバイザを構築する方法を得たことになる。

橋が生きているときにのみ現れるコマンド

Desktop Bridge は 2026年8月14日付の Cursor の安定 Windows ビルドに組み込まれている。RuntimeWire が調べたコピーはバージョン 3.16.17、コミット 6b2afae0257df2bb5e1835f15165dc2f0de056b0 として識別された。

アクセスは二重に制御される。desktop_bridge というサーバー配信のフィーチャーゲートが Cursor に Beta 設定カードを表示するかを決定する。そのカードには "Allow CLI to access desktop agents." とラベル付けされた別個の、デフォルトで無効のスイッチが含まれている。Cursor はユーザーに設定変更後にアプリを再起動するよう指示する。

通常の起動条件では、Desktop Bridge のカードは RuntimeWire のアカウント上に表示されなかった。RuntimeWire は Cursor に組み込まれた test-flag メカニズムを使ってカードを露出させ、ユーザー設定を有効にしてアプリを再起動し、ライブテストを実施した。

ローカルのブリッジが利用できないとき、コマンドは自らを隠す。Cursor の CLI は desktop をサブコマンドとして解析する前にライブのディスカバリレコードをチェックする。RuntimeWire がブリッジを無効にして最初にテストしたとき、cursor desktop ls はスレッド一覧を返さず、Cursor は desktop をファイルシステムのターゲットとして扱い、その名前のエディタタブを開いた。

ブリッジが起動すると、同じコマンドはヘルプテキストを表示した:“Interact with chat threads in a running Cursor desktop app.”

2026年8月18日時点で、Cursor の現在の CLI ガイドと CLI チェンジログには cursor desktop や Desktop Bridge に関する記載はない。8月11日の CLI リリースはターミナルベースのエージェントセッション内でのステアリングを文書化している。Desktop Bridge は、シェルからデスクトップアプリで開かれている会話にシェル命令を送ることで別の境界を横断する。

Desktop Bridgeができること

実装は、実行中の Cursor デスクトップインスタンス全体で最大200件のスレッドを列挙できる。その構造化された JSON 出力はスクリプトで利用可能なリストとし、thread ID、title、source、status、update time、window、application instance のフィールドを持つ。

desktop send は完全なスレッド ID または一意なプレフィックスを受け付ける。命令はコマンドライン引数または標準入力から読み取ることができる。選択したエージェントが既に作業中の場合、デフォルトの振る舞いは新しいメッセージを現在のターンが終了するまでキューに入れることだ。--force オプションは即座に送信し、アクティブなターンを中断する。

Cursor のコードは local、cloud、draft、Claude Code のスレッドソースを認識する。draft と Claude Code スレッドにはメッセージを送信することを拒否する。RuntimeWire はローカルの Cursor エージェントに対して一覧取得と送信を検証した。中断オプションやクラウド由来のスレッドはライブテストしていない。

現行のコマンドセットでは新しいエージェントを作成したり、トランスクリプトを取得したり、エージェントの応答を端末に出力したりすることはできない。その役割はより狭く、Cursor Desktop に存在する会話を見つけてそこに指示を押し込むことだ。

それだけでも基本的な制御ループをサポートするには十分だ。ローカルプロセスは JSON でスレッドのステータスをポーリングし、どの完了したエージェントが別の割り当てを必要としているかを判断し、忙しいエージェントのためにフォローアップをキューに入れたり、外部条件が変化したときに実行を中断したりできる。Cursor は既に CLI と SDK を通じて headless agents、automations、programmatic agents を文書化しており、Desktop Bridge はこれらのスクリプトパターンをデスクトップインターフェースですでに見えている作業に接続する。

Cursor の公開 SDK とは別のブリッジ

Cursor は SDK Bridge という製品のドキュメントも公開している。二つのブリッジは異なる仕事を担う。

SDK Bridge は Cursor の agent SDK を埋め込み、プログラム的エージェントを作成、再開、操作するための文書化されたプロトコルを公開する。Desktop Bridge はデスクトップアプリ内に存在し、そこで既に開かれている会話をターゲットとする。後者は個別の cursor-sdk-bridge バイナリではなく、通常の cursor ランチャーを使用する。

Desktop Bridge の背後にあるローカルサービスは任意の未認証リクエストを防ぐよう設計されているように見える。起動時にランダムな64文字の bearer token と別個の renderer-invocation token を作成する。CLI はユーザーの .cursor/desktop-bridge ディレクトリに保存されたレコードを通じてローカルソケットと bearer token を発見する。各リクエストはデスクトッププロセスがスレッドを列挙またはメッセージングする前に認証する必要がある。POSIX ファイルモードを尊重するシステムでは、コードはディレクトリとディスカバリファイルを所有者のみの権限で作成する。

これらの制御は未認証のローカル呼び出しからブリッジを保護する。とはいえ、既に同じ OS ユーザーとして動作しているプロセスはユーザー所有のファイルを読み取ることができる可能性があり、Cursor の想定する脅威モデルとエンタープライズ向けのコントロールはより広い展開の前に重要な疑問となる。

この機能の実装は、複数の実行中の Cursor インスタンス、古いディスカバリレコード、曖昧なスレッドプレフィックス、タイムアウト、認証失敗、メッセージサイズ制限を扱えるほどに成熟している。ゲート付きインターフェースと文書の欠如は、そのリリース状況を未解決のままにしている。

現時点では、Cursor 3.16.17 はシェルからデスクトップへの動くコントロールサーフェスを含んでいる。RuntimeWire のテストは、実際の会話を見つけて新しい命令を注入し、ユーザーが Cursor のインターフェースを通じてそのプロンプトを送信しなくてもデスクトップのエージェントに別のターンを完了させることができることを示した。

Reader comments

Conversation for this story loads after sign-in.