Skip to main content

typemux-cc

Python type-checker LSP multiplexer for Claude Code — auto-detects .venv changes and routes to pyright, ty, or pyrefly without restarts

Problems Solved

Claude Code’s official pyright plugin spawns a single LSP backend at startup and holds onto it. If .venv doesn’t exist yet — or you create a new one later — it never picks it up. You have to restart Claude Code. This is especially painful with git worktrees, now common in AI-assisted development: you spin up a fresh worktree, create .venv, and then must restart Claude Code just to get type-checking. typemux-cc fixes this.venv changes are reflected within your running session, no restarts required.

Late .venv Creation

Spin up a git worktree, create .venv later, and typemux-cc picks it up on the next file open. No Claude Code restart needed.

Multi-Project Switching

Keeps a per-.venv backend pool and routes requests to the correct one. Switching between projects in monorepos is instant.

Multi-Backend Support

Not locked into pyright. Choose between pyright, ty, or pyrefly — switch via a single env var.

Supported Backends

BackendCommandStatus
pyrightpyright-langserver --stdio✅ Stable (default)
tyty server🧪 Experimental (verified)
pyreflypyrefly lsp🧪 Experimental (verified)

Quick Start

1

Install a backend

Install your preferred LSP backend (pyright recommended):
npm install -g pyright
2

Disable official pyright plugin

You must disable the official pyright plugin to avoid conflicts:
/plugin disable pyright-lsp@claude-plugins-official
3

Install typemux-cc

Add the marketplace and install the plugin:
/plugin marketplace add K-dash/typemux-cc
/plugin install typemux-cc@typemux-cc-marketplace
4

Restart Claude Code

Restart Claude Code to activate the plugin. This is only required for initial installation — after this, .venv creation and switching no longer require restarts.

Key Features

Auto-detect .venv changes

No Claude Code restart needed when creating or switching virtual environments

Multi-backend support

Choose between pyright, ty, or pyrefly with a single environment variable

Git worktree support

Create .venv after opening a worktree — typemux-cc picks it up automatically

Monorepo switching

Instant switching between projects with different .venv paths

LRU backend pool

Maintains multiple backend processes with automatic eviction when idle

Warmup readiness

Queues index-dependent requests until backend finishes building its index
In monorepos, grep returns false positives from same-named types across projects. LSP resolves references at the type-system level, providing accurate cross-file navigation and refactoring.
See the architecture documentation for detailed design philosophy and implementation details.

Next Steps