β Model not found: claude-cli/claude-opus-4-7. Update agents.defaults.model or run /models β
β list. β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ―
Error: Cannot find module '@larksuiteoapi/node-sdk'
#update to claude cli auth
1 messages Β· Page 1 of 1 (latest)
Looks like 2 separate problems.
-
Model not found: claude-cli/claude-opus-4-7
Current docs/source still wire Claude CLI auth aroundclaude-cli/claude-sonnet-4-6, withclaude-cli/claude-opus-4-6as the related CLI Opus path, not...4-7. So this smells like stale or mixed model config after the auth switch. -
Cannot find module '@larksuiteoapi/node-sdk'
That is the Feishu/Lark bundled plugin missing its runtime dependency.openclaw doctor --fixis supposed to repair bundled plugin runtime deps when that channel/plugin is active.
Can you paste these?
openclaw --version
openclaw config get agents.defaults.model
openclaw config get agents.defaults.models
openclaw doctor
If you want a quick likely fix first:
- set your default away from
claude-cli/claude-opus-4-7 - run
openclaw doctor --fix - restart the gateway
Relevant docs:
https://docs.openclaw.ai/gateway/cli-backends
https://docs.openclaw.ai/concepts/models
https://docs.openclaw.ai/gateway/doctor
PS C:\Users\joeal> openclaw --version
OpenClaw 2026.4.21 (f788c88)
PS C:\Users\joeal> openclaw config get agents.defaults.model
π¦ OpenClaw 2026.4.21 (f788c88) β I'll butter your workflow like a lobster roll: messy, delicious, effective.
{
"primary": "openrouter/auto"
}
PS C:\Users\joeal> openclaw config get agents.defaults.models
π¦ OpenClaw 2026.4.21 (f788c88) β Half butler, half debugger, full crustacean.
{
"anthropic/claude-sonnet-4-6": {
"alias": "sonnet"
},
"openrouter/auto": {
"alias": "OpenRouter"
}
}
@craggy shale what do you think?
I think this is two separate issues, and the first one looks like a real 2026.4.21 rough edge, not you doing something wrong.
- Your config is still on
openrouter/auto - Your allowlist has no
claude-cli/* - So the Claude CLI auth flow should be adding/switching that for you, but instead it seems to be tripping over
claude-cli/claude-opus-4-7
My read:
-
Claude CLI auth flow/config mismatch
- likely bug or stale state during the switch
- current clean target is
claude-cli/claude-sonnet-4-6, notclaude-cli/claude-opus-4-7
-
Feishu/Lark plugin dep issue
- unrelated
@larksuiteoapi/node-sdkis missingopenclaw doctor --fixshould repair that
If it were me, Iβd do this order:
openclaw doctor --fix
openclaw models auth login --provider anthropic --method cli --set-default
If that still fails, Iβd force the Claude CLI model in manually:
openclaw config set agents.defaults.models '{"claude-cli/claude-sonnet-4-6":{"alias":"Sonnet"}}' --strict-json --merge
openclaw config set agents.defaults.model.primary "claude-cli/claude-sonnet-4-6"
openclaw gateway restart
If the manual fix works, Iβd call that pretty solid evidence the login path is buggy on this release.
o Model/auth provider
| Anthropic
|
o Anthropic auth method
| Anthropic Claude CLI
|
o Provider notes -----------------------------------------------------------------------+
| |
| Claude CLI auth detected; switched Anthropic model selection to the local Claude CLI |
| backend. |
| Existing Anthropic auth profiles are kept for rollback. |
| |
+----------------------------------------------------------------------------------------+
|
o Model configured --------------------------------+
| |
| Default model set to claude-cli/claude-opus-4-7 |
| |
+---------------------------------------------------+
|
|
o Default model
| anthropic/claude-sonnet-4-6
Error: Cannot find module 'nostr-tools'
Require stack:
- C:\Users\joeal\AppData\Roaming\npm\node_modules\openclaw\dist\extensions\nostr\setup-surface-d0cfZ0y8.js
PS C:\Users\joeal>
That output is pretty telling.
I think there are two real bugs/rough edges here:
-
Bundled plugin runtime deps are missing in this install
- first
@larksuiteoapi/node-sdk - now
nostr-tools - that means it is not just Feishu, the install is missing bundled plugin deps more broadly
- first
-
The Claude CLI auth flow output is inconsistent
- it says
Default model set to claude-cli/claude-opus-4-7 - then immediately shows
Default model anthropic/claude-sonnet-4-6 - that smells buggy
- it says
So I would do this in this order:
openclaw doctor --fix
openclaw models auth login --provider anthropic --method cli --set-default
openclaw models status
Why first doctor --fix?
Because the missing-module errors can break setup/config flows before the Claude CLI switch finishes cleanly.
If the auth flow still lands on claude-cli/claude-opus-4-7, Iβd use the manual workaround for now:
openclaw config set agents.defaults.models '{"claude-cli/claude-sonnet-4-6":{"alias":"Sonnet"}}' --strict-json --merge
openclaw config set agents.defaults.model.primary "claude-cli/claude-sonnet-4-6"
openclaw gateway restart
Honestly, Iβm pretty confident this is not just your config. The repeated missing bundled deps plus that contradictory model output both look like legit bugs. If doctor --fix does not clean it up, this is worth filing: https://github.com/openclaw/openclaw/issues
T OpenClaw doctor
|
o Model auth ----------------------------------------------------+
| |
| - anthropic:claude-cli: expiring (5h) β openclaw configure. |
| |
+-----------------------------------------------------------------+
|
o Claude CLI -------------------------------------------------------------------------------+
| |
| - Binary: ~\AppData\Roaming\npm\claude. |
| - Headless Claude auth: OK (oauth). |
| - OpenClaw auth profile: anthropic:claude-cli (provider claude-cli). |
| - Workspace: ~.openclaw\workspace (writable). |
| - Claude project dir: ~.claude\projects\C--Users-joeal--openclaw-workspace (not created |
| yet; it appears after the first Claude CLI turn in this workspace). |
| |
+--------------------------------------------------------------------------------------------+
|
o Security ---------------------------------+
| |
| - No channel security warnings detected. |
| - Run: openclaw security audit --deep |
| |
+--------------------------------------------+
|
o Skills status ------------+
| |
| Eligible: 7 |
| Missing requirements: 45 |
| Blocked by allowlist: 0 |
| |
+----------------------------+
|
o Plugins ------+
| |
| Loaded: 60 |
| Imported: 60 |
| Disabled: 39 |
| Errors: 0 |
| |
+----------------+
|
o
|
o Gateway --------------+
| |
| Gateway not running. |
| |
+------------------------+
|
o Gateway connection -----------------------------+
| |
| Gateway target: ws://127.0.0.1:18789 |
| Source: local loopback |
| Config: C:\Users\joeal.openclaw\openclaw.json |
| Bind: loopback |
| |
+--------------------------------------------------+
|
o Gateway -----------------------------------------------------------------------------+
| |
| Runtime: stopped (Startup-folder login item installed; no listener detected on port |
| 18789.) |
| Service is loaded but not running (likely exited immediately). |
| File logs: \tmp\openclaw\openclaw-2026-04-23.log |
| Logs: schtasks /Query /TN "OpenClaw Gateway" /V /FO LIST |
| Restart attempts: C:\Users\joeal.openclaw\logs\gateway-restart.log |
| |
+---------------------------------------------------------------------------------------+
Restarted Windows login item: OpenClaw Gateway
|
β Doctor complete.
This is actually good news.
openclaw doctor says the Claude CLI auth is healthy. So I think the real blocker now is the model config step, not auth.
Iβd bypass openclaw configure for now and set the Claude CLI model directly:
openclaw config set agents.defaults.models '{"claude-cli/claude-sonnet-4-6":{"alias":"Sonnet"},"claude-cli/claude-opus-4-6":{"alias":"Opus"}}' --strict-json --merge
openclaw config set agents.defaults.model.primary "claude-cli/claude-sonnet-4-6"
openclaw gateway restart
openclaw models status
Why Iβm leaning this way:
- doctor says Claude CLI binary/auth/profile are all OK
- the weird
claude-opus-4-7output looks like the setup flow choosing the wrong model
- the
nostr-tools/@larksuiteoapi/node-sdkcrashes look like a separate setup-surface/plugin loading bug, since doctor did not flag active bundled plugin deps
So at this point Iβd treat it as:
- auth works
- wizard/setup flow is buggy
- manual model pin is the practical workaround
If that works, Iβd definitely file the bug with that output here: https://github.com/openclaw/openclaw/issues
And if this gets you unstuck, please right-click the solution message β Apps β β Mark Solution so Answer Overflow can index it.
Nice, this moved.
Plugins: Imported 60, Errors: 0 means the earlier missing-module stuff is probably no longer the active problem.
Now the issue is simpler: the gateway is starting, then crashing immediately.
Next step is just the logs. Please paste the output of:
openclaw logs --follow
If it exits too fast, use the file paths doctor gave you:
Get-Content \tmp\openclaw\openclaw-2026-04-23.log -Tail 200
PS C:\Users\joeal> openclaw config set agents.defaults.models '{"claude-cli/claude-sonnet-4-6":{"alias":"Sonnet"},"claude-cli/claude-opus-4-6":{"alias":"Opus"}}' --strict-json --merge
error: unknown option '--merge'
Get-Content C:\Users\joeal\.openclaw\logs\gateway-restart.log -Tail 200
I only need the first real error / stack trace after startup.
So my current read is:
- Claude CLI auth looks okay
- plugin import looks okay now
- gateway process is crashing on boot
- the crash log will tell us the real blocker
Yep, that means --merge is newer than the build youβre on.
Use a full replacement that keeps your existing entries and adds the Claude CLI ones:
openclaw config set agents.defaults.models '{"anthropic/claude-sonnet-4-6":{"alias":"sonnet"},"openrouter/auto":{"alias":"OpenRouter"},"claude-cli/claude-sonnet-4-6":{"alias":"Sonnet"},"claude-cli/claude-opus-4-6":{"alias":"Opus"}}' --strict-json
openclaw config set agents.defaults.model.primary "claude-cli/claude-sonnet-4-6"
openclaw gateway restart
So the change here is just:
- no
--merge - include the existing models in the JSON so you donβt wipe them out
If that command complains too, Iβd switch to editing C:\Users\joeal\.openclaw\openclaw.json directly for this one.
PS C:\Users\joeal> openclaw config set agents.defaults.models '{"anthropic/claude-sonnet-4-6":{"alias":"sonnet"},"openrouter/auto":{"alias":"OpenRouter"},"claude-cli/claude-sonnet-4-6":{"alias":"Sonnet"},"claude-cli/claude-opus-4-6":{"alias":"Opus"}}' --strict-json
π¦ OpenClaw 2026.4.21 (f788c88) β I'll butter your workflow like a lobster roll: messy, delicious, effective.
Error: Failed to parse JSON value: SyntaxError: Expected property name or '}' in JSON at position 1 (line 1 column 2)
PS C:\Users\joeal>
Yep, thatβs PowerShell quote nonsense π
Use a PowerShell variable instead of inline JSON:
$json = @{
"anthropic/claude-sonnet-4-6" = @{ alias = "sonnet" }
"openrouter/auto" = @{ alias = "OpenRouter" }
"claude-cli/claude-sonnet-4-6" = @{ alias = "Sonnet" }
"claude-cli/claude-opus-4-6" = @{ alias = "Opus" }
} | ConvertTo-Json -Compress -Depth 3
openclaw config set agents.defaults.models $json --strict-json
openclaw config set agents.defaults.model.primary "claude-cli/claude-sonnet-4-6"
openclaw gateway restart
That avoids the shell mangling the JSON argument.
If gateway restart complains because it is stopped already, use:
openclaw gateway start
If you want, paste the output of those three commands and Iβll sanity check it.
Error: Failed to parse JSON value: SyntaxError: Expected property name or '}' in JSON at position 1 (line 1 column 2)
Yeah, at this point Iβd stop fighting config set.
It looks like Windows + 2026.4.21 is still mangling the JSON arg, so the fastest path is to edit the config file directly.
Open it:
notepad $HOME\.openclaw\openclaw.json
Then make sure your agents.defaults section ends up like this while keeping any unrelated fields you already have:
{
"agents": {
"defaults": {
"model": {
"primary": "claude-cli/claude-sonnet-4-6"
},
"models": {
"anthropic/claude-sonnet-4-6": { "alias": "sonnet" },
"openrouter/auto": { "alias": "OpenRouter" },
"claude-cli/claude-sonnet-4-6": { "alias": "Sonnet" },
"claude-cli/claude-opus-4-6": { "alias": "Opus" }
}
}
}
}
Then restart the gateway:
openclaw gateway start
If you want, paste your existing agents.defaults block first and Iβll rewrite it exactly so you can paste it in without guessing.
this is my current agents:
"agents": {
"defaults": {
"workspace": "C:\Users\joeal\.openclaw\workspace",
"models": {
"openrouter/auto": {
"alias": "OpenRouter"
},
"claude-cli/claude-sonnet-4-6": {
"alias": "sonnet"
},
"claude-cli/claude-opus-4-7": {},
"claude-cli/claude-opus-4-6": {},
"claude-cli/claude-opus-4-5": {},
"claude-cli/claude-sonnet-4-5": {},
"claude-cli/claude-haiku-4-5": {}
},
"model": {
"primary": "claude-cli/claude-opus-4-7"
}
}
},
Aha, yep, there it is.
The problem is this line:
"primary": "claude-cli/claude-opus-4-7"
Iβd change your block to this, and honestly Iβd trim the model list down to the known-good Claude CLI entries for now:
"agents": {
"defaults": {
"workspace": "C:\\Users\\joeal\\.openclaw\\workspace",
"models": {
"openrouter/auto": {
"alias": "OpenRouter"
},
"claude-cli/claude-sonnet-4-6": {
"alias": "sonnet"
},
"claude-cli/claude-opus-4-6": {
"alias": "Opus"
}
},
"model": {
"primary": "claude-cli/claude-sonnet-4-6"
}
}
}
So I would remove these for now:
claude-cli/claude-opus-4-7claude-cli/claude-opus-4-5claude-cli/claude-sonnet-4-5claude-cli/claude-haiku-4-5
Then run:
openclaw gateway start
openclaw models status
Iβm pretty confident that claude-cli/claude-opus-4-7 is the bad/stale entry causing the whole mess.
PS C:\Users\joeal> openclaw models status
π¦ OpenClaw 2026.4.21 (f788c88) β Hot reload for config, cold sweat for deploys.
Config : ~.openclaw\openclaw.json
Agent dir : ~.openclaw\agents\main\agent
Default : claude-cli/claude-sonnet-4-6
Fallbacks (0) : -
Image model : -
Image fallbacks (0): -
Aliases (3) : OpenRouter -> openrouter/auto, sonnet -> claude-cli/claude-sonnet-4-6, Opus -> claude-cli/claude-opus-4-6
Configured models (3): openrouter/auto, claude-cli/claude-sonnet-4-6, claude-cli/claude-opus-4-6
Auth overview
Auth store : ~.openclaw\agents\main\agent\auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (1): claude-cli (1)
- anthropic effective=profiles:~.openclaw\agents\main\agent\auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | anthropic:default=sk-ant-a...fqgZXgAA
- claude-cli effective=profiles:~.openclaw\agents\main\agent\auth-profiles.json | profiles=1 (oauth=1, token=0, api_key=0) | anthropic:claude-cli=OAuth
- openrouter effective=profiles:~.openclaw\agents\main\agent\auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | openrouter:default=sk-or-v1...fcb0e130
OAuth/token status
- claude-cli
- anthropic:claude-cli expiring expires in 4h
Nice, this looks correct now π
The important bits are all sane:
- Default:
claude-cli/claude-sonnet-4-6 - Configured models: only the 3 expected ones
- Alias:
Opus -> claude-cli/claude-opus-4-6 - Auth:
claude-cliOAuth is present
So I think the bad claude-cli/claude-opus-4-7 config was the root problem.
At this point Iβd do one real test:
openclaw gateway start
Then either:
- send a normal test message to your assistant, or
- run a quick direct model test if you want to stay in terminal
If the gateway still dies, weβre back to log-tail mode. But config/auth-wise, this now looks healthy.
If it works, please right-click the solution message β Apps β β Mark Solution so Answer Overflow can index it.
havent managed to get it to respond
No worries, weβre close.
Letβs split model from gateway cleanly.
Run these:
openclaw gateway status
openclaw infer model run --model claude-cli/claude-sonnet-4-6 --prompt "Reply with exactly OK" --json
Then, if the gateway is running but chat still doesnβt answer:
openclaw logs --follow
Keep that open, send your assistant one test message, then paste the first error that shows up.
What Iβm trying to learn:
- if
infer model runworks, Claude CLI + auth are fine - if chat still doesnβt answer, the problem is gateway/runtime routing
- if
infer model runfails too, then the issue is still model/backend side
Paste those outputs and Iβll narrow it down fast.
PS C:\Users\joeal> openclaw infer model run --model claude-cli/claude-sonnet-4-6 --prompt "Reply with exactly OK" --json
16:48:49 [agent/cli-backend] claude skill plugin skipped missing skill file: C:\Users\joeal\AppData\Roaming\npm\node_modules\openclaw\skills\clawflow\SKILL.md
16:48:49 [agent/cli-backend] claude skill plugin skipped missing skill file: C:\Users\joeal\AppData\Roaming\npm\node_modules\openclaw\skills\clawflow-inbox-triage\SKILL.md
16:48:49 [agent/cli-backend] cli exec: provider=claude-cli model=sonnet promptChars=21
16:48:49 [process/supervisor] spawn failed: runId=8419a82e-205b-473d-b253-907d7dee2c7f reason=Error: spawn claude ENOENT
Error: spawn claude ENOENT
?
Found it.
Error: spawn claude ENOENT means OpenClaw is configured to use Claude CLI, but Windows cannot actually launch the claude executable.
So auth is fine, model config is fine, but the CLI command path is wrong / missing.
Check what Windows sees
where.exe claude
claude --version
If where.exe shows something like this
C:\Users\joeal\AppData\Roaming\npm\claude.cmd
then add this to your agents.defaults config:
"cliBackends": {
"claude-cli": {
"command": "C:\\Users\\joeal\\AppData\\Roaming\\npm\\claude.cmd"
}
}
So your agents.defaults will have:
model.primary = claude-cli/claude-sonnet-4-6
models = ...cliBackends.claude-cli.command = C:\\Users\\joeal\\AppData\\Roaming\\npm\\claude.cmd
Then restart and test again:
openclaw gateway restart
openclaw infer model run --model claude-cli/claude-sonnet-4-6 --prompt "Reply with exactly OK" --json
The missing skill file lines are annoying, but not the blocker. spawn claude ENOENT is the blocker.
how do i oen that json
In PowerShell:
notepad $HOME\.openclaw\openclaw.json
If you use VS Code instead:
code $HOME\.openclaw\openclaw.json
Full path is:
C:\Users\joeal\.openclaw\openclaw.json
If you want, paste your current agents.defaults block after opening it and Iβll give you the exact edit.
?
Paste this into your agents.defaults block, alongside the model stuff you already fixed:
"cliBackends": {
"claude-cli": {
"command": "C:\\Users\\joeal\\AppData\\Roaming\\npm\\claude.cmd"
}
}
So your full agents.defaults should look roughly like:
"agents": {
"defaults": {
"workspace": "C:\\Users\\joeal\\.openclaw\\workspace",
"models": {
"openrouter/auto": {
"alias": "OpenRouter"
},
"claude-cli/claude-sonnet-4-6": {
"alias": "sonnet"
},
"claude-cli/claude-opus-4-6": {
"alias": "Opus"
}
},
"model": {
"primary": "claude-cli/claude-sonnet-4-6"
},
"cliBackends": {
"claude-cli": {
"command": "C:\\Users\\joeal\\AppData\\Roaming\\npm\\claude.cmd"
}
}
}
}
Then save the file and run:
openclaw gateway restart
openclaw infer model run --model claude-cli/claude-sonnet-4-6 --prompt "Reply with exactly OK" --json
PS C:\Users\joeal> openclaw gateway restart
π¦ OpenClaw 2026.4.21 (f788c88) β Runs on a Raspberry Pi. Dreams of a rack in Iceland.
Restarted Windows login item: OpenClaw Gateway
PS C:\Users\joeal> openclaw infer model run --model claude-cli/claude-sonnet-4-6 --prompt "Reply with exactly OK" --json
17:17:55 [agent/cli-backend] claude skill plugin skipped missing skill file: C:\Users\joeal\AppData\Roaming\npm\node_modules\openclaw\skills\clawflow\SKILL.md
17:17:55 [agent/cli-backend] claude skill plugin skipped missing skill file: C:\Users\joeal\AppData\Roaming\npm\node_modules\openclaw\skills\clawflow-inbox-triage\SKILL.md
17:17:55 [agent/cli-backend] cli exec: provider=claude-cli model=sonnet promptChars=21
17:17:55 [process/supervisor] spawn failed: runId=c593eceb-0c1c-4474-b233-89e00e19408e reason=Error: spawn EINVAL
Error: spawn EINVAL
Okay, this is the smoking gun.
spawn claude ENOENT= OpenClaw could not resolveclaudespawn EINVALafter pointing atclaude.cmd= Windows/Node is rejecting the.cmdshim directly
So this is now a Windows .cmd spawn issue, not an auth issue.
Try changing your cliBackends.claude-cli block to this:
"cliBackends": {
"claude-cli": {
"command": "cmd.exe",
"args": [
"/d",
"/s",
"/c",
"C:\\Users\\joeal\\AppData\\Roaming\\npm\\claude.cmd",
"-p",
"--output-format",
"stream-json",
"--include-partial-messages",
"--verbose",
"--setting-sources",
"user",
"--permission-mode",
"bypassPermissions"
],
"resumeArgs": [
"/d",
"/s",
"/c",
"C:\\Users\\joeal\\AppData\\Roaming\\npm\\claude.cmd",
"-p",
"--output-format",
"stream-json",
"--include-partial-messages",
"--verbose",
"--setting-sources",
"user",
"--permission-mode",
"bypassPermissions",
"--resume",
"{sessionId}"
]
}
}
Then:
openclaw gateway restart
openclaw infer model run --model claude-cli/claude-sonnet-4-6 --prompt "Reply with exactly OK" --json
So the idea is: do not spawn claude.cmd directly, spawn cmd.exe, and let cmd.exe run the Claude shim.
If you want, paste your full current agents.defaults block again and Iβll rewrite the exact final JSON for you.
"agents": {
"defaults": {
"workspace": "C:\Users\joeal\.openclaw\workspace",
"models": {
"openrouter/auto": {
"alias": "OpenRouter"
},
"claude-cli/claude-sonnet-4-6": {
"alias": "sonnet"
},
"claude-cli/claude-opus-4-6": {
"alias": "Opus"
}
},
"model": {
"primary": "claude-cli/claude-sonnet-4-6"
},
"cliBackends": {
"claude-cli": {
"command": "C:\Users\joeal\AppData\Roaming\npm\claude.cmd"
}
}
}
},
Yep, Iβd change it to this exact block.
Two important fixes:
- use
cmd.exewrapper, notclaude.cmddirectly - JSON paths on Windows need escaped backslashes (
\\), not single\
"agents": {
"defaults": {
"workspace": "C:\\Users\\joeal\\.openclaw\\workspace",
"models": {
"openrouter/auto": {
"alias": "OpenRouter"
},
"claude-cli/claude-sonnet-4-6": {
"alias": "sonnet"
},
"claude-cli/claude-opus-4-6": {
"alias": "Opus"
}
},
"model": {
"primary": "claude-cli/claude-sonnet-4-6"
},
"cliBackends": {
"claude-cli": {
"command": "cmd.exe",
"args": [
"/d",
"/s",
"/c",
"C:\\Users\\joeal\\AppData\\Roaming\\npm\\claude.cmd",
"-p",
"--output-format",
"stream-json",
"--include-partial-messages",
"--verbose",
"--setting-sources",
"user",
"--permission-mode",
"bypassPermissions"
],
"resumeArgs": [
"/d",
"/s",
"/c",
"C:\\Users\\joeal\\AppData\\Roaming\\npm\\claude.cmd",
"-p",
"--output-format",
"stream-json",
"--include-partial-messages",
"--verbose",
"--setting-sources",
"user",
"--permission-mode",
"bypassPermissions",
"--resume",
"{sessionId}"
]
}