patchcord 0.6.31 → 0.6.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -116,14 +116,18 @@ export function detectClaudeLocalMcpOverride({
|
|
|
116
116
|
claude_config: claudeConfig,
|
|
117
117
|
local_bearer_fp: localFp,
|
|
118
118
|
disk_bearer_fp: diskFp,
|
|
119
|
+
// Kept SHORT and ending on the action that actually heals it. The old
|
|
120
|
+
// copy ran seven clauses and finished with "restart Claude Code", which
|
|
121
|
+
// is both heavier than needed and incomplete: clearing the entry does
|
|
122
|
+
// nothing until the MCP client reloads, and `/mcp` -> reconnect does that
|
|
123
|
+
// in place. A human who follows the old text to the letter clears the
|
|
124
|
+
// file, sees the tools still 401, and concludes the diagnosis was wrong.
|
|
119
125
|
tell_human:
|
|
120
|
-
|
|
121
|
-
+ "
|
|
122
|
-
+
|
|
123
|
-
+ "
|
|
124
|
-
+ "
|
|
125
|
-
+ "using the stale copy, which is why the CLI works while the MCP tools 401. "
|
|
126
|
-
+ "Patchcord will not edit ~/.claude.json for you.",
|
|
126
|
+
`Claude Code cached an old MCP token in ~/.claude.json that overrides this project's .mcp.json. ${detail} `
|
|
127
|
+
+ `Remove projects["${projectDir}"].mcpServers["${serverKey}"], then run /mcp and reconnect patchcord — `
|
|
128
|
+
+ "clearing it alone will not fix it, the MCP client has to reload. "
|
|
129
|
+
+ "Your token is fine; only Claude's MCP client holds the stale copy, "
|
|
130
|
+
+ "which is why the CLI works while the MCP tools 401.",
|
|
127
131
|
};
|
|
128
132
|
} catch {
|
|
129
133
|
return null;
|
|
@@ -69,7 +69,19 @@ patchcord whoami --json
|
|
|
69
69
|
|
|
70
70
|
If `warnings` contains `claude_local_mcp_cache_override`, **relay its `tell_human` text to the user verbatim.** They have no reason to know this command exists — all they saw was a tool failing.
|
|
71
71
|
|
|
72
|
-
**
|
|
72
|
+
Then **offer to clear it**: *"Want me to remove the stale entry?"* Ask first — `~/.claude.json` is the user's global editor config, holds far more than MCP servers, and writing it races the running Claude Code process. But do not stop at diagnosing. Most users do not want to hand-edit JSON, and an accurate report they cannot act on leaves them exactly as stuck as no report.
|
|
73
|
+
|
|
74
|
+
If they say yes:
|
|
75
|
+
|
|
76
|
+
1. **Back it up first** — `cp ~/.claude.json ~/.claude.json.bak.$(date +%s)`.
|
|
77
|
+
2. **Remove only** `projects["<dir>"].mcpServers["patchcord"]`. Not the whole `mcpServers` object, not the project entry, not the file. Parse, delete the one key, write atomically.
|
|
78
|
+
3. **Then tell them to run `/mcp` and reconnect patchcord.**
|
|
79
|
+
|
|
80
|
+
**Step 3 is the one that actually heals it, and it is the one that gets forgotten.** Clearing the entry changes a file the running MCP client already read; until it reloads, the tools keep 401-ing with the stale token and it looks like the fix failed. `/mcp` → reconnect reloads in place. Never tell them to restart Claude Code — if they are talking to you, they have already restarted, and it would not have helped anyway.
|
|
81
|
+
|
|
82
|
+
You cannot run `/mcp` yourself; it is an interactive command in the user's client. Say the words and let them press it.
|
|
83
|
+
|
|
84
|
+
Do not ask another agent to edit the file for you.
|
|
73
85
|
|
|
74
86
|
## If `whoami` is clean and the MCP tools STILL 401
|
|
75
87
|
|