/cowork-session-fixer:fix-stuck-sessionfrom cowork-session-fixer
Resolves the 'RPC error: process with name already running' bug in Claude Cowork by identifying orphaned sessions and archiving state files or killing stale processes.
Ships in cowork-session-fixer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Resolve the common "RPC error: process with name already running" bug that blocks Cowork sessions. Uses a tiered approach — trying the most elegant fix first, then escalating only if needed.
CRITICAL: Before ANY fix action (archiving, killing processes, clearing cache), present findings to the user and ask for explicit confirmation. Example:
| Session Name | Title | Status | Error | Proposed Action |
|-------------|-------|--------|-------|-----------------|
| busy-wizardly-mccarthy | WhatsApp reminder | idle | RPC error: already running | Archive |
"I found [N] stuck session(s). Should I proceed with the fix?"
Do NOT proceed without explicit user confirmation. This applies to ALL tiers below.
Two root causes produce this error:
~/Library/Application Support/Claude/ local-agent-mode-sessions/<org-id>/<user-id>/local_<uuid>.json retains
isArchived: false and holds a vmProcessName, blocking new sessions.Both manifest as the same blocking error that prevents follow-up messages or session resumption.
Work through these tiers in order. Stop as soon as the issue is resolved.
Parse the error message to extract the session name and process ID if present.
Use mcp__session_info__list_sessions to cross-reference which sessions are idle but holding
a process name. Report findings to the user in a table (see Supervised Gate above).
macOS — Find and archive the stuck session JSON:
mdfind -onlyin ~/Library/Application\ Support/Claude "RPC error"
Then set isArchived: true:
python3 -c "
import json
path = '<session-file-path>'
with open(path) as f:
data = json.load(f)
data['isArchived'] = True
with open(path, 'w') as f:
json.dump(data, f, indent=2)
print('Archived: ' + data.get('processName', 'unknown'))
"
This usually works immediately without restarting Claude Desktop.
If Tier 2 doesn't resolve it, try killing the orphaned process:
list_sessionsforce_terminate or kill_process to end itmacOS/Linux:
ps aux | grep -i "claude\|cowork" | grep -v grep
kill -9 <PID>
Windows:
Get-Process | Where-Object { $_.ProcessName -like "*claude*" }
Stop-Process -Name "claude*" -Force
WARNING: Ask user confirmation — this clears ALL active Cowork sessions.
macOS: rm -rf ~/Library/Application\ Support/Claude/cowork/
Windows: Remove-Item -Recurse -Force "$env:APPDATA\Claude\cowork\"
~/Library/Application Support/Claude/vm_bundles/)After any fix:
mcp__session_info__list_sessions to confirm the session is cleared## Session Fix Report
- Sessions scanned: [N]
- Stuck sessions found: [N]
- Sessions fixed: [N]
- Fix tier used: [1-6]
- Status: [SUCCESS / PARTIAL / NEEDS_RESTART]
RPC error: process with name "X" already running (id: Y)RPC error -1: process with name "X" already runningRPC error: ensure user: user X should already exist but does notfailed to write stdin: Error: failed to write data: An established connection was abortedkill failed with error: Error: sdk-daemon not connectedThis task didn't load properlyFailed to run onQuitCleanup(cowork-vm-shutdown): Error: Request timed outThis skill ONLY handles session diagnostics and recovery. It does NOT:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub msapps-mobile/claude-plugins --plugin cowork-session-fixerOther plugins' skills for the same job