Skip to content

fix: distinguish explicit cancellation from ACP transport shutdown - #67

Merged
danyel117 merged 1 commit into
mainfrom
codex/goal-acp-cancel-intent
Oct 8, 2026
Merged

danyel117 merged 1 commit into
mainfrom
codex/goal-acp-cancel-intent

Conversation

@danyel117

@danyel117 danyel117 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A Promise command abort can mean ACP transport shutdown rather than the user pressing Cancel. Preserve the goal on that generic abort and cancel it only on an explicit host interruption hook or a user execution-interrupted event.

Related issue

Related to #59 and follows #65. The companion OpenCode integration is anomalyco/opencode#53913. Opus approved the final fix; merged and published as 0.1.58 (gitHead 3b2284e).

Changes

  • Stop local continuation on transport abort without closing the persisted goal.
  • Register the optional explicit session-interrupt hook for new hosts, including idle gaps; atomically cancel only active goals.
  • Preserve existing busy-execution cancellation and older-host fallback behavior.

Verification

Lint, typecheck, build and npm pack dry run pass; 350 Bun tests pass. Native isolated ACP: Cancel between cycles persists cancelled and prevents restart, while quitting ACP and closing its standalone server preserves active. The companion host's wire tests verify that transport close does not call the user interrupt endpoint. Exact npm 0.1.58 was installed in isolated projects through npm and opencode plugin add; config loading and native ACP creation/get_goal, full continuation, busy Cancel, idle Cancel and transport shutdown pass against the patched source host. Its release workflow passed. The upstream host release is still required for the complete ACP behavior.

Checklist

  • bun run test passes
  • bun run lint passes
  • bun run typecheck passes
  • bun run build passes and dist/server.js is committed
  • Behavior is covered by regressions

Merging to main automatically publishes a new patch release to npm.

@danyel117
danyel117 marked this pull request as ready for review October 8, 2026 10:07
@danyel117
danyel117 merged commit 3b2284e into main Oct 8, 2026
5 checks passed
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