-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Decouple mode="session" from thread binding requirement #53548
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivityMarked as stale due to inactivity
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
sessions_spawnwithmode="session"unconditionally requiresthread: true:If the channel does not support thread bindings (e.g. Feishu, Signal, WhatsApp), the request fails with:
This makes persistent ACP sessions (and persistent subagent sessions) unusable on any channel without native thread support.
Why this coupling is unnecessary
Thread binding and persistent sessions serve two independent purposes:
mode="session")sessions_sendthread: true)Thread binding is a delivery optimization — it lets users talk directly to a sub-session in a thread. But the session itself does not need a thread to exist. The parent agent can perfectly well relay messages to the session using
sessions_send(label=...)orsessions_send(sessionKey=...).Current user experience
On channels without thread support:
mode="session"→ error → onlymode="run"available → no multi-turn sessionsmode="run"with file-based state passing between invocations, which loses all session contextOn channels with thread support (Discord):
Proposed behavior
Allow
mode="session"withoutthread: true:modethread"session"true"session"falseor omittedsessions_send, output delivered to current conversation"run"When
mode="session"andthreadis not set:childSessionKey/labelso the caller can usesessions_sendto continue the conversationmode="run")Use cases unlocked
Environment
dist/plugin-sdk/thread-bindings-SYAnWHuW.js)