Repository navigation
Description
Summary
Slack DM roots and their replies are intentionally flattened into one stable direct-message session. On OpenClaw 2026.7.1, two separate Slack DM roots sent while the first run is active still execute sequentially through that shared session/queue. The second thread waits for the first to finish, and only the active thread shows the normal working/status indication.
That behavior is reasonable for users who treat a DM as one continuous conversation, but it breaks the equally valid workflow where every top-level DM message starts a separate threaded task. For that workflow, Slack threads need to be actual session/execution boundaries, not only UI delivery targets.
Requested behavior
Add a Slack account-level configuration option for DM session boundaries, for example:
channels: {
slack: {
dm: {
sessionScope: "shared" // or "thread"
}
}
}shared: preserve today's flattened stable-DM-session behavior.thread: use the top-level messagetsas the session/thread id from the first turn, then reusethread_tsfor all replies.- Messages within one thread remain sequential.
- Separate DM roots may run concurrently, bounded by the existing agent/gateway concurrency limits.
- Slack delivery, typing/working status, tool context, and follow-ups stay in the originating Slack thread.
thread.historyScoperemains orthogonal: it controls retrieved context, while this new option controls session/execution identity.
The main/direct session may retain lightweight awareness that other thread sessions exist, but task transcripts do not need to be flattened together to achieve that.
Reproduction
- Configure Slack DMs to reply in threads (
replyToMode: "all") withthread.historyScope: "thread"and agent concurrency greater than 1. - Send top-level DM task A that takes long enough to keep a run active.
- While A is running, send top-level DM task B as a separate root.
- Observe that B does not begin until A completes. Only A's thread shows the active working/status state.
- Send a follow-up inside B's thread and observe that it continues using the same flattened direct-message execution session rather than a B-specific session.
In a live 2026.7.1 trace, A ran first, B arrived while A was active but did not enter execution until A completed, and a third top-level acknowledgment waited behind B. No messages were lost; the issue is serialization and missing per-thread activity state.
Why the existing fixes are insufficient
- fix(slack): route DM thread replies to main session instead of thread-scoped session #82418 intentionally changed ordinary Slack DM threads from thread-scoped sessions to the main DM session, describing DM threads as a UI affordance.
- fix(slack): keep DM thread turns out of active steering #85904 correctly prevents a second Slack DM root from being steered into or rejected behind an active reply operation while retaining the stable DM
SessionKey. - Both merged commits are ancestors of the OpenClaw 2026.7.1 commit, but live 2026.7.1 behavior still serializes independent Slack DM roots through one execution lane.
This suggests the remaining boundary is the stable session/execution identity itself. A configurable shared-vs-threaded session scope avoids forcing either workflow on everyone.
Acceptance criteria
- Config schema and docs expose
sharedandthreadSlack DM session modes. - In
threadmode, a root and all its replies resolve to the same:thread:<root_ts>session key from the root's first turn. - Two different DM roots can execute concurrently when concurrency capacity is available.
- Same-thread ordering remains sequential.
- Existing runtime conversation bindings still take precedence.
sharedmode remains backward-compatible.- Regression tests cover root/reply key parity, overlapping roots, working/status routing, queued follow-ups, tool context, and non-Slack compatibility.
Environment
- OpenClaw 2026.7.1 (
2d2ddc43d0dcf71f31283d780f9fe9ff4cc04fe4) - Slack Socket Mode direct messages
- macOS arm64
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jul 16, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 28, 2026, 11:29 PM ET / August 29, 2026, 03:29 UTC.
Summary
Keep open for a maintainer product decision: current Slack behavior intentionally keeps ordinary DM roots and replies in one stable session, while the requested opt-in per-thread execution mode is new compatibility-sensitive configuration.
Reproducibility: yes. source establishes the path: ordinary DM roots resolve to one stable key and ingress waits for an existing turn with that key. This read-only review did not execute a Slack run on current main.
Maintainer decision needed
Why: This is a new user-facing configuration and session-persistence policy, not a repair to behavior that current code or docs define as broken.
Next step
A maintainer must choose whether the new per-thread Slack DM mode is a supported product and upgrade contract before a repair lane can implement it.
Review details
Best possible solution:
If sponsored, add a Slack-plugin-owned opt-in with
sharedas the unchanged default, resolve roots and replies to their root timestamp only in thread mode, and cover bindings, ordering, delivery, and upgrade behavior together.Do we have a high-confidence way to reproduce the issue?
Yes, source establishes the path: ordinary DM roots resolve to one stable key and ingress waits for an existing turn with that key. This read-only review did not execute a Slack run on current main.
Is this the best way to solve the issue?
No, implementation should not begin from the proposed setting alone; maintainers must first select the persistent-session and compatibility contract. Existing explicit bindings and Agent/Assistant View isolation do not supply automatic isolation for ordinary DM roots.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 30772d506144.
Label changes
Label changes:
issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.issue-rating: 🌊 off-meta tidepool: Current issue advisory state no longer selects this label.Label justifications:
P2: This is a bounded Slack workflow improvement, but it changes no default behavior until maintainers choose a new product contract.impact:session-state: The request directly changes how Slack conversations map to persisted sessions and execution ordering.Evidence reviewed
What I checked:
extensions/slack/src/monitor/message-handler/prepare-routing.ts:157, 7e2111e46a65)extensions/slack/src/monitor/message-handler/prepare.thread-session-key.test.ts:594, 7e2111e46a65)extensions/slack/src/monitor/ingress.ts:307, 7e2111e46a65)docs/channels/slack.md. (docs/channels/slack.md:1439, 7e2111e46a65)extensions/slack/src/monitor/message-handler/prepare-routing.ts:157, ffdc7aa7a6d5)docs/channels/slack.md. (docs/channels/slack.md:1442, 7e2111e46a65)Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.3 remaining items
steipete commentedon Sep 2, 2026
Maintainer decision: not planned. Thanks for the clear write-up, @leovoloshin.
Decision and why. We are not adding a
dm.sessionScope/ per-thread session option for ordinary Slack DMs. The shared DM session is the documented contract (https://docs.openclaw.ai/channels/slack#threading-sessions-and-reply-tags), and the workflow you describe, one task per top-level DM with its own execution boundary, is exactly what Slack's Agent messaging experience provides natively. Slack requiresfeatures.agent_viewfor new apps and deprecates Assistant View in February 2027, so a second OpenClaw-side mechanism for the same behavior would be a parallel path we would have to carry for legacy apps only.Supported path. Switch the app to Agent View (manifest:
features.agent_view,assistant:write,app_context_changed; https://docs.openclaw.ai/channels/slack#additional-manifest-settings). Each visible root in the Messages tab routes to its own:thread:<rootTs>session, replies and status stay in that root's thread regardless ofreplyToMode, and separate roots are separate sessions, so they no longer queue behind one another beyond the normal agent concurrency limits. This did not work reliably until today because Slack started rejecting our Agent View probe withinternal_error; #136510 (de3ef11) fixes the detection and ships in the next release.What would change the decision. Concrete evidence that Agent View cannot serve this workflow, for example a Slack plan or workspace policy where the Agent messaging experience is unavailable to the app, or a behavior Agent View roots cannot express that a config option could. Please open a new issue with that evidence rather than reopening this one.