-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
[Feature]: Session busy status reply + cancel option during long-running model responses #25222
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.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.enhancementNew feature or requestNew feature or requestimpact: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.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.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.enhancementNew feature or requestNew feature or requestimpact: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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
Add an immediate scripted “session busy / waiting for model” reply (with optional cancel/new-session actions) when a user sends a message to a currently locked session.
Problem to solve
When a model takes a long time to respond (e.g., 30–120+ seconds), the session is locked while the request is still running. If the user sends another message to the same session during that time, the current behavior is confusing:
This creates a poor UX and leads users to resend messages, open duplicate sessions, or restart services unnecessarily.
Proposed solution
Detect "session busy" (active session lock) before entering provider execution / fallback loops, and return an immediate scripted status reply via the active channel bridge (Telegram/VK/Webchat/etc.) instead of silence or delayed failure.
Desired behavior
When a new message arrives for a locked session:
/wait— do nothing, keep waiting/cancel(or/stop) — cancel the running request/new— start a new sessionwaiting_model_responsetool_runningrate_limitedretryingqueue_waitImplementation notes (high-level)
SessionBusyError(or equivalent) as an early path when lock acquisition fails for an active session.Backward compatibility
Alternatives considered
Manual prompt instructions ("if busy, say X")
Rely on typing indicator only
User manually starts a new session
Local custom patch in a bridge
Impact
Affected users/systems/channels
Severity
Frequency
Consequence
/newsessions or service restartsIn practice, this causes avoidable support/debug overhead and makes normal long-latency behavior indistinguishable from real failures.
Evidence/examples
Suggested attachments:
Additional information