Claude Code in Slack (agent loop)

Live. Smoke-tested 2026-08-21: a Slack mention filed issue #625 with no laptop involved. Planning history: #576 (agent workforce), #494 (phone-only dev loop), #578 (Sentry triage loop).

Phone-first control surface for the agent workforce: Slack is intake and status, claude.ai/code cloud sessions are execution, GitHub mobile is review and approval. Everything runs under Sean’s individual Claude account (Max plan) — this is the “legacy” Claude Code in Slack, which is the current, documented path on individual plans. Claude Tag (org identity, ambient mode, channel memory) is Team/Enterprise-only and deliberately deferred (#576 Option B).

Architecture

Piece Value
Slack workspace Immersive (single-member — see Guardrails)
Channels #agent-fix-sentry (reactive, Sentry loop) · #agent-developer (direct tasking)
Slack app Claude, routing mode Code only
Claude account sean@immersive-app.com, connected in the Claude App Home
GitHub app Claude installed on the immersive-app org, select repos: immersive, handbook
Execution Claude Code cloud sessions at claude.ai/code, billed to the existing subscription

Using it

@-mention Claude in a channel it has been invited to; it detects coding intent, spins up a cloud session against the connected repo, posts progress to the thread, and finishes with action buttons (View Session, Create PR, Change Repo). Mentions only — no DMs, no ambient listening on individual plans. Queries work too (e.g. “list open issues labeled bug in immersive-app/immersive”), not just coding tasks.

Per-task flow (both channels)

  1. Task arrives: Sentry sweep post in #agent-fix-sentry, or direct mention in #agent-developer
  2. Claude posts triage/plan notes in the thread (for errors: root cause, frequency, affected users, proposed fix)
  3. Fix on a branch; one PR per task
  4. Request GitHub Copilot code review on the PR; address findings
  5. Full CI suite green
  6. Stop and wait for Sean: merge, deploy, and Sentry resolution are human-only (see agent autonomy)

Sentry intake

Sentry’s native Slack integration needs a paid Sentry plan, so a scheduled Routine polls the API instead: GET https://sentry.io/api/0/organizations/immersive-m2/issues/?query=is:unresolved, diffs against already-triaged issues, and posts genuinely new errors to #agent-fix-sentry. The read token lives in Rails credentials (sentry.auth_token, scopes event:read, project:read, org:read); cloud sessions cannot decrypt credentials, so the Routine gets it as a cloud-environment secret (SENTRY_AUTH_TOKEN). Triaged defects get the bug label on GitHub. Free-plan fallback if faster signal is needed: Sentry email alerts to the connected Gmail.

Guardrails

  • Single-member workspace, always. Claude reads channel context and may follow instructions found in it. No untrusted members in any channel Claude is invited to.
  • Human-only actions (per agent autonomy): merge, deploy, destructive DB operations, spending, external publishing, anything touching real user data.
  • Audit: GitHub trail (issues/PRs/commits) + full session transcripts at claude.ai/code.
  • Least-privilege GitHub access: the Claude app installation is scoped to selected repositories only, alongside the similarly scoped Sentry and Cloudflare apps.

Costs and dates

  • Incremental cost today: $0 — sessions bill against the existing Max subscription.
  • 2026-09-17: the Slack workspace’s Pro trial ends and Slack gates AI apps on paid plans. If @Claude stops responding that day, the fix is one Slack Pro seat (~$9/mo), not a Claude-side change.

Troubleshooting

Symptom Cause / fix
/invite @Claude → “A valid member name is required” Claude app not installed in the workspace — install from the Slack Marketplace
Mention gets no reply Account not connected: Slack Apps → Claude → Home tab → Connect
“Claude Code is not enabled for your account” Visit claude.ai/code once as the connected account (first visit creates the cloud environment), then retry
Repo missing from the Select repository picker The Claude GitHub app installation on the immersive-app org doesn’t include it — org Settings → GitHub Apps → Claude → Configure → Repository access. (A personal “Authorized GitHub Apps” entry is OAuth only and does not grant repos.)
“Using the legacy Claude in Slack bot” banner Expected on individual plans; Claude Tag is Team/Enterprise-only. Ignore.

References


This site uses Just the Docs, a documentation theme for Jekyll.