Skip to content

ACP executor waits for its opening screen after the step is cancelled #1765

Closed

Description

@jxnxts

Reproduction

Standalone reproduction: jxnxts/e2e-acp-opening-screen-repro at 34868b65. It uses the public acp().runStep API and a scripted local ACP agent.

git clone https://github.com/jxnxts/e2e-acp-opening-screen-repro.git
cd e2e-acp-opening-screen-repro
git checkout 34868b65f8a429de4e41976e1a0254028c43e82b
npm ci --ignore-scripts --no-audit --no-fund
npm test

Verified on macOS arm64 with Node v24.22.2, e2e@0.23.1 and @e2e-dev/acp@0.1.2. No browser, model login, paid inference or application service is used. npm test is expected to exit 1 with the published affected package.

The probe warms one ACP session, holds the next step's ctx.observe promise, and aborts that step with an AgentError('STEP_TIMEOUT', ...). The observation is released in finally so the red run also cleans up.

Expected

runStep rejects promptly with the original cancellation reason before the observation resolves. The StepExecutorContext.signal contract requires an executor to stop promptly on abort. No prompt should be sent for the cancelled step, and a following step can reuse the open session.

Actual

With @e2e-dev/acp@0.1.2, the returned promise remains pending until the observation resolves:

stoppedBeforeScreenRelease=false sameReason=false
AssertionError: runStep must reject with its abort reason before the opening screen is released

This concerns the executor promise. The runner already enforces the outer agent.act deadline, so this is not a claim that the whole test ignores its deadline.

Scope

The uninterruptible await is stepMessage(...), which includes the opening-screen observation, in packages/acp/src/executor.ts. It is separate from #1760 / #1761, whose cancellation bug occurs while waiting for the previous ACP prompt turn to settle; this probe completes its first turn normally and holds only the next observation.

Activity

  1. added
    bugSomething isn't working
    agentAgent tiers, model protocol, planning
    P2Improvement / follow-up
    on Nov 14, 2026
  2. okwasniewski commented on Nov 14, 2026

    @okwasniewski
    Member

    [claude-opus-5-5] automated triage on behalf of @okwasniewski

    Confirmed on main: runStep (packages/acp/src/executor.ts:76) awaits the screen read without watching the step's signal. In the e2e runner the step's promise is already abandoned on cancel and no prompt is sent, so this matters mainly for direct acp().runStep callers. Fix in #1766, review posted there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Improvement / follow-upagentAgent tiers, model protocol, planningbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions