惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
博客园 - Franky
罗磊的独立博客
G
Google Developers Blog
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
Recent Announcements
Recent Announcements
V
V2EX
F
Fortinet All Blogs
阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
U
Unit 42
GbyAI
GbyAI
A
About on SuperTechFans
WordPress大学
WordPress大学
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
Microsoft Azure Blog
Microsoft Azure Blog
Martin Fowler
Martin Fowler
D
DataBreaches.Net
The Cloudflare Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MongoDB | Blog
MongoDB | Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: align claude-cli prompt hooks (#70625) · openclaw/op...
mbelinky · 2026-04-23 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -2,6 +2,14 @@

22
33

Docs: https://docs.openclaw.ai

44
5+

## Unreleased

6+
7+

### Changes

8+
9+

### Fixes

10+
11+

- CLI/Claude: run the same prompt-build hooks and trigger/channel context on `claude-cli` turns as on direct embedded runs, keeping Claude Code sessions aligned with OpenClaw workspace identity, routing, and hook-driven prompt mutations. (#70625) Thanks @mbelinky.

12+
513

## 2026.4.22

614
715

### Changes

Original file line numberDiff line numberDiff line change

@@ -71,6 +71,24 @@ For long-lived gateway hosts, an Anthropic API key is still the most predictable

7171

setup. If you want to reuse an existing Claude login on the same host, use the

7272

Anthropic Claude CLI path in onboarding/configure.

7373
74+

Recommended host setup for Claude CLI reuse:

75+
76+

```bash

77+

# Run on the gateway host

78+

claude auth login

79+

claude auth status --text

80+

openclaw models auth login --provider anthropic --method cli --set-default

81+

```

82+
83+

This is a two-step setup:

84+
85+

1. Log Claude Code itself into Anthropic on the gateway host.

86+

2. Tell OpenClaw to switch Anthropic model selection to the local `claude-cli`

87+

backend and store the matching OpenClaw auth profile.

88+
89+

If `claude` is not on `PATH`, either install Claude Code first or set

90+

`agents.defaults.cliBackends.claude-cli.command` to the real binary path.

91+
7492

Manual token entry (any provider; writes `auth-profiles.json` + updates config):

7593
7694

```bash

Original file line numberDiff line numberDiff line change

@@ -169,6 +169,18 @@ resolver sees the same filtered set that OpenClaw would otherwise advertise in

169169

the prompt. Skill env/API key overrides are still applied by OpenClaw to the

170170

child process environment for the run.

171171
172+

Before OpenClaw can use the bundled `claude-cli` backend, Claude Code itself

173+

must already be logged in on the same host:

174+
175+

```bash

176+

claude auth login

177+

claude auth status --text

178+

openclaw models auth login --provider anthropic --method cli --set-default

179+

```

180+
181+

Use `agents.defaults.cliBackends.claude-cli.command` only when the `claude`

182+

binary is not already on `PATH`.

183+
172184

## Sessions

173185
174186

- If the CLI supports sessions, set `sessionArg` (e.g. `--session-id`) or

Original file line numberDiff line numberDiff line change

@@ -431,6 +431,22 @@ describe("runCliAgent spawn path", () => {

431431

expect(params.senderIsOwner).toBe(false);

432432

});

433433
434+

it("forwards channel context through the compat wrapper", () => {

435+

const params = buildRunClaudeCliAgentParams({

436+

sessionId: "openclaw-session",

437+

sessionFile: "/tmp/session.jsonl",

438+

workspaceDir: "/tmp",

439+

prompt: "hi",

440+

timeoutMs: 1_000,

441+

runId: "run-claude-channel-wrapper",

442+

messageChannel: "telegram",

443+

messageProvider: "acp",

444+

});

445+
446+

expect(params.messageChannel).toBe("telegram");

447+

expect(params.messageProvider).toBe("acp");

448+

});

449+
434450

it("forwards static extra system prompt through the compat wrapper", () => {

435451

const params = buildRunClaudeCliAgentParams({

436452

sessionId: "openclaw-session",

Original file line numberDiff line numberDiff line change

@@ -140,6 +140,7 @@ export function buildRunClaudeCliAgentParams(params: RunClaudeCliAgentParams): R

140140

sessionId: params.sessionId,

141141

sessionKey: params.sessionKey,

142142

agentId: params.agentId,

143+

trigger: params.trigger,

143144

sessionFile: params.sessionFile,

144145

workspaceDir: params.workspaceDir,

145146

config: params.config,

@@ -156,6 +157,8 @@ export function buildRunClaudeCliAgentParams(params: RunClaudeCliAgentParams): R

156157

// Ignore it here so the compatibility wrapper does not accidentally resume

157158

// an incompatible Claude session on the generic runner path.

158159

images: params.images,

160+

messageChannel: params.messageChannel,

161+

messageProvider: params.messageProvider,

159162

senderIsOwner: params.senderIsOwner,

160163

};

161164

}