reset-cursor-acp
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReset Cursor ACP in bb
在bb中重置Cursor ACP
How Cursor ACP works in bb (read this first)
Cursor ACP在bb中的工作原理(请先阅读)
- ACP = Agent Client Protocol, an open standard from Zed. bb is the client, Cursor CLI is the server.
- bb's plugin spawns one
provider-acpsubprocess per thread, on demand, owned by acursor-agent acpprocess. They talk JSON-RPC over stdin/stdout.bb-provider-bridge-worker - There is no global Cursor ACP server. Nothing to keep alive with launchd or a watchdog. Never build one.
- Config (rules, skills, ) is read when the subprocess starts. Reload = spawn a new subprocess.
.cursor/mcp.json - releases the runtime and kills the subprocess. The thread history is kept. The next message spawns a fresh
bb thread stop <id>.cursor-agent acp
- ACP = Agent Client Protocol,是Zed推出的开放标准。bb是客户端,Cursor CLI是服务器。
- bb的插件会按需为每个线程启动一个
provider-acp子进程,该进程归cursor-agent acp进程所有。它们通过标准输入/输出以JSON-RPC进行通信。bb-provider-bridge-worker - 不存在全局Cursor ACP服务器。无需通过launchd或看门狗保持进程存活。切勿构建此类服务器。
- 配置(规则、skills、)在子进程启动时读取。重新加载配置意味着启动新的子进程。
.cursor/mcp.json - 会释放运行时并终止子进程。线程历史会被保留。下一条消息会启动一个全新的
bb thread stop <id>。cursor-agent acp
Quick reset
快速重置
Resolve relative to this . Run:
scripts/reset-cursor-acp.shSKILL.mdbash
scripts/reset-cursor-acp.sh <thread-id> # reset one Cursor thread
scripts/reset-cursor-acp.sh --self # reset the current thread (BB_THREAD_ID)
scripts/reset-cursor-acp.sh # no thread: orphan cleanup + health check only
scripts/reset-cursor-acp.sh --dry-run # show what would happen
scripts/reset-cursor-acp.sh <id> --kill-all # also kill live agents of OTHER Cursor threadsFind Cursor thread ids with (current thread) or:
bb statusbash
bb thread list --json | python3 -c 'import json,sys; [print(t["id"], t["status"], t["title"]) for t in json.load(sys.stdin) if t.get("providerId")=="acp-cursor"]'The script does four things in order:
- to release the runtime.
bb thread stop <id> - Kills orphaned processes (parent is gone or not a bb bridge worker). Live agents of other threads are kept unless
cursor-agent acp.--kill-all - Prints Cursor CLI version, login state, and whether shows a newer Cursor CLI.
bb updates status - Tells you to send the next message.
If fails with "operation not permitted", the agent shell is sandboxed. Re-run the script outside the sandbox.
ps找到与本相对的脚本。运行:
SKILL.mdscripts/reset-cursor-acp.shbash
scripts/reset-cursor-acp.sh <thread-id> # 重置单个Cursor线程
scripts/reset-cursor-acp.sh --self # 重置当前线程(BB_THREAD_ID)
scripts/reset-cursor-acp.sh # 未指定线程:仅清理孤立进程并进行健康检查
scripts/reset-cursor-acp.sh --dry-run # 显示将要执行的操作
scripts/reset-cursor-acp.sh <id> --kill-all # 同时终止其他Cursor线程的活跃agent使用(查看当前线程)或以下命令查找Cursor线程ID:
bb statusbash
bb thread list --json | python3 -c 'import json,sys; [print(t["id"], t["status"], t["title"]) for t in json.load(sys.stdin) if t.get("providerId")=="acp-cursor"]'该脚本按顺序执行四项操作:
- 执行以释放运行时。
bb thread stop <id> - 终止孤立的进程(父进程已消失或不是bb桥接工作进程)。默认情况下会保留其他线程的活跃agent,除非使用
cursor-agent acp参数。--kill-all - 打印Cursor CLI版本、登录状态,以及是否显示有更新的Cursor CLI。
bb updates status - 提示您发送下一条消息。
如果命令报错“operation not permitted”,说明agent shell处于沙箱环境中。请在沙箱外重新运行脚本。
psVerify
验证
After the script: send one short message to the thread. A fresh agent answers within seconds. If it hangs again, work through the causes below before resetting a second time.
运行脚本后:向线程发送一条简短消息。全新的agent会在几秒内回复。如果再次出现挂起,请先排查以下原因,再进行第二次重置。
Known causes (check before blind resets)
已知原因(重置前请检查)
- Old Cursor CLI. Most ACP bugs get fixed in CLI releases. If step 3 shows an update, run , then reset again.
bb updates apply - Expired login. Symptom "Failed to initialize session services". Fix: , then reset.
cursor-agent login - Unanswered permission request. Cursor blocks until the client answers . Cursor's built-in web search tool always prompts, even in unrestricted mode. Check the thread for a pending approval and answer it before resetting.
session/request_permission - Session resume failed. Cursor's often returns "Session not found". A fresh session after
session/loadis the fix, not a retry.bb thread stop - Team-level MCP servers from the Cursor dashboard do not work in ACP mode. Only project or user .
.cursor/mcp.json - Rate limits. Enable bb's plugin (
provider-retry) so rate-limit failures retry instead of failing the turn.bb plugin enable provider-retry
- 旧版Cursor CLI:大多数ACP bug会在CLI版本更新中修复。如果步骤3显示有更新,请运行,然后再次重置。
bb updates apply - 登录过期:症状为“Failed to initialize session services”。解决方法:运行,然后重置。
cursor-agent login - 未处理的权限请求:Cursor会等待客户端响应后才继续执行。即使在无限制模式下,Cursor内置的网页搜索工具也总会发出提示。请检查线程中是否有待处理的审批请求,在重置前先处理该请求。
session/request_permission - 会话恢复失败:Cursor的经常返回“Session not found”。解决方法是执行
session/load后启动新会话,而非重试。bb thread stop - Cursor控制台中的团队级MCP服务器无法在ACP模式下工作。仅支持项目或用户级别的。
.cursor/mcp.json - 速率限制:启用bb的插件(
provider-retry),这样速率限制导致的失败会自动重试,而非终止当前轮次。bb plugin enable provider-retry
Do not
请勿执行以下操作
- Do not add launchd KeepAlive, cron, or any watchdog for . There is no long-lived process to watch.
cursor-agent acp - Do not blindly. That kills every Cursor thread in bb and the interactive TUI. Use the script; it only kills orphans by default.
pkill -f cursor-agent - Do not restart the whole bb app for a single stuck thread. is enough.
bb thread stop - Do not use on Cursor threads. Cursor does not support it.
bb thread compact
- 请勿为添加launchd KeepAlive、cron或任何看门狗。不存在需要监控的长期运行进程。
cursor-agent acp - 请勿盲目执行。这会终止bb中所有Cursor线程以及交互式TUI。请使用本脚本;默认情况下它仅终止孤立进程。
pkill -f cursor-agent - 请勿因单个线程卡住而重启整个bb应用。已足够。
bb thread stop - 请勿在Cursor线程上使用。Cursor不支持此操作。
bb thread compact