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

推荐订阅源

爱范儿
爱范儿
博客园_首页
U
Unit 42
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
MongoDB | Blog
MongoDB | Blog
美团技术团队
H
Help Net Security
G
Google Developers Blog
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
aimingoo的专栏
aimingoo的专栏
Google DeepMind News
Google DeepMind News
J
Java Code Geeks
M
MIT News - Artificial intelligence
腾讯CDC
IT之家
IT之家
Vercel News
Vercel News
C
Check Point Blog
博客园 - 三生石上(FineUI控件)
Last Week in AI
Last Week in AI
I
InfoQ
博客园 - 司徒正美
A
About on SuperTechFans

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(acp): keep bridge sessions out of stale ACP classific...
eldar702 · 2026-06-16 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -63,7 +63,7 @@ Quick rule:

6363

fallback and do not reconstruct historic tool calls or system notices.

6464

- If multiple ACP clients share the same Gateway session key, event and cancel

6565

routing are best-effort rather than strictly isolated per client. Prefer the

66-

default isolated `acp:<uuid>` sessions when you need clean editor-local

66+

default isolated `acp-bridge:<uuid>` sessions when you need clean editor-local

6767

turns.

6868

- Gateway stop states are translated into ACP stop reasons, but that mapping is

6969

less expressive than a fully ACP-native runtime.

@@ -206,7 +206,7 @@ openclaw acp --session agent:qa:bug-123

206206

```

207207
208208

Each ACP session maps to a single Gateway session key. One agent can have many

209-

sessions; ACP defaults to an isolated `acp:<uuid>` session unless you override

209+

sessions; ACP defaults to an isolated `acp-bridge:<uuid>` session unless you override

210210

the key or label.

211211
212212

Per-session `mcpServers` are not supported in bridge mode. If an ACP client

@@ -309,8 +309,10 @@ In Zed, open the Agent panel and select "OpenClaw ACP" to start a thread.

309309
310310

## Session mapping

311311
312-

By default, ACP sessions get an isolated Gateway session key with an `acp:` prefix.

313-

To reuse a known session, pass a session key or label:

312+

By default, ACP bridge sessions get an isolated Gateway session key with an

313+

`acp-bridge:` prefix. These normal-model bridge sessions are synthetic and

314+

subject to stale-entry pruning and entry-count caps. To reuse a known session,

315+

pass a session key or label:

314316
315317

- `--session <key>`: use a specific Gateway session key.

316318

- `--session-label <label>`: resolve an existing session by label.

Original file line numberDiff line numberDiff line change

@@ -2,6 +2,7 @@

22

import { createInMemorySessionStore } from "@openclaw/acp-core/session";

33

import { describe, expect, it, vi } from "vitest";

44

import type { GatewayClient } from "../gateway/client.js";

5+

import { isAcpSessionKey } from "../sessions/session-key-utils.js";

56

import {

67

createNewSessionRequest,

78

createLoadSessionRequest,

@@ -59,6 +60,21 @@ describe("acp unsupported bridge session setup", () => {

5960

});

6061
6162

describe("acp session UX bridge behavior", () => {

63+

it("uses a non-runtime namespace for generated bridge sessions", async () => {

64+

const sessionStore = createInMemorySessionStore();

65+

const agent = new AcpGatewayAgent(createAcpConnection(), createAcpGateway(), {

66+

sessionStore,

67+

});

68+
69+

const result = await agent.newSession(createNewSessionRequest());

70+

const sessionKey = sessionStore.getSession(result.sessionId)?.sessionKey;

71+
72+

expect(sessionKey).toMatch(/^acp-bridge:/);

73+

expect(isAcpSessionKey(sessionKey)).toBe(false);

74+
75+

sessionStore.clearAllSessionsForTest();

76+

});

77+
6278

it("returns initial modes and thought-level config options for new sessions", async () => {

6379

const sessionStore = createInMemorySessionStore();

6480

const agent = new AcpGatewayAgent(createAcpConnection(), createAcpGateway(), {

Original file line numberDiff line numberDiff line change

@@ -374,7 +374,7 @@ export class AcpGatewayAgent implements Agent {

374374

const meta = parseSessionMeta(params["_meta"]);

375375

const sessionKey = await this.resolveSessionKeyFromMeta({

376376

meta,

377-

fallbackKey: `acp:${sessionId}`,

377+

fallbackKey: `acp-bridge:${sessionId}`,

378378

});

379379
380380

const session = this.sessionStore.createSession({

Original file line numberDiff line numberDiff line change

@@ -308,10 +308,12 @@ function getEntryUpdatedAt(entry?: SessionEntry): number {

308308

function isSyntheticSessionMaintenanceKey(sessionKey: string): boolean {

309309

const parsed = parseAgentSessionKey(sessionKey);

310310

const rest = normalizeLowercaseStringOrEmpty(parsed?.rest ?? sessionKey);

311+

// ACP bridge sessions use normal model dispatch, but remain synthetic and disposable.

311312

return (

312313

isSubagentSessionKey(sessionKey) ||

313314

isAcpSessionKey(sessionKey) ||

314315

isCronSessionKey(sessionKey) ||

316+

rest.startsWith("acp-bridge:") ||

315317

rest.startsWith("hook:") ||

316318

rest.startsWith("node:") ||

317319

rest === "heartbeat" ||

Original file line numberDiff line numberDiff line change

@@ -266,6 +266,15 @@ describe("capEntryCount", () => {

266266

});

267267
268268

describe("isProtectedSessionMaintenanceEntry", () => {

269+

it("treats generated ACP bridge sessions as disposable", () => {

270+

expect(

271+

isProtectedSessionMaintenanceEntry("agent:main:acp-bridge:session-1", {

272+

...makeEntry(Date.now()),

273+

chatType: "group",

274+

}),

275+

).toBe(false);

276+

});

277+
269278

it("does not protect synthetic sessions just because they carry group metadata", () => {

270279

expect(

271280

isProtectedSessionMaintenanceEntry("agent:main:subagent:worker", {