Skip to content

Slack DM threads still serialize in 2026.7.1; add configurable per-thread session scope #108975

Closed as not planned

Description

@leovoloshin

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 message ts as the session/thread id from the first turn, then reuse thread_ts for 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.historyScope remains 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

  1. Configure Slack DMs to reply in threads (replyToMode: "all") with thread.historyScope: "thread" and agent concurrency greater than 1.
  2. Send top-level DM task A that takes long enough to keep a run active.
  3. While A is running, send top-level DM task B as a separate root.
  4. Observe that B does not begin until A completes. Only A's thread shows the active working/status state.
  5. 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

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 shared and thread Slack DM session modes.
  • In thread mode, 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.
  • shared mode 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

Activity

  1. added
    P2Normal backlog priority with limited blast radius.
    impact:session-stateSession, 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.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    on Jul 16, 2026
  2. clawsweeper commented on Jul 16, 2026

    @clawsweeper
    Contributor

    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

    Question Recommendation
    Should ordinary Slack DM threads remain one shared conversation, or should the Slack plugin offer an opt-in per-root thread session mode? Keep the shared DM contract: Retain the documented stable DM session and use existing explicit runtime bindings for exceptional isolated conversations.

    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 shared as 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:

    • A thread mode changes persisted session and execution identity, so its default, upgrade behavior, runtime-binding precedence, delivery routing, and status semantics need an explicit product contract.

    Codex review notes: model internal, reasoning high; reviewed against 30772d506144.

    Label changes

    Label changes:

    • add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
    • add clawsweeper:source-repro: Current issue advisory state selects this label.
    • remove 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:

    Likely related people:

    • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    • kagura-agent: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    • guanbear: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  3. added
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    and removed
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    on Jul 31, 2026
  4. added
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    and removed
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    on Aug 8, 2026
  5. 3 remaining items

  6. steipete commented on Sep 2, 2026

    @steipete
    Contributor

    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 requires features.agent_view for 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 of replyToMode, 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 with internal_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.

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

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper 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.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions