Skip to content

Completion callbacks intermittently fail to wake Mattermost callback-session #191

Description

@c-h-

Summary

agentctl launch claude-code completion callbacks intermittently fail to wake the target --callback-session when it's a Mattermost channel session. The coding agent finishes successfully, but the parent session is never notified, so results sit undelivered until a human pings.

Evidence (2026-06-25, agent personal)

Three sequential builds in repo c-h-/digest-audio, all launched with:
--callback-session "agent:personal:mattermost:channel:6hmcskm5jbyqpcu77qaa41nw8c" --callback-agent personal

Session Outcome Callback woke main session?
f943d3f4 (Phase 1) completed ~09:49 ❌ no — 2h+ silent gap until user pinged
608a6012 (Phase 2) completed ✅ (also had a safety-net cron)
5d906345 (Phase 4) completed ❌ no — caught only via manual status check

So ~2 of 3 completions did not deliver to the callback session.

Impact

Finished work is silently stranded; operator must poll agentctl peek/list or rely on out-of-band safety-net crons. Defeats the purpose of --callback-session.

Expected

On agent completion, a wake/notification reliably reaches the resolved --callback-session (Mattermost channel session) the same way it apparently did for 608a6012.

Notes / asks

  • Is delivery best-effort and dropped if the callback session is mid-turn / yielded at completion time? All three parents were idle/yielded waiting.
  • Any ret/queue for callbacks when the target session is busy?
  • Repro: launch with a Mattermost channel callback-session, let parent yield, finish the child.

Workaround in use: per-launch isolated safety-net cron that checks the child and posts results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions