#update to claude cli auth

1 messages Β· Page 1 of 1 (latest)

sharp steeple
#

β”‚ Model not found: claude-cli/claude-opus-4-7. Update agents.defaults.model or run /models β”‚
β”‚ list. β”‚
β”‚ β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•―
Error: Cannot find module '@larksuiteoapi/node-sdk'

knotty lightBOT
livid isleBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> βœ… Mark Solution

knotty lightBOT
craggy shaleBOT
#

Looks like 2 separate problems.

  1. Model not found: claude-cli/claude-opus-4-7
    Current docs/source still wire Claude CLI auth around claude-cli/claude-sonnet-4-6, with claude-cli/claude-opus-4-6 as the related CLI Opus path, not ...4-7. So this smells like stale or mixed model config after the auth switch.

  2. Cannot find module '@larksuiteoapi/node-sdk'
    That is the Feishu/Lark bundled plugin missing its runtime dependency. openclaw doctor --fix is 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
sharp steeple
#

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?

craggy shaleBOT
#

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:

  1. Claude CLI auth flow/config mismatch

    • likely bug or stale state during the switch
    • current clean target is claude-cli/claude-sonnet-4-6, not claude-cli/claude-opus-4-7
  2. Feishu/Lark plugin dep issue

    • unrelated
    • @larksuiteoapi/node-sdk is missing
    • openclaw doctor --fix should 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.

sharp steeple
#

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>
craggy shaleBOT
#

That output is pretty telling.

I think there are two real bugs/rough edges here:

  1. 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
  2. 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

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

sharp steeple
#

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.

craggy shaleBOT
#

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-7 output looks like the setup flow choosing the wrong model
#
  • the nostr-tools / @larksuiteoapi/node-sdk crashes 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:

  1. auth works
  2. wizard/setup flow is buggy
  3. 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
sharp steeple
#

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'

craggy shaleBOT
#
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:

  1. Claude CLI auth looks okay
  2. plugin import looks okay now
  3. gateway process is crashing on boot
  4. the crash log will tell us the real blocker

Docs: https://docs.openclaw.ai/help/troubleshooting

#

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.

sharp steeple
#

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>

craggy shaleBOT
#

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.

sharp steeple
#

Error: Failed to parse JSON value: SyntaxError: Expected property name or '}' in JSON at position 1 (line 1 column 2)

craggy shaleBOT
#

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.

sharp steeple
#

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"
}
}
},

craggy shaleBOT
#

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-7
  • claude-cli/claude-opus-4-5
  • claude-cli/claude-sonnet-4-5
  • claude-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.

sharp steeple
#

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
craggy shaleBOT
#

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-cli OAuth 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.

sharp steeple
#

havent managed to get it to respond

craggy shaleBOT
#

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 run works, Claude CLI + auth are fine
  • if chat still doesn’t answer, the problem is gateway/runtime routing
  • if infer model run fails too, then the issue is still model/backend side

Paste those outputs and I’ll narrow it down fast.

sharp steeple
#

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

sharp steeple
#

?

craggy shaleBOT
#

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.

sharp steeple
#

how do i oen that json

craggy shaleBOT
#

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.

sharp steeple
#

?

craggy shaleBOT
#

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
sharp steeple
#

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

craggy shaleBOT
#

Okay, this is the smoking gun.

  • spawn claude ENOENT = OpenClaw could not resolve claude
  • spawn EINVAL after pointing at claude.cmd = Windows/Node is rejecting the .cmd shim 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.

sharp steeple
#

"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"
}
}
}
},

craggy shaleBOT
#

Yep, I’d change it to this exact block.

Two important fixes:

  1. use cmd.exe wrapper, not claude.cmd directly
  2. 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}"
        ]
      }