Agent chat: select a compatible Node for discovered adapters (#2207) (#11255)

* claim: #2207

* fix(agent chat): recover adapters launched with an old Node
This commit is contained in:
Colin Faulkingham
2026-11-02 19:40:29 +00:00
committed by GitHub
parent 59ffd38019
commit 28b7ae007d
3 changed files with 204 additions and 7 deletions
+7
View File
@@ -195,6 +195,13 @@ shows its **version** (from `--version`, given three seconds) and whether a **lo
Version checks and agent sessions also use those folders on their `PATH`, so adapters can find
runtimes such as Node when SolidCraft is opened from Finder or the Dock. Existing absolute
`PATH` entries keep their order; no shell startup files are run.
If a detected Node adapter fails with `SyntaxError: Unexpected token 'with'` on an older Node,
SolidCraft checks these folders for a Node version that supports import attributes. For an
adapter with an `env node` shebang, it retries with that Node and keeps the same interpreter
for the chat session, including programs the adapter starts. These extra checks run in the
background with a shared three-second limit for finding Node. Working adapters keep their
original launch command. If no suitable Node is found, the agent's error names the old version
and asks you to update Node and press **Refresh**.
SolidCraft only checks whether the agent's own login file (`~/.claude/.credentials.json`,
`~/.codex/auth.json`, `~/.gemini/oauth_creds.json`, …) or one of its key variables exists. It never
reads the file and never starts the agent to find out. On macOS Claude Code keeps its login in