Problem
Slack/Pinet thread ownership transfer is still confusing or broken in recent broker-delegation flows.
Observed today:
- Broker transferred Slack thread
1779139556.450249 to workers via pinet action=send with transfer_thread_id multiple times.
- Workers still reported they could not post directly because they only had a thread timestamp without enough Slack channel/context, or Slack/Pinet reported that the thread was owned by another agent.
- Broker relay with
slack_send back to the original thread also failed with: Thread 1779139556.450249 is already owned by another agent.
- Human-visible status had to move to side thread
1779139896.435149, which made coordination confusing.
Expected behavior
After a broker transfers a Slack thread to a worker, the worker should have enough channel/thread ownership context to post status directly in that Slack thread.
If transfer cannot be completed, or if ownership remains with another agent, the system should expose a clear state and recovery path instead of leaving the broker and worker unable to post in the original thread.
Repro / investigation notes
A likely repro path:
- Receive a Slack-originated task in a broker-owned thread.
- Delegate to worker A with
pinet action=send args.transfer_thread_id=<slack thread_ts>.
- Re-delegate or transfer the same Slack thread to worker B.
- Have the worker attempt direct Slack/Pinet reply to the transferred thread.
- Have the broker attempt relay to the original Slack thread after ownership has moved.
Check whether the receiving worker gets durable Slack channel + thread context, not only the Slack thread timestamp. Also verify that all transfer-related state changes agree:
- explicit Slack thread owner binding
- Pinet inbox/thread-affinity metadata
- unread row ownership
- any Slack context cache used by
slack_send / Pinet delivery
- diagnostics and error messages when owner/context is missing
Related prior work: #696, #722, and possibly #744.
Acceptance criteria
- Explain the current ownership-transfer state machine and where it fails for the observed flow.
- Fix the transfer/reply path if feasible, including regression coverage.
- If a worker cannot receive enough Slack context to post, expose a clear diagnostic/recovery path.
- Preserve first-owner-wins behavior unless the broker explicitly transfers ownership.
- Do not expose Slack tokens, secret values, private prompt contents, or local secret paths in logs, issues, or tests.
Problem
Slack/Pinet thread ownership transfer is still confusing or broken in recent broker-delegation flows.
Observed today:
1779139556.450249to workers viapinet action=sendwithtransfer_thread_idmultiple times.slack_sendback to the original thread also failed with:Thread 1779139556.450249 is already owned by another agent.1779139896.435149, which made coordination confusing.Expected behavior
After a broker transfers a Slack thread to a worker, the worker should have enough channel/thread ownership context to post status directly in that Slack thread.
If transfer cannot be completed, or if ownership remains with another agent, the system should expose a clear state and recovery path instead of leaving the broker and worker unable to post in the original thread.
Repro / investigation notes
A likely repro path:
pinet action=send args.transfer_thread_id=<slack thread_ts>.Check whether the receiving worker gets durable Slack channel + thread context, not only the Slack thread timestamp. Also verify that all transfer-related state changes agree:
slack_send/ Pinet deliveryRelated prior work: #696, #722, and possibly #744.
Acceptance criteria