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

推荐订阅源

N
Netflix TechBlog - Medium
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
爱范儿
爱范儿
博客园_首页
雷峰网
雷峰网
Hugging Face - Blog
Hugging Face - Blog
V
Visual Studio Blog
The Cloudflare Blog
罗磊的独立博客
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
大猫的无限游戏
大猫的无限游戏
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
博客园 - 叶小钗
The GitHub Blog
The GitHub Blog
Last Week in AI
Last Week in AI
J
Java Code Geeks
MyScale Blog
MyScale Blog
G
Google Developers Blog
U
Unit 42
Y
Y Combinator Blog
P
Proofpoint News Feed
Vercel News
Vercel News

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(sessions_spawn): tolerate ACP-only fields for subagen...
vincentkoc · 2026-04-28 · via Recent Commits to openclaw:main

@@ -3,6 +3,7 @@ import os from "node:os";

33

import path from "node:path";

44

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

55

import type { AcpInitializeSessionInput } from "../acp/control-plane/manager.types.js";

6+

import type { SessionEntry } from "../config/sessions/types.js";

67

import type { OpenClawConfig } from "../config/types.openclaw.js";

78

import {

89

__testing as sessionBindingServiceTesting,

@@ -726,6 +727,93 @@ describe("spawnAcpDirect", () => {

726727

expect(transcriptCalls[1]?.threadId).toBe("child-thread");

727728

});

728729730+

it("allows ACP resume IDs recorded for the requester session", async () => {

731+

const resumeSessionId = "codex-inner-resume";

732+

hoisted.loadSessionStoreMock.mockReturnValue({

733+

"agent:codex:acp:owned": {

734+

sessionId: "sess-owned",

735+

updatedAt: Date.now(),

736+

spawnedBy: "agent:main:main",

737+

acp: {

738+

backend: "acpx",

739+

agent: "codex",

740+

runtimeSessionName: "codex",

741+

identity: {

742+

state: "resolved",

743+

source: "ensure",

744+

agentSessionId: resumeSessionId,

745+

acpxSessionId: "acpx-owned",

746+

lastUpdatedAt: Date.now(),

747+

},

748+

mode: "oneshot",

749+

state: "idle",

750+

lastActivityAt: Date.now(),

751+

},

752+

} satisfies SessionEntry,

753+

});

754+755+

const result = await spawnAcpDirect(

756+

{

757+

task: "Resume owned ACP session",

758+

agentId: "codex",

759+

resumeSessionId,

760+

},

761+

{

762+

agentSessionKey: "agent:main:main",

763+

},

764+

);

765+766+

expectAcceptedSpawn(result);

767+

expect(hoisted.initializeSessionMock).toHaveBeenCalledWith(

768+

expect.objectContaining({

769+

resumeSessionId,

770+

}),

771+

);

772+

});

773+774+

it("rejects ACP resume IDs not recorded for the requester session", async () => {

775+

hoisted.loadSessionStoreMock.mockReturnValue({

776+

"agent:codex:acp:other": {

777+

sessionId: "sess-other",

778+

updatedAt: Date.now(),

779+

spawnedBy: "agent:other:main",

780+

acp: {

781+

backend: "acpx",

782+

agent: "codex",

783+

runtimeSessionName: "codex",

784+

identity: {

785+

state: "resolved",

786+

source: "ensure",

787+

agentSessionId: "codex-inner-other",

788+

acpxSessionId: "acpx-other",

789+

lastUpdatedAt: Date.now(),

790+

},

791+

mode: "oneshot",

792+

state: "idle",

793+

lastActivityAt: Date.now(),

794+

},

795+

} satisfies SessionEntry,

796+

});

797+798+

const result = await spawnAcpDirect(

799+

{

800+

task: "Resume other ACP session",

801+

agentId: "codex",

802+

resumeSessionId: "codex-inner-other",

803+

},

804+

{

805+

agentSessionKey: "agent:main:main",

806+

},

807+

);

808+809+

expect(result).toMatchObject({

810+

status: "forbidden",

811+

errorCode: "resume_forbidden",

812+

});

813+

expect(hoisted.initializeSessionMock).not.toHaveBeenCalled();

814+

expect(hoisted.callGatewayMock).not.toHaveBeenCalled();

815+

});

816+729817

it("passes model and thinking overrides into ACP session initialization", async () => {

730818

const result = await spawnAcpDirect(

731819

{