fix(dockerfile): keep cursor-agent bundle, symlink to /usr/local/bin #1035

Merged
charles merged 1 commit from fix/cursor-agent-bundle into main 2026-05-10 11:40:18 +00:00
Collaborator

PR #1032's cursor block copied only the cursor-agent shell wrapper to /usr/local/bin and rm'd /opt/cursor-agent. The wrapper is a bash script that resolves SCRIPT_DIR via realpath and execs the bundled node against index.js + chunk files shipped alongside it. With the bundle deleted, every container dispatch on a provider: cursor agent failed with:

/usr/local/bin/cursor-agent: line 26: /usr/local/bin/node: No such file or directory

Because docker exec returned non-zero before any stream-json output, the cursor-cli-adapter saw stdout EOF immediately, no events, no cursor_cli_error system event — runner marked task "done" with empty result.

Fix

  • Install the unpacked tarball under /opt/cursor-agent
  • Symlink /usr/local/bin/cursor-agent/opt/cursor-agent/cursor-agent (the wrapper's realpath($0) resolves back to the bundle dir)
  • chmod 0755 the wrapper + node so the bundled interpreter is executable

Verified

$ docker exec claude-hooks-dev /usr/local/bin/cursor-agent --version
2026.05.09-0afadcc

Follow-up (separate ticket)

Cursor adapter swallows the docker-exec exec-fail case silently — should emit a cursor_cli_error event so the runner flags the dispatch instead of marking it "done" with empty output.

PR #1032's cursor block copied only the `cursor-agent` shell wrapper to `/usr/local/bin` and `rm`'d `/opt/cursor-agent`. The wrapper is a bash script that resolves `SCRIPT_DIR` via `realpath` and execs the bundled `node` against `index.js` + chunk files shipped alongside it. With the bundle deleted, every container dispatch on a `provider: cursor` agent failed with: ``` /usr/local/bin/cursor-agent: line 26: /usr/local/bin/node: No such file or directory ``` Because `docker exec` returned non-zero before any stream-json output, the cursor-cli-adapter saw stdout EOF immediately, no events, no `cursor_cli_error` system event — runner marked task "done" with empty result. ## Fix - Install the unpacked tarball under `/opt/cursor-agent` - Symlink `/usr/local/bin/cursor-agent` → `/opt/cursor-agent/cursor-agent` (the wrapper's `realpath($0)` resolves back to the bundle dir) - `chmod 0755` the wrapper + `node` so the bundled interpreter is executable ## Verified ``` $ docker exec claude-hooks-dev /usr/local/bin/cursor-agent --version 2026.05.09-0afadcc ``` ## Follow-up (separate ticket) Cursor adapter swallows the docker-exec exec-fail case silently — should emit a `cursor_cli_error` event so the runner flags the dispatch instead of marking it "done" with empty output.
fix(dockerfile): keep cursor-agent bundle, symlink to /usr/local/bin
All checks were successful
qa / dockerfile (pull_request) Successful in 14s
qa / i18n-string-check (pull_request) Successful in 14s
qa / sql-layer-check (pull_request) Successful in 14s
qa / db-schema (pull_request) Successful in 16s
qa / qa-1 (pull_request) Successful in 3m37s
qa / qa (pull_request) Successful in 0s
b8132d1578
PR #1032's cursor block copied only the `cursor-agent` shell wrapper
to /usr/local/bin and rm'd /opt/cursor-agent. The wrapper is a bash
script that resolves SCRIPT_DIR via realpath and execs the bundled
`node` against `index.js` + the chunk files shipped alongside it. With
the bundle deleted, the script bombed with:

  /usr/local/bin/cursor-agent: line 26: /usr/local/bin/node: No such
  file or directory

Result: every dispatch on a `provider: cursor` agent failed silently —
docker exec returned non-zero, the cursor-cli-adapter saw stdout EOF
without any stream-json events, and the runner marked the task "done"
with empty output.

Install the unpacked bundle under /opt/cursor-agent and expose
`/usr/local/bin/cursor-agent` as a symlink so realpath() resolves back
to the bundle dir; chmod 0755 the wrapper + node so the bundled
interpreter is executable.
charles deleted branch fix/cursor-agent-bundle 2026-05-10 11:40:18 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!1035
No description provided.