# Repository Briefing: anneschuth/claude-threads
> Source: https://repoforai.com/repo/anneschuth/claude-threads (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/anneschuth/claude-threads
- **Official Docs / Website**: https://claude-threads.run
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: Apache-2.0
- **Engineering Health**: A+ (90/100 · Maintenance 35/35 · Adoption 15/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v1.42.0 (2026-11-15) — https://github.com/anneschuth/claude-threads/releases
- **Review Snapshot**: 2026-12-01
- **Deployment / Stack Signals**: Self-Hosted, CLI, MCP
- **Momentum**: 48 ★ total (+0 24h / +0 7d) · 18 forks
- **Topics**: `ai`, `anthropic`, `bot`, `chatops`, `claude`, `claude-code`, `mattermost`, `pair-programming`, `slack`
- **When to Use**: Best for: Engineering teams that want to collaborate on Claude Code sessions from Slack or Mattermost while retaining their local checkout, toolchain, and MCP setup. Skip if: You require offline inference, hard filesystem isolation between sessions, or a managed service with no bot host to operate.

## Overview
```text
### Architecture & Core Mechanics
Claude Threads is a self-hosted TypeScript bridge between Slack or Mattermost and the Claude Code CLI. A bot mention starts a real Claude Code session in a working directory on the host. The chat thread is the control surface: it receives responses, tool calls, diffs, task lists, and approval prompts, and sends replies and reactions back into the session. Concurrent threads can have distinct working directories, and sessions resume automatically after a bot restart.

The package exposes `claude-threads`, `claude-threads-mcp`, and `claude-threads-daemon`. Its manifest includes `cross-spawn`, `ws`, `ink`, and `@modelcontextprotocol/sdk`. Each session runs its own MCP server for chat-specific actions, while Claude Code can still use the host’s existing MCP servers and plugins. The result is a chat interface to a working development environment, not a separate coding agent or model runtime.

### Key Capabilities & Differentiators
The bot can connect multiple Slack and Mattermost workspaces concurrently. It works with a Claude subscription or API key; an optional account pool assigns new sessions to the account with the most subscription headroom and cools down rate-limited accounts. Session commands support Git worktree switching and collaborator invitations with `Co-Authored-By:` attribution. Channel-scoped notes, facts distilled at session end, and Claude’s per-repository auto-memory provide continuity beyond a single thread.

Each session exposes nine chat MCP tools. `send_file` validates paths against the working directory; permalink reads and history are scoped to the bot’s channel and public channels. History is capped at 100 messages, and Mattermost-only search returns up to 25 results. Direct messages require thread approval and are capped at three per recipient per session. For Claude tool use, `default` asks the thread, `auto` delegates low-risk approvals to Claude’s classifier, and `bypass` skips prompts.

### Trade-offs & Limitations
The decision turns on where Claude Code needs to run. Claude Code in Slack, Codex in Slack, and Cursor in Slack run sessions in vendor clouds; Claude Threads keeps CLI execution beside your checkout and tools, and adds Mattermost as a chat option. In return, your team owns the bot host, credentials, chat permissions, and connection recovery. Apache-2.0 covers the bot, not the Claude service, and even a self-hosted Mattermost deployment does not make Claude inference offline.

Treat the bot as a remote entry point to a development machine. An empty allowlist lets anyone in the channel start a session, and `bypass` removes tool prompts. Use an explicit allowlist, a least-privilege host account, and `default` approvals for shared deployments. A Git worktree separates branch changes; it is not a filesystem sandbox. Chat MCP guardrails constrain the chat tools, not the permissions of the underlying Claude Code process or other locally configured tools.

### Hardware & Deployment Guide
Run on Bun 1.2.21+ or Node 22+, with the Claude Code CLI and a Claude subscription or API key. Install globally with `bun install -g claude-threads` or `npm install -g claude-threads`, then run `claude-threads` from the project directory to configure the bot and test its chat credentials. Size the host for concurrent CLI sessions and their builds, tests, and worktrees rather than for local model inference; no GPU or VRAM requirement is specified.

The bot retries dropped platform connections with exponential backoff and, by default, resets the retry cycle after a minute if attempts are exhausted. Under systemd or another supervisor, `reconnectPolicy: exit` makes it exit nonzero so the supervisor can restart it. v1.41.1 updated security-sensitive dependencies including Hono and `@hono/node-server`; v1.41.2 consolidated Socket Mode connections for entries on the same Slack app; v1.42.0 fixed event reception after re-enabling a platform in the terminal UI.
```

## Key Capabilities
```text
- Execution: One Claude Code session per chat thread, with per-session working directories and automatic resumption after a bot restart.
- Visibility: Responses, tool calls, diffs, and a persistent task list stream into the originating thread.
- MCP scope: Nine chat tools per session; history is capped at 100 messages, and Mattermost search at 25 results.
- Approvals: Emoji reactions handle tool approvals; direct messages require thread approval and are limited to three per recipient per session.
- Collaboration: Session owners can invite teammates, and Git worktrees separate branch changes from the main checkout.
- Connectivity: Slack and Mattermost can run concurrently; Slack entries configured on one app share a Socket Mode connection as of v1.41.2.
```

## Quick Start / Clone
```bash
# Install (pick one)
bun install -g claude-threads   # with Bun (recommended)
npm install -g claude-threads   # with npm

# Run the setup wizard
cd /your/project
claude-threads
```
