💬 hippo: Part of the Claude Code Official Docs Breakdown series.


1. What Is Claude Code in Slack?

Picture this: you are debugging an issue with a teammate in a Slack channel and realize it needs a quick code change. Normally that means switching to your IDE, locating the file, editing it, and opening a PR—easily 10+ minutes of context switching.

With Claude Code in Slack, you just post @Claude add an email field to user.ts right in the channel. Claude evaluates your message, recognizes it as a coding task, spins up an isolated Code Session on claude.ai/code, makes the edits, and @mentions you with action buttons once it finishes.

That is the core mental model: Slack is the task dispatcher and notification panel; actual coding happens on the claude.ai/code web UI. Slack handles prompts and status updates, while the web UI executes the changes and renders the full diff.

The official docs highlight four typical use cases:

Use Case Scenario
Bug investigation and fixes Ask Claude to diagnose and patch a bug directly inside its discussion thread
Quick code review edits Spot an issue during PR review and have Claude apply the fix immediately
Collaborative debugging Bring Claude into a multi-person thread to analyze root causes and write patches
Parallel task execution @Claude multiple times to spin up independent sessions running concurrently

2. Official Docs Breakdown

2.1 Core Workflow and Automatic Intent Detection

The end-to-end flow has six steps:

1
2
3
4
5
6
7
8
9
10
11
1. Mention @Claude in Slack with a task
↓
2. Claude analyzes message intent
↓
3. Detected as coding task → creates a Session on claude.ai/code
↓
4. Claude works in the Session; Slack receives progress updates
↓
5. Done → @mentions you with action buttons
↓
6. Click buttons to review/open a PR, or continue in the web UI

Automatic intent detection is the linchpin. Rather than blindly forwarding every mention to the web UI, Claude classifies your message first:

  • Coding task: Messages like "add logging to auth.ts" or "fix the null pointer bug in login" contain concrete file names, function names, or code-change verbs. Claude automatically routes them to claude.ai/code and starts a Code Session.
  • General question: Messages like "Claude, is Go or Rust better for building a CLI?" are treated as standard Q&A, so Claude replies directly in Slack as a chat assistant.

Auto-detection isn’t infallible. When you want code changes but Claude responds as a normal chat assistant, click Retry as Code. That forces Claude to re-run the prompt as a coding task and open a web session.

1
2
3
4
5
6
7
8
9
# Auto-detected as a coding task (file name + action verb)
@Claude add user_id validation in api/handler.go and return 400 when empty

# Auto-detected as chat (general knowledge Q&A)
@Claude what are the best practices for error handling in Go?

# Manually trigger a coding task (when intent is ambiguous)
@Claude handle the issue we just discussed
→ Replied as chat instead? Click "Retry as Code" to force a coding session

💬 hippo: Retry as Code is easy to overlook. If you meant to kick off a coding task and only got a text reply, hit that button before rewriting your prompt.

2.2 Prerequisites and Initial Setup

You need four prerequisites in place before using the integration:

Requirement Details
Claude plan Pro, Max, Teams, or Enterprise (with Claude Code premium seats)
Claude Code on the web Access to claude.ai/code must be enabled
GitHub connection At least one authenticated GitHub repository connected to Claude Code
Slack authentication Your Slack account linked to your Claude account via the Claude App

Follow these four setup steps:

Step 1: Install the Claude App

Have your Slack workspace administrator search for “Claude” in the Slack App Directory and install it.

Step 2: Connect your account (App Home)

1
2
3
4
5
6
# In Slack
1. Left sidebar → Apps → Claude
2. Open the Claude App Home tab
3. Click the "Connect Account" button
4. Your browser opens claude.ai—sign in and authorize
5. Return to Slack and confirm the status shows "Connected"

💬 hippo: App Home is also your first stop when troubleshooting. If anything stops working, check your connection status here first.

Step 3: Enable the web UI and connect repositories

Open claude.ai/code and verify you can load it. Then go to Settings → Repositories and connect at least one GitHub repository.

Step 4: Invite Claude into your channels

Installing the app does not grant access to every channel. Invite it explicitly where you want to use it:

1
/invite @Claude

@Claude only triggers Code Sessions in channels it has been invited to.

2.3 Context Gathering and Repository Selection

Claude gathers context in two modes depending on where you mention it.

Thread mode: Mentioning @Claude inside a thread pulls the entire thread’s message history. This is the recommended workflow—discuss the bug in a thread to build context, then dispatch the task at the end.

1
2
3
4
👤 Colleague A: This API is returning 500; logs show user_id is empty
👤 Colleague B: Looks like /api/user/:id is missing parameter validation
👤 You: @Claude add user_id validation in api/handler.go so it returns
400 on empty values instead of querying the database

Claude picks up the 500 error, empty user_id, and missing validation from the thread and generates a patch that matches the discussion.

Channel mode: Mentioning @Claude directly in a top-level channel pulls recent channel messages for relevant context. Context precision is lower than in thread mode, so reserve this for simple, self-contained tasks.

Automatic repository selection: Claude matches the target repository based on the conversation. If multiple repositories fit, it surfaces a dropdown for you to pick one. To avoid ambiguity, name the repository explicitly:

1
2
@Claude in myorg/web-admin, add logging to the login function in auth.ts:
log username, login time, and IP at winston info level; do not create a PR

2.4 Permissions, Action Buttons, and Slack vs. Web Capabilities

User-level permissions: Every session runs under your own Claude account. Usage counts against your personal plan limits, Claude can only touch repositories connected to your account, and session history shows up in your claude.ai/code workspace. Workspace admins control scope by deciding which channels Claude is allowed to join.

