Skip to content

[Bug]: chat.abort cannot stop active agent runs; only works for chat.send runs #71128

@xiaomomo

Description

@xiaomomo

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Summary

chat.abort currently cannot stop active runs started via the public
agent RPC.
It only aborts runs tracked in chatAbortControllers, which are created by
chat.send.

This makes it impossible for external runtimes that integrate through
agent to implement a proper "Pause/Stop current session" using public
Gateway RPCs.

Relevant implementation details

  • chat.abort checks context.chatAbortControllers
  • chat.send registers runs into chatAbortControllers
  • agent does not register its runs into chatAbortControllers
  • /stop full semantics live in command handling, not in chat.abort

Why this matters

External apps may intentionally use agent instead of chat.send because
they need:

  • raw agent lifecycle/tool/approval events
  • per-run system prompt injection
  • host-managed conversation/run state

Right now those apps cannot implement a proper public "stop current run/
session" without depending on OpenClaw internal modules.

Suggested direction

Preferred:

  • expose a stable public sessions.stop RPC equivalent to /stop

Alternative:

  • extend public abort APIs so they can stop active agent session runs as
    well

Steps to reproduce

  1. Start a long-running session via the public agent RPC:
    • method: agent
    • params: { sessionKey, message, idempotencyKey, ... }
  2. While the run is still streaming, call:
    • chat.abort({ sessionKey, runId })
    • or chat.abort({ sessionKey })
  3. Gateway returns:
    • { ok: true, aborted: false, runIds: [] }
  4. The run continues.

Expected behavior

One of the following should be true:

  1. chat.abort / sessions.abort should also be able to interrupt active
    session runs started by agent, or
  2. OpenClaw should expose a public session-level stop API, e.g.
    sessions.stop, with semantics equivalent to /stop:
    • clear queued followups / lane queue
    • stop active embedded run
    • stop descendant subagents
    • trigger stop command hooks

Actual behavior

chat.abort only checks chatAbortControllers, which are populated by
chat.send.
agent runs are not registered there, so abort returns aborted:false even
when the run is still active.

OpenClaw version

2026.4.9

Operating system

macOS 15.4

Install method

npm global

Model

minimax

Provider / routing chain

openclaw -> minimax

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions