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
{{ message }}
Repository navigation
fix(conductor): never post an empty conductor reply - #3239
When a conductor turn ends with no visible text, the bridge posts an empty reply. Slack rejects it, and the user is left looking at the ⏳ placeholder with no answer:
Conductor [main] response:
Slack say() failed: The request to the Slack API failed. (url: https://slack.com/api/chat.postMessage, status: 200)
The server responded with: {'ok': False, 'error': 'no_text'}
Why this change
The queue drain and the late-reply watcher already replace an empty reply with [No output from conductor.]. The direct (non-queued) reply path on each platform did not. This change:
adds a NO_OUTPUT_REPLY constant and uses it for the three existing fallbacks too (same text);
substitutes it on the direct reply path for Slack, Telegram, Discord and Mattermost.
The substitution happens at the posting layer, not in send_to_conductor, because #1978 requires an empty attributed reply to come back unchanged (test_empty_attributed_reply_is_preserved_never_substituted). Telegram's post-message hook still receives the raw (empty) response.
Before this change, an empty reply did this on each platform:
Platform
Before
After
Slack
no_text error, only ⏳ visible
[No output from conductor.]
Telegram
empty sendMessage, rejected by the API
[No output from conductor.]
Discord
nothing sent (empty parts are skipped)
[No output from conductor.]
Mattermost
an empty post
[No output from conductor.]
User impact
A turn with no text now gets a short visible notice instead of silence or an API error. Non-empty replies are unchanged. A whitespace-only reply counts as empty, matching the existing .strip() in the queued and late-reply paths.
Evidence
The log above is from a real Slack bridge (v1.16.39) where the conductor ended a turn without text. The new tests fail on main and pass with the fix:
Slack, internal/session/conductor_bridge_slack_empty_reply_test.go (real app_mention handler via the Slack harness): before ['⏳', ''], after ['⏳', '[No output from conductor.]']. A non-empty reply is still posted as-is.
Mattermost, test_an_empty_conductor_reply_posts_a_notice_not_an_empty_post (fake server): before [''], after ['[No output from conductor.]']. Parametrized over "" and " \n".
Discord, test_empty_reply_posts_a_notice in internal/session/test_discord_typing_best_effort.py (real on_message): before [], after ['[No output from conductor.]'].
Telegram has no handler-level test harness (aiogram isn't stubbed anywhere in the tests). The change there is the same one-line substitution.
Suite runs, with HOME isolated: all Slack harness scenarios pass when run with python3 the way runSlackBridgeScenario runs them. conductor/tests has 266 passed and 4 failed, and the same 4 fail on unmodified main (test_hooks::test_env_vars_set, two in test_issue1978_wait_reply_attribution, one Mattermost late-reply drain test). gofmt -l is clean and go vet ./internal/session/ passes. I have not run the Go test suite yet; I'll run self-check in a container before opening this.
AI disclosure
Human-written
AI-assisted (I directed and reviewed it)
AI-authored (a model wrote most of it)
Model(s), if AI helped: claude-opus-5.5
Prompt / session log (optional): —
What actually bothered you
My conductor sometimes finishes a turn without saying anything, and on Slack I'd just see the hourglass forever with no reply.
Checklist
Targeted diff: one problem, no unrelated changes
Tests added or updated for new behavior
Test suite passes sandboxed, inside a container: run skills/agent-deck/scripts/contributing/self-check.sh, which prints the Docker command (never go test on your host)
If this touches a hot path (list, status, session output, startup, tmux layer): before/after timing evidence included (not a hot path)
CHANGELOG.md untouched (entries are added at landing)
AI-assisted? Disclosed above, with validation evidence, and I can answer questions about the code
Empty or whitespace-only conductor replies now display “[No output from conductor.]” instead of a blank message in Telegram, Slack, Discord, and Mattermost.
Queued replies and pending-reply watchers also display the notice when no reply text is available.
Nonempty replies continue to be handled as before, preserving existing reply content across supported messaging channels.
When a conductor turn ends with no visible text, the direct (non-queued)
reply path on every platform posted the empty string. Slack rejects it with
no_text, Mattermost posts an empty message, Discord sends nothing and
Telegram rejects an empty message, so the user is left with only the "⏳"
placeholder. The queue drain and late-reply watcher already substitute
"[No output from conductor.]"; the direct path now does the same, through a
shared NO_OUTPUT_REPLY constant. send_to_conductor still returns the empty
reply unchanged (asheshgoplani#1978), and the post-message hook still sees it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
👋 Thanks for the contribution — intake looks complete.
Your PR body carries everything the maintainer's validation pipeline reads first: the problem, the reasoning, the human intent behind it, and an AI-disclosure. It will be applied, built, and tested against main, and you'll get a structured result within about a day. Merges are always human.
Because this is your first contribution here, GitHub holds the CI runs until a maintainer approves them, so the checks will show as waiting until then. You do not need to do anything.
CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.
Parsing warnings: 5
Validation error: Unrecognized key: "requirements" at "reviews.pre_merge_checks.description"; Unrecognized key: "threshold" at "reviews.pre_merge_checks.issue_assessment"; Unrecognized key: "gosec" at "reviews.tools"; Unrecognized keys: "estimated_code_review_effort", "ignore_users" at "reviews"; Unrecognized key: "language" at "code_generation.unit_tests"
If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
No actionable comments were generated in the recent review.
Walkthrough
The bridge now uses a shared notice when conductor replies are empty or whitespace-only. The change covers synchronous, queued, and pending replies across Telegram, Slack, Discord, and Mattermost. Tests check empty-reply handling for Mattermost, Slack, and Discord.
Changes: Empty reply handling
Layer / File(s)
Summary
Shared fallback and bridge handling internal/session/conductor_bridge.py, conductor/tests/test_mattermost_bridge.py, internal/session/conductor_bridge_slack_empty_reply_test.go, internal/session/test_discord_typing_best_effort.py
The bridge defines NO_OUTPUT_REPLY and uses it for empty or whitespace-only replies across queued, pending, and synchronous platform paths. Tests cover empty replies for Mattermost, Slack, and Discord. Slack tests also check that a nonempty reply remains unchanged.
Empty conductor replies now post a clear "[No output from conductor.]" notice on Slack, Telegram, Discord and Mattermost instead of an empty message. Non-empty replies are unchanged. No merge-blocking risk is evident beyond waiting for CI.
Pre-merge checks: 6
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "fix(conductor): never post an empty conductor reply" follows Conventional Commits format with the fix type and a scope. It matches the main change: empty or whitespace-only conductor replie…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Remote_parity
The remote_parity check applies only when a PR changes TUI behavior in internal/ui/ or cmd/agent-deck/. The changed-file inventory (refs/coderabbit/pre-merge-check/base..head) for PR #3239 lists four …
Test_coverage_per_surface
The check applies to new features and requires tests for each applicable surface (TUI / Web / CLI / remote). PR #3239 (johnkcox, github.com/asheshgoplani/agent-deck, base main, head bridge-empty-reply…
Full details: Title check
Explanation
The title "fix(conductor): never post an empty conductor reply" follows Conventional Commits format with the fix type and a scope. It matches the main change: empty or whitespace-only conductor replies now post the NO_OUTPUT_REPLY notice across Slack, Telegram, Discord, and Mattermost instead of an empty post.
Full details: Remote_parity
Explanation
The remote_parity check applies only when a PR changes TUI behavior in internal/ui/ or cmd/agent-deck/. The changed-file inventory (refs/coderabbit/pre-merge-check/base..head) for PR #3239 lists four files, none under those paths: - conductor/tests/test_mattermost_bridge.py (M) - internal/session/conductor_bridge.py (M) - internal/session/conductor_bridge_slack_empty_reply_test.go (A) - internal/session/test_discord_typing_best_effort.py (M) The PR changes the conductor bridge posting layer in internal/session/ and adds a fallback notice for empty replies. It does not change TUI behavior in the covered paths, so the RemoteSession requirement does not apply. The check is inapplicable, and it passes.
Full details: Test_coverage_per_surface
Explanation
The check applies to new features and requires tests for each applicable surface (TUI / Web / CLI / remote). PR #3239 (johnkcox, github.com/asheshgoplani/agent-deck, base main, head bridge-empty-reply) is a bug fix, titled "fix(conductor): never post an empty conductor reply". It changes how an existing reply path handles empty text. It does not add a new feature. The changed-file inventory is four files: conductor/tests/test_mattermost_bridge.py, internal/session/conductor_bridge.py, internal/session/conductor_bridge_slack_empty_reply_test.go (added), and internal/session/test_discord_typing_best_effort.py. The diff touches only the conductor bridge (remote messaging) surface. It does not touch TUI, Web, or CLI code, so those surfaces are not applicable. Within the remote surface, the PR adds or updates tests for Slack, Mattermost, and Discord. The author states Telegram has no handler-level test harness, and the diff has a one-line substitution there with no dedicated test. This gap is noted. It does not change the verdict, because the check targets new features and this change is a fix. Caveat: if a reviewer treats the new user-visible notice text as a new feature, the Telegram surface would lack a dedicated test. In that reading the result would be INCONCLUSIVE or FAIL on that point.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
Thanks for this, John. Posting a notice instead of an empty message on the direct reply paths makes sense, and I checked that the "NO_REPLY" and heartbeat paths are unaffected and that the Telegram post-message hook still gets the raw response.
One thing needs fixing before it can go in: TestBridgeTemplate_DiscordImageUploadSupport (internal/session/conductor_test.go) now fails. It pins the exact line await send_discord_output(message.channel, response, name_tag=name_tag), which this change rewrites. It passes on main and fails on your head. Please update that pattern (or keep the call line as it was and substitute earlier), and run go test -run 'Slack|Bridge|Empty' ./internal/session/ in the container before pushing.
Small notes, no need to act on them: on Discord an empty reply used to post nothing, so this is a visible behaviour change there, which I think is the intended one. The new tests fail on main only because NO_OUTPUT_REPLY does not exist yet; that is fine.
…ice first
TestBridgeTemplate_DiscordImageUploadSupport pins the exact line
`await send_discord_output(message.channel, response, name_tag=name_tag)`.
Swap an empty reply for NO_OUTPUT_REPLY on the line before each send
(Slack, Discord, Mattermost) so those send lines match main again.
Telegram keeps its separate reply_text so the post-message hook still
receives the raw response.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The empty reply is now replaced on the line before (if not response.strip(): response = NO_OUTPUT_REPLY). I did the same for the Slack and Mattermost send lines, so they also match main. Telegram keeps a separate reply_text, so the post-message hook still gets the raw response. I left TestBridgeTemplate_DiscordImageUploadSupport unchanged, and I grepped the other tests for exact-line pins on the lines this PR touches: that was the only one.
Ran go test -run 'Slack|Bridge|Empty|Discord' ./internal/session/: passes, including TestBridgeTemplate_DiscordImageUploadSupport and TestSlackBridge_EmptyConductorReplyPostsNotice. pytest conductor/tests internal/session/test_discord_typing_best_effort.py shows the same 4 failures as main and nothing new.
No Docker on the machine I used, so I ran only these targeted tests locally rather than in the container.
Thanks, John. I read the new commit: the Discord call line is back to the form the template test pins, the substitution now happens just before each send, and nothing after those sends uses the response, so behaviour is unchanged from your first version. CI is running; once it is green (including TestBridgeTemplate_DiscordImageUploadSupport), this is ready to land.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this solve?
When a conductor turn ends with no visible text, the bridge posts an empty reply. Slack rejects it, and the user is left looking at the
⏳placeholder with no answer:Why this change
The queue drain and the late-reply watcher already replace an empty reply with
[No output from conductor.]. The direct (non-queued) reply path on each platform did not. This change:NO_OUTPUT_REPLYconstant and uses it for the three existing fallbacks too (same text);The substitution happens at the posting layer, not in
send_to_conductor, because #1978 requires an empty attributed reply to come back unchanged (test_empty_attributed_reply_is_preserved_never_substituted). Telegram's post-message hook still receives the raw (empty) response.Before this change, an empty reply did this on each platform:
no_texterror, only⏳visible[No output from conductor.]sendMessage, rejected by the API[No output from conductor.][No output from conductor.][No output from conductor.]User impact
A turn with no text now gets a short visible notice instead of silence or an API error. Non-empty replies are unchanged. A whitespace-only reply counts as empty, matching the existing
.strip()in the queued and late-reply paths.Evidence
The log above is from a real Slack bridge (v1.16.39) where the conductor ended a turn without text. The new tests fail on main and pass with the fix:
internal/session/conductor_bridge_slack_empty_reply_test.go(realapp_mentionhandler via the Slack harness): before['⏳', ''], after['⏳', '[No output from conductor.]']. A non-empty reply is still posted as-is.test_an_empty_conductor_reply_posts_a_notice_not_an_empty_post(fake server): before[''], after['[No output from conductor.]']. Parametrized over""and" \n".test_empty_reply_posts_a_noticeininternal/session/test_discord_typing_best_effort.py(realon_message): before[], after['[No output from conductor.]'].Suite runs, with HOME isolated: all Slack harness scenarios pass when run with python3 the way
runSlackBridgeScenarioruns them.conductor/testshas 266 passed and 4 failed, and the same 4 fail on unmodified main (test_hooks::test_env_vars_set, two intest_issue1978_wait_reply_attribution, one Mattermost late-reply drain test).gofmt -lis clean andgo vet ./internal/session/passes. I have not run the Go test suite yet; I'll run self-check in a container before opening this.AI disclosure
Model(s), if AI helped: claude-opus-5.5
Prompt / session log (optional): —
What actually bothered you
My conductor sometimes finishes a turn without saying anything, and on Slack I'd just see the hourglass forever with no reply.
Checklist
skills/agent-deck/scripts/contributing/self-check.sh, which prints the Docker command (nevergo teston your host)🤖 Generated with Claude Code
Summary by CodeRabbit