The four action buttons:

Button Action When to Use
View Session Opens the full Claude Code session in your browser Inspect all executed steps, review the full diff, or continue the conversation
Create PR Opens a pull request directly from the session’s changes Submit immediately once you have verified the diff
Retry as Code Re-runs the prompt as a coding task Claude replied as a chat assistant when you wanted a Code Session
Change Repo Switches the target repository Claude picked the wrong repo—opens a dropdown of your connected repositories

Slack vs. Web (claude.ai/code) at a glance:

Capability Slack Web (claude.ai/code)
Launch coding tasks Yes (@Claude) Yes
View execution progress Brief status updates Full real-time stream
Inspect code changes High-level summary Full diff and file comparison
Continue conversation Requires opening web UI Direct follow-up
Create PR One-click button Full PR configuration
Edit code directly Not supported Direct editing

💬 hippo: Put simply, Slack is strictly for dispatching work and clicking buttons. To inspect what actually changed in the codebase, always jump to the web UI.

Current limitations:

Limitation Details
GitHub only Only GitHub repositories are supported; GitLab and Bitbucket are not yet supported
One PR per session Each session can create at most one pull request
Rate limits Sessions consume rate limits from your personal Claude plan
Web access required Users without claude.ai/code access only receive standard chat replies

3. Field Notes from Real Use

💬 hippo: A few pitfalls I ran into while using this day to day:

3.1 Repository Misidentification

If you maintain similarly named repos (such as web-app, web-admin, and web-mobile), asking Claude to “update the web project” frequently routes to the wrong one.

Fix: Always include the full org/repo-name in your prompt:

1
2
3
4
5
# ❌ Easy to misidentify
@Claude update the login page in the web project

# ✅ Explicitly specified
@Claude in myorg/web-admin, update the validation logic on the login page

3.2 Context Truncation in Long Threads

In a bug thread with 50+ messages, Claude appeared to ingest only part of the history and produced a fix that missed the real root cause.

Fix: Restate the essential details directly in your @Claude message instead of relying on thread history:

1
2
3
4
5
6
# ❌ Relying on thread history
@Claude fix that bug for me

# ✅ Key details included in the prompt
@Claude fix the null pointer bug in user.service.ts: getUserById doesn't
handle id being null; it should return 404 instead of throwing an exception

3.3 Practical Recommendations

1. Dispatch short tasks from Slack + review on the web; take large tasks straight to the web UI

One-line config tweaks and adding a field work great from Slack. Module refactors and greenfield features belong directly in claude.ai/code. Rule of thumb: if you can specify the requirement cleanly in a single message, use Slack; if it needs multi-turn back-and-forth, start on the web.

2. Define explicit completion criteria

Tell Claude the exact deliverable instead of sending a vague instruction:

1
2
3
4
5
6
# ❌ Vague
@Claude add some logging

# ✅ Explicit
@Claude add logging to the login function in auth.ts: log username, login time,
and IP address at winston info level; do not create a PR when done

3. Make clicking View Session a habit

Slack only posts a short summary (“I finished X”) without showing the actual modified files. Always click View Session to review the complete diff before hitting Create PR.


4. Troubleshooting & FAQ

4.1 Session Doesn’t Start

Symptom: Mentioning @Claude only produces a regular chat reply instead of launching a Code Session.

Cause How to Check Fix
Disconnected account Check status in Claude App Home If it shows Connect Account, reconnect
Missing web access Open claude.ai/code If you hit 403 or a paywall, verify your plan includes Claude Code access
No repository connected claude.ai/code → Settings → Repositories Confirm at least one repository is connected
Misclassified intent Check the type of Claude’s reply Click Retry as Code to force a coding session

4.2 Authentication Errors

Symptom: Authentication fails or sessions cannot be created.

1
2
3
4
5
6
7
# Troubleshooting steps
1. Open Slack → Apps → Claude → App Home
2. Click Disconnect
3. Refresh the page
4. Click Connect Account to reconnect
5. Confirm you are signed into the right Claude account in your browser
6. If it still fails, check claude.ai → Settings → Plan to verify plan access

💬 hippo: Watch out for multi-account mismatches—it’s easy to have your personal account signed into the browser while Slack is linked to your work account. Make sure both sides use the same account.

4.3 Repository Missing or Wrong Repo Selected

Issue Fix
Repository not listed Connect it under claude.ai/code → Settings → Repositories
Connected but not showing Disconnect and re-authorize your GitHub account
Claude picked the wrong repo Click Change Repo to pick manually
Repeated misselection Pass the full repo name in the prompt: @Claude in org/repo-name ...

4.4 Other FAQs

Q: Can I run multiple tasks at the same time?

A: Yes. Each @Claude mention launches an isolated session, so you can dispatch several small changes in parallel without conflicts.

Q: What happens when a session expires?

A: Expired sessions remain accessible in your claude.ai/code history. You can still inspect past code changes and continue the conversation from the web UI.

Q: Can teammates see my sessions?

A: On Teams and Enterprise plans, sessions are automatically visible to your organization. On personal plans, sessions stay private.


5. Summary

Claude Code in Slack shines at lowering the activation cost of small coding tasks—dispatch the fix right where the bug is being discussed, without switching tools or opening an IDE.

Three habits make it reliable:

  1. Name the repository and target files explicitly so Claude doesn’t guess wrong
  2. Include key context in the prompt instead of trusting long thread histories
  3. Review diffs in the web UI and treat Slack strictly as a dispatcher and summary panel

Series Navigation


Based on the official Claude Code in Slack documentation.

Last updated: 2026-03-31