mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 15:40:44 +00:00
fix: align claude-cli prompt hooks (#70625)
Merged via squash.
Prepared head SHA: 3de89da38f
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
This commit is contained in:
@@ -71,6 +71,24 @@ For long-lived gateway hosts, an Anthropic API key is still the most predictable
|
||||
setup. If you want to reuse an existing Claude login on the same host, use the
|
||||
Anthropic Claude CLI path in onboarding/configure.
|
||||
|
||||
Recommended host setup for Claude CLI reuse:
|
||||
|
||||
```bash
|
||||
# Run on the gateway host
|
||||
claude auth login
|
||||
claude auth status --text
|
||||
openclaw models auth login --provider anthropic --method cli --set-default
|
||||
```
|
||||
|
||||
This is a two-step setup:
|
||||
|
||||
1. Log Claude Code itself into Anthropic on the gateway host.
|
||||
2. Tell OpenClaw to switch Anthropic model selection to the local `claude-cli`
|
||||
backend and store the matching OpenClaw auth profile.
|
||||
|
||||
If `claude` is not on `PATH`, either install Claude Code first or set
|
||||
`agents.defaults.cliBackends.claude-cli.command` to the real binary path.
|
||||
|
||||
Manual token entry (any provider; writes `auth-profiles.json` + updates config):
|
||||
|
||||
```bash
|
||||
|
||||
@@ -169,6 +169,18 @@ resolver sees the same filtered set that OpenClaw would otherwise advertise in
|
||||
the prompt. Skill env/API key overrides are still applied by OpenClaw to the
|
||||
child process environment for the run.
|
||||
|
||||
Before OpenClaw can use the bundled `claude-cli` backend, Claude Code itself
|
||||
must already be logged in on the same host:
|
||||
|
||||
```bash
|
||||
claude auth login
|
||||
claude auth status --text
|
||||
openclaw models auth login --provider anthropic --method cli --set-default
|
||||
```
|
||||
|
||||
Use `agents.defaults.cliBackends.claude-cli.command` only when the `claude`
|
||||
binary is not already on `PATH`.
|
||||
|
||||
## Sessions
|
||||
|
||||
- If the CLI supports sessions, set `sessionArg` (e.g. `--session-id`) or
|
||||
|
||||
Reference in New Issue
Block a user