8000 feat(slack): offer background tasks in channels by geminixiang · Pull Request #193 · geminixiang/mikan · GitHub
[go: up one dir, main page]

Skip to content

feat(slack): offer background tasks in channels - #193

Merged
geminixiang merged 1 commit into
mainfrom
feat/channel-tasks
Oct 19, 2026
Merged

geminixiang merged 1 commit into
mainfrom
feat/channel-tasks

Conversation

@geminixiang
Copy link
Copy Markdown
Owner

Why

In a channel, one long request blocked everyone: while mikan worked on it, another person's question and the requester's own "how far along?" waited until it finished. DMs already hand long work to a background task thread (start_task, ADR 0021). ADR 0021 planned to open it to channels next (decision 9, step 2); this does that.

What changes

In a channel Before After
Top-level mention with long work Answered inline; the channel waits The model may hand it off: an acknowledgement at the top level, the work in its thread
Someone else mentions mikan meanwhile Waits for the long work Answered at once
Mention in the task thread — Routed like a DM task thread reply: status from observation, steering from the requester only (others get the existing rejection notice)
Unmentioned replies in the task thread Ignored (channel trigger policy) Same
Top-level question about a task — A normal turn; the model can call task_status
Threads, Telegram, Discord No tasks Same (ADR 0021 step 3 is later)

Code: SlackMessagingBot.createContext no longer limits startTask, getTaskStatus, and notifyCompletion to DMs, and handleAppMention sends a mention in a task thread through deliverTaskUpdate. Prompt and tool description say channels are included.

Acceptance eval

Local daemon, test Slack workspace, gpt-6-luna. Alice asks for three sequential sandbox commands (about 95 s); 15 s later Bob asks "1+1"; 10 s after that Alice asks how far along it is. Seconds from each message to its answer. Fresh channels, 2 runs each.

Case main Branch
Bob's unrelated question 94, 98 s 5–7 s (3 runs)
Alice's status question 87, 90 s 11–13 s, "still running, on the first command"
Alice's result 101–107 s, inline 114–127 s, in the task thread, correct
Short question ("capital of Taiwan") 3 s, inline, no task 4–7 s, inline, no task
DM long request (regression) task thread, 119 s task thread, 114–129 s

Accepted cost: the long request itself finishes about 10–20 s later, because the handoff is one more model turn.

Known limit: in a test channel with a long history of doing such work inline, the model kept doing it inline in 2 of 2 runs (results then match main). The decision is the model's; this change only offers the tool.

Verification

  • New test channel handoff keeps the channel answering and lets its requester steer the task thread fails on main (no task session) and passes here.
  • lint, fmt:check, knip, typecheck, build, full test suite (2,065 passed), duplication guard.
  • Slack E2E on this branch: run 39215154267 passed.

A top-level mention in a channel can now hand long work to a task thread,
as in DMs (ADR 0021, step 2). A mention in the task thread is routed like
a DM task thread reply: status from observation, and steering only from
the task's requester. Unmentioned thread replies and top-level mentions
keep the channel's trigger policy.
@geminixiang
geminixiang merged commit 1365a70 into main Oct 19, 2026
6 checks passed
@geminixiang
geminixiang deleted the feat/channel-tasks branch October 19, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0