Skip to content

System notices cancel a running ACP command and read as a user rejection #5617

Open

Description

@timigod

Summary

On an ACP provider, a system notice (a child thread finishing, a wait resuming) that reaches a thread while its agent is running a command cancels that command. Claude Code then reports a user rejection and stops, though nobody rejected anything. Separately, with diagnostic events hidden, ordinary ACP provider/unhandled events are still stored, though nothing shows them.

Versions and environment

  • bb 0.46.0, installed from npm (bb-app). The code is the same in 0.46.1.
  • Ubuntu 24.04.5 LTS, Node v22.23.3.
  • Claude Code 2.1.296 through a custom ACP provider plugin.
  • Self-hosted server on a remote Linux machine, used through bb Connect.

Steps to reproduce

  1. In an ACP thread, have the agent run timeout 30 tail -f /dev/null.
  2. While it runs, let one of that thread's child threads finish, so bb sends it a system notice.
  3. Watch the tool call and the agent's next message.

Expected vs actual

Expected: the notice waits for the current turn to end, and the command finishes. A human steer can still interrupt.

Actual: the command is cancelled and the agent receives:

Tool permission request failed: Error: Tool use aborted
The user doesn't want to proceed with this tool use. The tool use was rejected ... STOP what you are doing and wait for the user to tell you how to proceed.

The agent then stops and waits for a user who never stepped in.

Evidence

  • A notice for a thread with an active turn is queued with mode "auto" (parent-system-messages.ts#L223-L251, #L311). The ACP bridge handles it as turn/steer, which calls requestSteerCancel and sends session/cancel (bridge.ts#L2935-L2955, #L2107-L2118).
  • Reproduced on 0.46.0 in thread thr_eppka8ynn9, with an explicit steer standing in for the notice. In a long-running coordinating thread, real child-completion notices caused the same false stop repeatedly over one night.
  • In that thread, 1,134 of its 54,353 stored events were hidden provider/unhandled rows.
  • Tested against 075826d6; parent-system-messages.ts is unchanged on main since.

What you ruled out

Suggested priority and effort (optional)

Affects any ACP agent that is busy when one of its child threads finishes. The running command is lost and the stop is blamed on the user. Workaround: tell agents to rerun the command. Fix proposed in #5618.

Investigated, implemented and verified end to end by Timi's coding agents: gpt-6.1-sol at high reasoning level, coordinated by Claude Opus 5.5 at max thinking level.

AGENT GENERATED

Activity

  1. added theissue type on Oct 16, 2026
  2. added
    providers
    threads
    provider-acp
    partial-repro
    on Oct 16, 2026
  3. bb-slop-cop commented on Oct 16, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority: Medium · Effort: Medium.
    • Labels: providers, threads, provider-acp, partial-repro.
    • Report: Reproduction and root-cause analysis.
    • Verdict: PARTIALLY REPRODUCED · Confidence: high for the verified cancellation mechanism.
    • Root cause: Active system notices use automatic turn delivery, which resolves to ACP steering and sends session/cancel without human rejection. Separately, diagnostic visibility filters the timeline, not persistence.
    • Verification: Focused server and ACP transport checks repeat in two clean checkouts of main at 01affc197. The exact Claude Code rejection text and real command termination remain unverified.
    • No fix PR: The real-provider regression remains unverified, and safe delivery/retention changes require policy decisions outside the simple-fix gate.

    AGENT GENERATED

  4. k0d3r1s commented on Nov 10, 2026

    @k0d3r1s

    A complementary mitigation, separate from queueing the notice: make the notice text say who sent it.

    The child-outcome and needs-attention notices are only [bb system] plus the update:

    • packages/templates/src/templates/system-message-child-thread-outcome-batch.md
    • packages/templates/src/templates/system-message-child-thread-needs-attention.md

    When one of them cuts off a tool call, the agent reads the cancelled call as a user rejection and stops. A short paragraph at the end of both templates tells the agent it was not a stop request:

    bb sent this message, not the user. If it cut off one of your tool calls, that was not a request to stop: check whether that call finished (and whether a state-changing call such as a spawn or commit already took effect), re-run it if you still need it, and continue your current task.

    This only changes how the agent reads the notice. It does not remove the cancellation, and model behavior is not guaranteed. Queueing the notice until the turn ends is still the right fix for the cancelled command.

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

    partial-reproprovider-acpprovidersthreads

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions