Skip to content

Revert "Slack: Use Cloud Agent Next infra"#550

Merged
RSO merged 1 commit intomainfrom
revert-500-slack-cloud-agent-next
Feb 25, 2026
Merged

Revert "Slack: Use Cloud Agent Next infra"#550
RSO merged 1 commit intomainfrom
revert-500-slack-cloud-agent-next

Conversation

@RSO
Copy link
Contributor

@RSO RSO commented Feb 25, 2026

Reverts #500

The Cloud Agent can currently not run on the kilocode repository, so I'm reverting this PR until we've fixed that.

@RSO RSO requested a review from eshurakov February 25, 2026 09:29
if (!authToken || !userId) {
return { error: `Slackbot User not found for ID: ${owner.id} and type: ${owner.type}` };
if (!authToken) {
throw new Error(`Slackbot User not found for ID: ${owner.id} and type: ${owner.type}`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: This throw means the return type's error branch ({ authToken?: undefined; error: string } on line 13) is unreachable — the function always either returns { authToken } or throws.

Consequently, the caller in slack-bot.ts line 404 (if (!authResult.authToken)) is dead code. If the user is not found, the thrown error will propagate uncaught up to Sentry's global handler instead of returning the graceful "Error: Slackbot User not found..." message to the Slack user.

Since this is a revert restoring prior behavior, this may be intentional — but worth noting for a future cleanup pass: either return the error (matching the declared type) or simplify the return type to just { authToken: string } and remove the dead error-check in the caller.

@RSO RSO merged commit 92f5190 into main Feb 25, 2026
12 checks passed
@RSO RSO deleted the revert-500-slack-cloud-agent-next branch February 25, 2026 09:32
@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Feb 25, 2026

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
src/lib/slack/auth.ts 36 throw makes the error return type branch unreachable — caller in slack-bot.ts:404 has dead error-handling code, and user-facing error message is lost
Other Observations (not in diff)

This is a revert PR restoring pre-#500 behavior. The warning above reflects a pre-existing inconsistency being restored, not a new regression. The cloud-agent-next/run-session.ts deletion and migration from cloud-agent-next back to cloud-agent client look correct and consistent.

Files Reviewed (4 files)
  • src/app/slack/webhook/route.ts - 0 issues (simple rename cli_sessions_v2cliSessions)
  • src/lib/cloud-agent-next/run-session.ts - 0 issues (deleted)
  • src/lib/slack-bot.ts - 0 issues (reverts to direct cloud-agent streaming; dead error check noted in auth.ts comment)
  • src/lib/slack/auth.ts - 1 issue (throw vs return type mismatch)

Fix these issues in Kilo Cloud

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.

2 participants