You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A resumed Slack turn can still post the generic internal-error fallback after an earlier accepted assistant reply in the same turn. The symptom is real. The original root-cause framing and suggested !assistantMessageDelivered gate are not.
Verified behavior
/api/internal/agent/continue still reaches runPausedTurn → resumeSlackTurn in packages/junior/src/chat/runtime/slack-resume.ts.
On a completed failed result, resume always delivers the sanitized fallback:
The system is not uniformly “always show internal error after any prior reply,” and not uniformly “never show it.”
Unknowns
Without the original continue event payload, medium confidence whether the production “detailed answer” was terminal final content or intermediate text under today’s rules.
Whether stranded turnHasReply → success and failed-result fallback delivery should share one policy.
Summary
A resumed Slack turn can still post the generic internal-error fallback after an earlier accepted assistant reply in the same turn. The symptom is real. The original root-cause framing and suggested
!assistantMessageDeliveredgate are not.Verified behavior
/api/internal/agent/continuestill reachesrunPausedTurn→resumeSlackTurninpackages/junior/src/chat/runtime/slack-resume.ts.assistantMessageDeliveredis seeded fromturnHasReply(...), but only affects lifecyclesuccessvsno_reply. It does not gate fallback delivery.resumeAwaitingSlackContinuationis nowresumeSlackTurn); the path is still live.Current completion contract
This is not just a missed boolean check.
buildTurnResult()scores only the current slice’snewMessages, and only the terminal assistant tail after the last non-assistant message.packages/junior/tests/integration/slack/finalized-reply-behavior.test.ts:posts a fallback after progress when the run failspackages/junior/tests/unit/turn-result.test.ts: progress + tools with no terminal answer ⇒execution_failureSo this production shape is consistent with current rules:
execution_failure/empty assistant turnWhy the original suggested fix is wrong
Gating fallback with:
would suppress the intentional failure-after-progress case:
assistantMessageDelivered = trueIt would also turn incomplete work after an intermediate reply into silent operator-only failure.
Policy split
paused-turn.ts)turnHasReply→ complete as successslack-resume/reply-executor)The system is not uniformly “always show internal error after any prior reply,” and not uniformly “never show it.”
Unknowns
turnHasReply → successand failed-result fallback delivery should share one policy.Related
packages/junior/src/chat/runtime/slack-resume.tspackages/junior/src/chat/services/turn-result.tspackages/junior/src/chat/task-execution/paused-turn.ts