Skip to content

fix: ACP spawn fails with unknown agent id for raw harness targets - #166908

Merged
steipete merged 7 commits into
openclaw:mainfrom
saariuslystoned:fix/acp-raw-target-session-owner
Oct 8, 2026
Merged

steipete merged 7 commits into
openclaw:mainfrom
saariuslystoned:fix/acp-raw-target-session-owner

Conversation

@saariuslystoned

@saariuslystoned saariuslystoned commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #138580

What Problem This Solves

Fixes: sessions_spawn with runtime: "acp" fails with Unknown agent id when the requested external harness is not a configured OpenClaw agent.

User Impact

Raw ACP children use the requesting OpenClaw agent's session store, workspace, and Gateway route while retaining the external harness as ACP runtime identity. Configured ACP aliases own their children and select their own bound channel account, whether selected explicitly or through acp.defaultAgent.

Previously recorded harness-owned resume IDs remain accessible with matching requester, backend, harness, and lifecycle. Existing histories are not moved or rewritten. Changed or retired source authority cannot authorize a new resume after preparation.

Why This Change Was Made

The original path used one string for the OpenClaw owner and the external harness. This fix carries them separately through creation, initialization, dispatch, registration, cleanup, parent-stream diagnostics, and account selection. Explicit and default targets share one resolver, and spawn consumes the manager's persisted session entry instead of doing a redundant synchronous database read.

The shipped v2026.9.8 resume contract searched canonical harness-owned records. Authorization checks the configured owner's namespace first, then that historical namespace; a found foreign requester rejects without falling through. This preserves access without a migration. Removing historical lookup requires a verified Doctor cutover; this PR does not depend on the open draft #136165.

Resume authority is now an explicit typed revalidateResume?: () => Promise<() => void> input, threaded from spawn through initializeAcpSpawnRuntime to the manager. After awaited manager preparation, the closure rereads ownership; its returned synchronous guard runs immediately before runtime.ensureSession. Storage-owned source-change notifications invalidate the authorization, and finally expires it and unsubscribes. No ambient AsyncLocalStorage, getStore path, or session-key mismatch guard remains. Fresh initialization creates no resume subscription. No public SDK, protocol, schema, or configuration option changes.

Original fix by @saariuslystoned; maintainer cleanup adds compatibility, default-alias resolution, owner-based channel-account routing, explicit final-effect authority checks, documentation, and regression coverage. Contributor commits and credit are preserved.

Evidence

Exact head: a01c04c77d6eb086c514cc3163b430cb28420ec0. No merge performed.

Exact-head CI: success, including production/test types, lint, docs, guards, and selected runtime tests. Final independent Codex autoreview: scoped-clean, no actionable P0–P2 findings. Targeted oxfmt, oxlint, and git diff --check passed.

All manual execution for this head used one fresh secretless AWS lease cbx_fabddf4f88e3, actual type r7a.xlarge (explicitly requested; no quota fallback), launched from clean trusted main 39f956c4778cca437c3cccc301efbce56e768500 through scripts/crabbox-untrusted-bootstrap.sh. Every run used --fresh-pr openclaw/openclaw#166908, --no-hydrate, CRABBOX_ENV_ALLOW=CI, full-head verification, IMDS no-role verification, public networking/no Tailscale, and an isolated HOME. Contributor code never ran on the maintainer host.

Unit, types, and negative controls

  • 213 tests across all 20 ACP spawn, metadata, initialization, and heartbeat test files passed. Each file used pnpm test <file> --maxWorkers=1; aggregate command wall time was 517.53 s.
  • pnpm tsgo:core: passed, 64.28 s. Covering test graphs core-test-agents-root, core-test-agents-sessions, and core-test-plugins-platform: passed, 190.07 s. No extension source changed.
  • Account-routing production-only negative control ran first: change only the requester-state call to ownerAgentId: targetAgentId, leaving the tests unchanged. Explicit and default alias cases both failed: expected bot-alpha, received bot-beta (40.56 s). Candidate bytes were restored before the passing sweep.
  • Raw-owner production-only negative control: restore introduced production changes from pinned main bddfdd59022dd71421ce7b6a6b7e6406bf5e69f4, leaving the regression unchanged. It failed for the intended reason: expected agent:main:acp, received agent:codex:acp (33.99 s). Test/support checksums were verified unchanged, candidate bytes restored, and the source diff checked clean.

Real Gateway and ACP process proof

A scripted Responses provider (mock-openai) drives the real sessions_spawn tool through isolated Gateway processes. Bundled ACPX launches a separate synthetic stdio ACP adapter whose JSON-RPC log records actual session/new, session/load, and session/prompt requests. The Gateway and ACP manager are not mocked. No vendor model credentials are used.

The authority/history scenario passed on the exact candidate in 68.96 s:

status=accepted childSessionKey=agent:qa:acp:…
external adapter: session/new -> session/prompt -> turn 1
foreign requester: resume_forbidden; external new/load/prompt delta=0
wrong harness: resume_forbidden; external new/load/prompt delta=0
same requester: session/load(existing id, history length 1) -> prompt -> turn 2
synthetic historical raw-owner record: resumed into agent:qa:acp:… through session/load
historical history: ["HISTORICAL-HISTORY-MARKER", "Return ACP-STDIO-CHILD-OK"]
source reassigned after initial lookup: spawn_failed; staleSpawnEffectCount=0
source deleted after initial lookup: spawn_failed; staleSpawnEffectCount=0
Gateway cleanup errors=[]; aliveAdapterPids=[]

The separate default-alias account scenario passed in 51.16 s on the same head. Both synthetic accounts were available and healthy. A real agent RPC requested a threaded ACP child without an explicit agentId, so acp.defaultAgent: reviewer selected owner reviewer and runtime raw-harness.

requester account=bot-beta; configured reviewer binding=bot-alpha
sessions_spawn: accepted, childSessionKey=agent:reviewer:acp:…, inlineDelivery=true
thread-bound: input.accountId=bot-alpha; record.accountId=bot-alpha
outbound: accountId=bot-alpha, to=channel:parent-room, threadId=<bound thread>
outbound text=ACP-STDIO-CHILD-OK:1
persisted delivery route.accountId=bot-alpha
ACP metadata: backend=acpx, agent=raw-harness
external stdio adapter: session/new -> session/prompt -> turn 1
PASS contract=default-alias-account requesterAccount=bot-beta ownerAccount=bot-alpha
cleanup errors=[]; aliveAdapterPids=[]

Pinned main was independently checked out, installed, and built in a separate remote worktree. The same raw-target user flow failed as expected in 50.49 s:

main bddfdd59022dd71421ce7b6a6b7e6406bf5e69f4
status=error errorCode=dispatch_failed
error=Unknown agent id "raw-harness"
childSessionKey=agent:raw-harness:acp:…
PASS expected=main backend=bundled-acpx-stdio
Gateway cleanup errors=[]; aliveAdapterPids=[]
PROOF_COMPLETION_PASS candidate=a01c04c77d6eb086c514cc3163b430cb28420ec0

Two setup attempts exposed fixture mistakes before any ACP request: the two-agent roster first lacked agents.ownership="explicit"; after that correction, the synthetic channel declared enabled accounts without gateway.startAccount, so normal Gateway readiness rejected it. The final fixture supplies the normal ready/abort/stopped lifecycle and an explicit qa system agent. No product check or readiness gate was bypassed, and no source changes were required. A nonfatal shared-state WAL checkpoint-busy warning was observed on the pinned-main run; owned-process cleanup is checked separately.

The authority fixture pauses resolveRuntimeCwdForAcpSpawn after the initial resume lookup, then persists reassignment through the existing runtime API or deletes the source through the authenticated operator RPC. It verifies the mutation before continuing. Reassignment caused zero external operations. Authorized deletion performed one cleanup initialization; the continued stale spawn performed zero operations after deletion acknowledgment.

The historical fixture reproduces canonical harness-owned state from the released contract and preserves nonempty external history; it does not execute a published OpenClaw binary. The external ACP adapter and channel are synthetic: this proves Gateway/ACPX/process/ownership/account-routing behavior, not vendor authentication or model behavior. Requester-abort interleavings remain covered by persisted/in-process authority suites rather than the external adapter.

Review findings and scope

The requested ClawSweeper review completed at 2026-10-08T08:13:56Z (Revision 5) on ce6a03f7e9e37f092a5a86e3b6c4cc825d7804d4; its full durable comment was read. It accepted the prior real-process authority/history proof and raised one valid P1: configured aliases could bind and deliver using the requester's channel account. Account/origin resolution now consumes ownerAgentId; ACP admission and initialization retain the harness. Explicit/default alias regressions, the production-only negative control, and the live distinct-account scenario cover that finding and both associated proof requests.

ClawSweeper also completed Revision 6 on the new head at 2026-10-08T08:46:30Z. Its full body confirms the previous account-routing finding is fixed, finds no remaining concrete code defect, and requests the actual cross-account thread binding/delivery evidence supplied here.

The coordinator's P2 ambient-authority finding is resolved by the explicit typed callback described above. Its lifecycle and retained-callback expiry are exercised by the persisted worker contract. Earlier findings remain addressed: authoritative indexed harness matching, owner-correct diagnostics, bounded historical resume access, and final-effect authority revalidation/invalidation.

Exact git diff --numstat origin/main...HEAD totals (merge base 1f891df2c45f0ac634d23b0fefded80e693a5978):

Area Added Removed Net
Production 196 117 +79
Tests/support 483 106 +377
Docs 14 4 +10
Total 693 227 +466

This follow-up removes 23 net production lines relative to ce6a03f7e9e3. The overall production LOC target remains exceeded: preserving released resume access and fencing live source authority needs a scoped lifetime guard. Removed duplication includes the trivial owner helper, separate default branch, harness comparison, redundant database read, duplicated ownership facts, and ambient-context plumbing. Further reduction would weaken required checks or expand beyond the owner scope.

Commands and cost

All remote commands used this trusted bootstrap form, serially on the same lease:

env -u CRABBOX_AWS_INSTANCE_PROFILE CRABBOX_ENV_ALLOW=CI \
  crabbox run --provider aws --id cbx_fabddf4f88e3 \
  --fresh-pr openclaw/openclaw#166908 --no-hydrate --timing-json \
  --script scripts/crabbox-untrusted-bootstrap.sh -- \
  a01c04c77d6eb086c514cc3163b430cb28420ec0 bash -c '<proof payload>'

Run IDs: run_629c15794c73da91cacffd52fed5468c (213 units, types, both negative controls, passing authority/history proof, then alias fixture admission failure); run_b9cd44c80dfaf33da252b6ea750dbe9c (alias fixture readiness failure); run_5003fc54d43ec7b4013475d7d80e24e1 (corrected channel lifecycle, alias live proof, and pinned-main comparison).

Changed test owner Tests AWS command wall Exact-head CI file duration
acp-spawn-heartbeat.test.ts 3 35.12 s 47.88 s
acp-spawn.test.ts (includes owner support) 46 15.28 s 7.56 s
acp-spawn-resume.worker.test.ts 1 combined state/authority contract 22.72 s 18.39 s (8.48 s tests)
acp-spawn-target.test.ts 6 2.34 s 1.15 s
session-meta-resume.test.ts 2 10.17 s 11.63 s

The worker case uses canonical persistence, indexed reads, and the real initializer with deferred interleavings; a mock-only test would miss stale snapshots and final-effect defects. No timers, sleeps, serial test config, or test-only production seam was added. Every owned Gateway and external adapter process stopped with zero cleanup errors; no operator state or ports were used. Lease cleanup is not confirmed: the stop request timed out, the last successful listing still showed cbx_fabddf4f88e3 active, and the subsequent reconciliation read timed out. The lease ID is retained for cleanup recovery when the broker responds.

Exact module test, typecheck, negative-control, and live commands
files=(
  src/agents/acp-spawn-heartbeat.test.ts
  src/agents/subagents/spawn/acp-spawn.test.ts
  src/agents/subagents/spawn/acp-spawn-target.test.ts
  src/agents/subagents/spawn/acp-spawn-parent-stream.test.ts
  src/agents/subagents/spawn/acp-spawn.authority.test.ts
  src/agents/subagents/spawn/acp-spawn-resume.worker.test.ts
  src/acp/runtime/session-meta.test.ts
  src/acp/runtime/session-meta.alias-lifecycle.test.ts
  src/acp/runtime/session-meta.changes.test.ts
  src/acp/runtime/session-meta.key-repair.test.ts
  src/acp/runtime/session-meta.legacy-migration.test.ts
  src/acp/runtime/session-meta-store.test.ts
  src/acp/runtime/session-meta-resume.test.ts
  src/acp/runtime/session-meta-write.worker.test.ts
  src/acp/runtime/session-meta-read.cache.test.ts
  src/acp/runtime/session-meta-read.test.ts
  src/acp/runtime/session-meta-control.worker.test.ts
  src/acp/runtime/session-meta-doctor.test.ts
  src/acp/runtime/session-meta-list.test.ts
  src/acp/control-plane/manager.initialize-session.test.ts
)
for file in "${files[@]}"; do
  pnpm test "$file" --maxWorkers=1
done
pnpm tsgo:core
pnpm tsgo:core:test --ci-graphs-json \
  '["core-test-agents-root","core-test-agents-sessions","core-test-plugins-platform"]' --concurrency 1

# Only production account selection reverted; tests untouched:
pnpm test src/agents/subagents/spawn/acp-spawn.test.ts --maxWorkers=1 \
  -t "uses the owner's bound account for ACP thread spawn"
# Only changed production restored from pinned main; tests/support untouched:
pnpm test src/agents/subagents/spawn/acp-spawn.test.ts --maxWorkers=1 \
  -t 'keeps a raw ACP harness under the requester OpenClaw owner and workspace'

node --import ./scripts/tsx.mjs scripts/build-all.mts qaRuntime
node --import ./scripts/tsx.mjs /tmp/acp-adapter-authority-proof.mts "$PWD" fixed
node --import ./scripts/tsx.mjs /tmp/acp-alias-account-proof.mts "$PWD"
# Separate worktree at bddfdd59022dd71421ce7b6a6b7e6406bf5e69f4:
pnpm install --frozen-lockfile
node --import ./scripts/tsx.mjs scripts/build-all.mts qaRuntime
node --import ./scripts/tsx.mjs /tmp/acp-adapter-authority-proof.mts "$PWD" main
Synthetic external-process authority/history proof fixture

Save as /tmp/acp-adapter-authority-proof.mts on the secretless lease after the QA build. This task-owned fixture creates isolated state and ephemeral ports, uses bundled ACPX, and joins its Gateway and adapter processes.

// Remote-only proof: real Gateway -> bundled ACPX -> a synthetic stdio ACP process.
import assert from "node:assert/strict";
import { createServer } from "node:http";
import fs from "node:fs/promises";
import path from "node:path";
import os from "node:os";
import { randomUUID } from "node:crypto";
import { pathToFileURL } from "node:url";

const repoRoot = path.resolve(process.argv[2] ?? process.cwd());
const expected = process.argv[3] ?? "fixed";
assert(["fixed", "main"].includes(expected));
const { createQaGatewayChild } = await import(pathToFileURL(path.join(repoRoot, "extensions/qa-lab/src/gateway-child.ts")).href);
const { writeOpenAiResponsesSse, writeOpenAiResponsesText } = await import(pathToFileURL(path.join(repoRoot, "test/helpers/openai-responses-sse.ts")).href);
const fixtureRoot = await fs.mkdtemp(path.join(os.tmpdir(), "acp-stdio-proof-"));
const peerDir = path.join(fixtureRoot, "peer");
const adapterPath = path.join(fixtureRoot, "adapter.mjs");
const eventsPath = path.join(peerDir, "events.ndjson");
const pluginDir = path.join(fixtureRoot, "proof-plugin");
const preloadPath = path.join(fixtureRoot, "authority-preload.mjs");
const armPath = path.join(fixtureRoot, "authority-arm.json");
const authorityEventsPath = path.join(fixtureRoot, "authority-events.ndjson");
await fs.mkdir(peerDir);
await fs.mkdir(pluginDir);
await fs.writeFile(preloadPath, `
import fs from 'node:fs/promises';
import { appendFileSync, readFileSync, unlinkSync } from 'node:fs';
const originalAccess=fs.access;
const target=${JSON.stringify(peerDir)};
const armPath=${JSON.stringify(armPath)};
const eventsPath=${JSON.stringify(authorityEventsPath)};
const record=event=>appendFileSync(eventsPath,JSON.stringify({pid:process.pid,...event})+'\\n');
fs.access=async function(...args) {
  if(String(args[0])===target) {
    let arm;
    try { arm=JSON.parse(readFileSync(armPath,'utf8')); } catch(error) { if(error.code!=='ENOENT') throw error; }
    if(arm) {
      const stack=new Error('ACP proof interleaving').stack;
      if(!stack?.includes('resolveRuntimeCwdForAcpSpawn')) {
        record({phase:'access-outside-spawn',action:arm.action,stack});
      } else {
        unlinkSync(armPath);
        record({phase:'hook-entered',...arm,stack});
        const mutate=process[Symbol.for('openclaw.qa.acpResumeAuthorityMutation')];
        if(typeof mutate!=='function') throw new Error('ACP proof mutation callback missing');
        const result=await mutate(arm);
        record({phase:'canonical-change-acknowledged',...arm,result});
      }
    }
  }
  return originalAccess.apply(fs,args);
};
`);
await fs.writeFile(adapterPath, String.raw`
import { randomUUID } from 'node:crypto';
import fs from 'node:fs';
import path from 'node:path';
import readline from 'node:readline';
const [directory,harness] = process.argv.slice(2);
const events = path.join(directory,'events.ndjson');
const write = message => process.stdout.write(JSON.stringify(message)+'\n');
const record = event => fs.appendFileSync(events,JSON.stringify({pid:process.pid,harness,...event})+'\n');
const sessionPath = id => {
  if (!/^[a-f0-9-]{36}$/.test(id)) throw new Error('invalid synthetic session id');
  return path.join(directory,id+'.json');
};
const read = id => JSON.parse(fs.readFileSync(sessionPath(id),'utf8'));
const save = (id,state) => fs.writeFileSync(sessionPath(id),JSON.stringify(state));
record({method:'process/start'});
for await (const line of readline.createInterface({input:process.stdin})) {
  if (!line.trim()) continue;
  const request=JSON.parse(line);
  const params=request.params??{};
  record({method:request.method,id:request.id,sessionId:params.sessionId});
  if (request.id===undefined) continue;
  try {
    let result;
    switch(request.method) {
      case 'initialize':
        result={protocolVersion:request.params.protocolVersion,agentCapabilities:{loadSession:true},authMethods:[]};
        break;
      case 'session/new': {
        const sessionId=randomUUID();
        save(sessionId,{harness,history:[]});
        record({method:'session/new/result',sessionId});
        result={sessionId,_meta:{agentSessionId:sessionId}};
        break;
      }
      case 'session/load': {
        const state=read(params.sessionId);
        if(state.harness!==harness) throw new Error('synthetic harness mismatch');
        record({method:'session/load/result',sessionId:params.sessionId,turns:state.history.length});
        result={_meta:{agentSessionId:params.sessionId}};
        break;
      }
      case 'session/prompt': {
        const state=read(params.sessionId);
        if(state.harness!==harness) throw new Error('synthetic harness mismatch');
        state.history.push(params.prompt.filter(block=>block.type==='text').map(block=>block.text).join(''));
        save(params.sessionId,state);
        record({method:'session/prompt/result',sessionId:params.sessionId,turn:state.history.length});
        write({jsonrpc:'2.0',method:'session/update',params:{sessionId:params.sessionId,update:{sessionUpdate:'agent_message_chunk',content:{type:'text',text:'ACP-STDIO-CHILD-OK:'+state.history.length}}}});
        result={stopReason:'end_turn'};
        break;
      }
      case 'session/cancel': result={}; break;
      default:
        write({jsonrpc:'2.0',id:request.id,error:{code:-32601,message:'unsupported synthetic method '+request.method}});
        continue;
    }
    write({jsonrpc:'2.0',id:request.id,result});
  } catch(error) {
    record({method:'request/error',requestMethod:request.method,message:String(error)});
    write({jsonrpc:'2.0',id:request.id,error:{code:-32603,message:String(error)}});
  }
}
record({method:'process/end'});
`);
await fs.writeFile(path.join(pluginDir, "openclaw.plugin.json"), JSON.stringify({
  id: "qa-acp-proof", activation: { onStartup: true },
  configSchema: { type: "object", additionalProperties: false, properties: {} },
}));
await fs.writeFile(path.join(pluginDir, "index.ts"), `
import { randomUUID } from 'node:crypto';
import fs from 'node:fs/promises';
import { getAcpSessionManager, readAcpSessionEntryAsync } from 'openclaw/plugin-sdk/acp-runtime';
export default {id:'qa-acp-proof',register(api) {
  process[Symbol.for('openclaw.qa.acpResumeAuthorityMutation')]=async ({action,sourceKey})=>{
    const cfg=api.runtime.config.current();
    const agentId='qa';
    const before=await readAcpSessionEntryAsync({cfg,agentId,sessionKey:sourceKey});
    if(!before?.entry || before.entry.spawnedBy!=='agent:qa:dashboard:acp-proof-parent') throw new Error('ACP proof source is not currently requester-owned');
    if(action==='reassigned') {
      await api.runtime.agent.session.upsertSessionEntry({agentId,storePath:before.storePath,sessionKey:sourceKey,entry:{
        ...before.entry,spawnedBy:'agent:qa:dashboard:foreign-parent',parentSessionKey:'agent:qa:dashboard:foreign-parent',
      }});
    } else if(action==='deleted') {
      const response=await fetch(new URL('/proof/delete-source',cfg.models.providers['mock-openai'].baseUrl),{
        method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify({sourceKey}),
      });
      const deletion=await response.json();
      if(!response.ok || deletion.ok!==true || deletion.deleted!==true || deletion.key!==sourceKey) throw new Error('operator source deletion failed: '+JSON.stringify(deletion));
    } else throw new Error('unknown ACP proof action');
    const after=await readAcpSessionEntryAsync({cfg,agentId,sessionKey:sourceKey});
    if(action==='reassigned' && (after?.entry?.spawnedBy!=='agent:qa:dashboard:foreign-parent' || after.entry.parentSessionKey!=='agent:qa:dashboard:foreign-parent')) throw new Error('ACP proof reassignment was not persisted');
    if(action==='deleted' && after?.entry) throw new Error('ACP proof deletion was not persisted');
    const externalEvents=(await fs.readFile(${JSON.stringify(eventsPath)},'utf8')).trim().split('\\n').filter(Boolean).map(line=>JSON.parse(line));
    const externalEffectCount=externalEvents.filter(event=>['session/new','session/load','session/prompt'].includes(event.method)).length;
    return {sourceKey,action,beforeOwner:before.entry.spawnedBy,afterOwner:after?.entry?.spawnedBy??null,sourceExists:Boolean(after?.entry),externalEffectCount};
  };
  api.registerGatewayMethod('qa-acp-proof.identity',async ({params,respond})=>{
    const result=await readAcpSessionEntryAsync({cfg:api.runtime.config.current(),agentId:'qa',sessionKey:params.sessionKey});
    respond(true,{entry:result?.entry,meta:result?.acp});
  },{scope:'operator.read',profileAccess:'independent'});
  api.registerGatewayMethod('qa-acp-proof.seedHistorical',async ({respond})=>{
    const cfg=api.runtime.config.current();
    const agentId='raw-harness';
    const sessionKey='agent:raw-harness:acp:historical-proof';
    const storePath=api.runtime.agent.session.resolveStorePath(cfg.session?.store,{agentId});
    await api.runtime.agent.session.upsertSessionEntry({agentId,storePath,sessionKey,entry:{
      sessionId:randomUUID(),lifecycleRevision:randomUUID(),updatedAt:Date.now(),
      spawnedBy:'agent:qa:dashboard:acp-proof-parent',parentSessionKey:'agent:qa:dashboard:acp-proof-parent',
    }});
    const initialized=await getAcpSessionManager().initializeSession({cfg,agentId,sessionKey,agent:agentId,mode:'persistent',backendId:'acpx'});
    for await(const event of initialized.runtime.runTurn({handle:initialized.handle,text:'HISTORICAL-HISTORY-MARKER',mode:'prompt',requestId:randomUUID()})) {
      if(event.type==='error') throw new Error(event.message);
    }
    respond(true,{agentId,sessionKey,resumeSessionId:initialized.handle.agentSessionId,meta:initialized.meta});
  },{scope:'operator.admin',profileAccess:'independent'});
}};
`);
const readEvents = async () => {
  const text = await fs.readFile(eventsPath, "utf8").catch(error => {
    if (error.code === "ENOENT") return "";
    throw error;
  });
  return text.trim().split("\n").filter(Boolean).map(line => JSON.parse(line));
};
type Interleaving = {action:"reassigned"|"deleted";sourceKey:string};
let scenario: { callId: string; args: Record<string, unknown>; receipt?: any; interleaving?:Interleaving;armed?:boolean;operatorDeletionRequested?:boolean } | undefined;
const providerErrors: unknown[] = [];
const provider = createServer((request, response) => {
  void (async () => {
    if(request.method==="POST" && request.url==="/proof/delete-source") {
      const chunks=[];
      for await(const chunk of request) chunks.push(Buffer.from(chunk));
      const body=JSON.parse(Buffer.concat(chunks).toString("utf8"));
      const active=scenario;
      if(!gateway || !body || Object.keys(body).length!==1 || typeof body.sourceKey!=="string" ||
        !/^agent:qa:acp:[a-zA-Z0-9-]+$/.test(body.sourceKey) ||
        !active?.armed || active.receipt || active.operatorDeletionRequested ||
        active.interleaving?.action!=="deleted" || active.interleaving.sourceKey!==body.sourceKey) {
        response.writeHead(403,{"content-type":"application/json"}).end(JSON.stringify({ok:false,error:"no matching armed deletion scenario"}));
        return;
      }
      active.operatorDeletionRequested=true;
      const deletion=await gateway.call("sessions.delete",{key:body.sourceKey,deleteTranscript:true},{timeoutMs:60000});
      assert.equal(deletion.ok,true);
      assert.equal(deletion.deleted,true);
      assert.equal(deletion.key,body.sourceKey);
      console.log(JSON.stringify({phase:"operator-source-deleted",sourceKey:body.sourceKey,deletion}));
      response.writeHead(200,{"content-type":"application/json"}).end(JSON.stringify(deletion));
      return;
    }
    if (request.method === "GET" && request.url === "/v1/models") {
      response.writeHead(200, {"content-type":"application/json"}).end(JSON.stringify({data:[{id:"qa-parent",object:"model"}]}));
      return;
    }
    if (request.method !== "POST" || request.url !== "/v1/responses") { response.writeHead(404).end(); return; }
    const chunks = [];
    for await (const chunk of request) chunks.push(Buffer.from(chunk));
    const body = JSON.parse(Buffer.concat(chunks).toString("utf8"));
    const active = scenario;
    const output = active && body.input?.findLast(item => item.type === "function_call_output" && item.call_id === active.callId)?.output;
    if (output !== undefined) active.receipt = JSON.parse(output);
    if (!active || JSON.stringify(body.input).includes("Generate a concise session title") || active.receipt) {
      writeOpenAiResponsesText(response,{text:active?.receipt?"ACP-PARENT-DONE":"ACP proof",messageId:"msg_"+randomUUID(),responseId:"resp_"+randomUUID()});
      return;
    }
    const item={type:"function_call",id:"fc_"+active.callId,call_id:active.callId,name:"sessions_spawn",arguments:JSON.stringify(active.args)};
    if(active.interleaving && !active.armed) {
      await fs.writeFile(armPath,JSON.stringify(active.interleaving));
      active.armed=true;
    }
    writeOpenAiResponsesSse(response,[
      {type:"response.output_item.added",output_index:0,item:{...item,arguments:""}},
      {type:"response.function_call_arguments.delta",item_id:item.id,output_index:0,delta:item.arguments},
      {type:"response.output_item.done",output_index:0,item},
      {type:"response.completed",response:{id:"resp_"+active.callId,status:"completed",output:[item],usage:{input_tokens:1,output_tokens:1,total_tokens:2}}},
    ]);
  })().catch(error => { providerErrors.push(error); if (!response.headersSent) response.writeHead(500); response.end(); });
});
await new Promise<void>((resolve,reject)=>{provider.once("error",reject);provider.listen(0,"127.0.0.1",resolve);});
const address=provider.address();
assert(address && typeof address!=="string");
const owner=createQaGatewayChild();
let gateway;
try {
  gateway=await owner.start({
    repoRoot, providerMode:"mock-openai", providerBaseUrl:`http://127.0.0.1:${address.port}/v1`,
    transportBaseUrl:`http://127.0.0.1:${address.port}`, primaryModel:"mock-openai/qa-parent",alternateModel:"mock-openai/qa-parent",controlUiEnabled:false,
    enabledPluginIds:["acpx"],
    runtimePreloads:[pathToFileURL(preloadPath).href],
    mutateConfig(cfg) { return {
      ...cfg,memory:{...cfg.memory,search:{...cfg.memory?.search,enabled:false}},
      agents:{...cfg.agents,entries:{...cfg.agents?.entries,qa:{...cfg.agents?.entries?.qa,workspace:peerDir}}},
      acp:{enabled:true,dispatch:{enabled:true},backend:"acpx",allowedAgents:["raw-harness","other-harness"]},
      plugins:{...cfg.plugins,allow:[...(cfg.plugins?.allow??[]),"qa-acp-proof"],load:{paths:[pluginDir]},entries:{...cfg.plugins?.entries,
        "qa-acp-proof":{enabled:true},acpx:{enabled:true,config:{
          probeAgent:"raw-harness",stateDir:path.join(fixtureRoot,"acpx-state"),cwd:peerDir,
          permissionMode:"deny-all",nonInteractivePermissions:"deny",pluginToolsMcpBridge:false,openClawToolsMcpBridge:false,
          nativeAgents:{opencode:false,qwen:false,pi:false,kilocode:false,copilot:false},piSessionCatalog:{enabled:false},
          agents:Object.fromEntries(["raw-harness","other-harness"].map(harness=>[harness,{command:process.execPath,args:[adapterPath,peerDir,harness]}])),
        }}},},tools:{...cfg.tools,toolSearch:{enabled:false}},
    };},
  });
  console.log(JSON.stringify({phase:"gateway-started",pid:gateway.pid,baseUrl:gateway.baseUrl,stateDir:gateway.runtimeEnv.OPENCLAW_STATE_DIR,expected,backend:"bundled-acpx"}));
  const parentKey="agent:qa:dashboard:acp-proof-parent";
  const run=async(label:string,sessionKey:string,args:Record<string,unknown>,interleaving?:Interleaving)=>{
    scenario={callId:"call_"+label,args:{task:"Return ACP-STDIO-CHILD-OK",runtime:"acp",agentId:"raw-harness",mode:"run",expectsCompletionMessage:false,...args},interleaving};
    const accepted=await gateway.call("agent",{sessionKey,agentId:"qa",message:"ACP stdio proof "+label,deliver:false,idempotencyKey:randomUUID()},{timeoutMs:60000});
    assert.equal(accepted.status,"accepted");
    const terminal=await gateway.call("agent.wait",{runId:accepted.runId,timeoutMs:120000},{timeoutMs:125000});
    assert.equal(terminal.status,"ok");
    assert(scenario.receipt,"the mock model must observe the actual sessions_spawn tool result");
    console.log(JSON.stringify({phase:label,receipt:scenario.receipt}));
    return scenario.receipt;
  };
  const completeChild=async(receipt:any)=>{
    assert.equal(receipt.status,"accepted");
    assert.match(receipt.childSessionKey,/^agent:qa:acp:/);
    const terminal=await gateway.call("agent.wait",{runId:receipt.runId,timeoutMs:60000},{timeoutMs:65000});
    assert.equal(terminal.status,"ok");
    const identity=await gateway.call("qa-acp-proof.identity",{sessionKey:receipt.childSessionKey});
    assert.equal(identity.meta?.backend,"acpx");
    assert.equal(identity.meta?.agent,"raw-harness");
    assert.equal(identity.entry?.spawnedBy,parentKey);
    assert.equal(identity.entry?.parentSessionKey,parentKey);
    assert.equal(typeof identity.meta?.identity?.agentSessionId,"string");
    return identity.meta.identity.agentSessionId as string;
  };
  const receipt=await run("raw-target",parentKey,{});
  if(expected==="main") {
    assert.notEqual(receipt.status,"accepted");
    assert.match(receipt.error,/unknown agent id/i);
    console.log(JSON.stringify({phase:"main-negative",receipt,events:await readEvents()}));
  } else {
    const resumeSessionId=await completeChild(receipt);
    const rawEvents=await readEvents();
    assert(rawEvents.some(event=>event.method==="session/new/result" && event.sessionId===resumeSessionId));
    assert(rawEvents.some(event=>event.method==="session/prompt/result" && event.sessionId===resumeSessionId && event.turn===1));
    assert(rawEvents.filter(event=>event.method==="session/prompt/result").every(event=>event.pid!==gateway.pid));
    console.log(JSON.stringify({phase:"raw-target-external-effects",resumeSessionId,events:rawEvents}));
    const effectCount=(events:any[])=>events.filter(event=>["session/new","session/load","session/prompt"].includes(event.method)).length;
    for(const [label,key,args] of [
      ["foreign-requester","agent:qa:dashboard:foreign-parent",{resumeSessionId}],
      ["wrong-harness",parentKey,{resumeSessionId,agentId:"other-harness"}],
    ] as const) {
      const before=effectCount(await readEvents());
      const denied=await run(label,key,args);
      assert.equal(denied.status,"forbidden");assert.equal(denied.errorCode,"resume_forbidden");
      assert.equal(effectCount(await readEvents()),before,"denied resume must not send session/new, session/load, or session/prompt");
    }
    const resume=async(label:string,sourceId:string,expectedTurn:number)=>{
      const before=(await readEvents()).length;
      const resumed=await run(label,parentKey,{resumeSessionId:sourceId});
      assert.equal(await completeChild(resumed),sourceId);
      const events=(await readEvents()).slice(before);
      assert(events.some(event=>event.method==="session/load" && event.sessionId===sourceId),"allowed resume must cross the external session/load boundary");
      assert(events.some(event=>event.method==="session/prompt/result" && event.sessionId===sourceId && event.turn===expectedTurn));
      console.log(JSON.stringify({phase:label+"-external-effects",sourceId,events}));
    };
    await resume("same-requester-resume",resumeSessionId,2);
    const historical=await gateway.call("qa-acp-proof.seedHistorical",{});
    assert.equal(historical.agentId,"raw-harness");
    assert.equal(historical.meta.backend,"acpx");
    assert.equal(typeof historical.resumeSessionId,"string");
    console.log(JSON.stringify({phase:"historical-canonical-source",historical}));
    await resume("historical-source-resume",historical.resumeSessionId,2);
    const historicalState=JSON.parse(await fs.readFile(path.join(peerDir,historical.resumeSessionId+".json"),"utf8"));
    assert.equal(historicalState.history.length,2);
    assert.equal(historicalState.history[0],"HISTORICAL-HISTORY-MARKER");
    console.log(JSON.stringify({phase:"historical-history-preserved",resumeSessionId:historical.resumeSessionId,history:historicalState.history}));
    for(const action of ["reassigned","deleted"] as const) {
      const source=await run("fresh-source-"+action,parentKey,{});
      const sourceId=await completeChild(source);
      const before=effectCount(await readEvents());
      const rejected=await run("late-"+action,parentKey,{resumeSessionId:sourceId},{action,sourceKey:source.childSessionKey});
      const authorityEvents=(await fs.readFile(authorityEventsPath,"utf8")).trim().split("\n").filter(Boolean).map(line=>JSON.parse(line));
      const entered=authorityEvents.filter(event=>event.phase==="hook-entered" && event.sourceKey===source.childSessionKey);
      const changed=authorityEvents.filter(event=>event.phase==="canonical-change-acknowledged" && event.sourceKey===source.childSessionKey);
      assert.equal(entered.length,1,"interleaving must run at resolveRuntimeCwdForAcpSpawn after early authorization");
      assert.equal(changed.length,1,"canonical source mutation must settle before spawn continues");
      assert.notEqual(rejected.status,"accepted");
      assert.match(rejected.error,/previously recorded for this requester|ACP resume source authority changed/);
      const afterMutation=changed[0].result.externalEffectCount;
      if(action==="reassigned") assert.equal(afterMutation,before,"reassignment must not invoke the ACP adapter");
      assert.equal(effectCount(await readEvents()),afterMutation,"continued stale spawn must not reach external session/new, session/load, or session/prompt");
      console.log(JSON.stringify({phase:"late-"+action+"-external-effects",sourceId,rejected,entered,changed,mutationCleanupEffectCount:afterMutation-before,staleSpawnEffectCount:0}));
    }
  }
  assert.deepEqual(providerErrors,[]);
  console.log(JSON.stringify({phase:"PASS",expected,backend:"bundled-acpx-stdio"}));
} catch(error) {
  if(gateway) console.error(gateway.logs());
  console.error(JSON.stringify({phase:"adapter-events-on-failure",events:await readEvents()}));
  console.error(JSON.stringify({phase:"authority-events-on-failure",events:await fs.readFile(authorityEventsPath,"utf8").catch(()=>"")}));
  throw error;
} finally {
  const stopped=await owner.stop();
  const events=await readEvents();
  const alive=[...new Set(events.map(event=>event.pid))].filter(pid=>{
    try { process.kill(pid,0); return true; } catch(error) { if(error.code==="ESRCH") return false; throw error; }
  });
  console.log(JSON.stringify({phase:"gateway-stopped",errors:stopped.errors.map(String),aliveAdapterPids:alive,events}));
  provider.closeAllConnections();
  await new Promise<void>((resolve,reject)=>provider.close(error=>error?reject(error):resolve()));
  if(!stopped.errors.length && !alive.length) await fs.rm(fixtureRoot,{recursive:true,force:true});
  else console.error(JSON.stringify({phase:"cleanup-evidence-retained",fixtureRoot}));
  assert.deepEqual(stopped.errors,[],"owned Gateway and adapter processes must stop cleanly");
  assert.deepEqual(alive,[],"every logged external ACP adapter process must exit");
}
Synthetic default-alias thread/account delivery proof fixture

Save as /tmp/acp-alias-account-proof.mts on the secretless lease after the QA build. This task-owned fixture creates isolated state and ephemeral ports, uses bundled ACPX, and joins its Gateway and adapter processes.

// Remote-only: real Gateway/default ACP alias -> thread binding -> channel outbound -> stdio ACPX.
import assert from "node:assert/strict";
import { createServer } from "node:http";
import fs from "node:fs/promises";
import path from "node:path";
import os from "node:os";
import { randomUUID } from "node:crypto";
import { pathToFileURL } from "node:url";
const repoRoot=path.resolve(process.argv[2]??process.cwd());
const {createQaGatewayChild}=await import(pathToFileURL(path.join(repoRoot,"extensions/qa-lab/src/gateway-child.ts")).href);
const {writeOpenAiResponsesSse,writeOpenAiResponsesText}=await import(pathToFileURL(path.join(repoRoot,"test/helpers/openai-responses-sse.ts")).href);
const fixtureRoot=await fs.mkdtemp(path.join(os.tmpdir(),"acp-alias-account-proof-"));
const peerDir=path.join(fixtureRoot,"peer");
const adapterPath=path.join(fixtureRoot,"adapter.mjs");
const eventsPath=path.join(peerDir,"events.ndjson");
const channelEventsPath=path.join(fixtureRoot,"channel-events.ndjson");
const pluginDir=path.join(fixtureRoot,"channel-plugin");
const channelId="qa-acp-account-proof";
await fs.mkdir(peerDir);
await fs.mkdir(pluginDir);
await fs.writeFile(adapterPath, String.raw`
import { randomUUID } from 'node:crypto';
import fs from 'node:fs';
import path from 'node:path';
import readline from 'node:readline';
const [directory,harness] = process.argv.slice(2);
const events = path.join(directory,'events.ndjson');
const write = message => process.stdout.write(JSON.stringify(message)+'\n');
const record = event => fs.appendFileSync(events,JSON.stringify({pid:process.pid,harness,...event})+'\n');
const sessionPath = id => {
  if (!/^[a-f0-9-]{36}$/.test(id)) throw new Error('invalid synthetic session id');
  return path.join(directory,id+'.json');
};
const read = id => JSON.parse(fs.readFileSync(sessionPath(id),'utf8'));
const save = (id,state) => fs.writeFileSync(sessionPath(id),JSON.stringify(state));
record({method:'process/start'});
for await (const line of readline.createInterface({input:process.stdin})) {
  if (!line.trim()) continue;
  const request=JSON.parse(line);
  const params=request.params??{};
  record({method:request.method,id:request.id,sessionId:params.sessionId});
  if (request.id===undefined) continue;
  try {
    let result;
    switch(request.method) {
      case 'initialize':
        result={protocolVersion:request.params.protocolVersion,agentCapabilities:{loadSession:true},authMethods:[]};
        break;
      case 'session/new': {
        const sessionId=randomUUID();
        save(sessionId,{harness,history:[]});
        record({method:'session/new/result',sessionId});
        result={sessionId,_meta:{agentSessionId:sessionId}};
        break;
      }
      case 'session/load': {
        const state=read(params.sessionId);
        if(state.harness!==harness) throw new Error('synthetic harness mismatch');
        record({method:'session/load/result',sessionId:params.sessionId,turns:state.history.length});
        result={_meta:{agentSessionId:params.sessionId}};
        break;
      }
      case 'session/prompt': {
        const state=read(params.sessionId);
        if(state.harness!==harness) throw new Error('synthetic harness mismatch');
        state.history.push(params.prompt.filter(block=>block.type==='text').map(block=>block.text).join(''));
        save(params.sessionId,state);
        record({method:'session/prompt/result',sessionId:params.sessionId,turn:state.history.length});
        write({jsonrpc:'2.0',method:'session/update',params:{sessionId:params.sessionId,update:{sessionUpdate:'agent_message_chunk',content:{type:'text',text:'ACP-STDIO-CHILD-OK:'+state.history.length}}}});
        result={stopReason:'end_turn'};
        break;
      }
      case 'session/cancel': result={}; break;
      default:
        write({jsonrpc:'2.0',id:request.id,error:{code:-32601,message:'unsupported synthetic method '+request.method}});
        continue;
    }
    write({jsonrpc:'2.0',id:request.id,result});
  } catch(error) {
    record({method:'request/error',requestMethod:request.method,message:String(error)});
    write({jsonrpc:'2.0',id:request.id,error:{code:-32603,message:String(error)}});
  }
}
record({method:'process/end'});
`);
await fs.writeFile(path.join(pluginDir,"openclaw.plugin.json"),JSON.stringify({id:channelId,channels:[channelId],activation:{onStartup:true},configSchema:{type:"object",additionalProperties:false,properties:{}}}));
await fs.writeFile(path.join(pluginDir,"index.ts"),`
import fs from 'node:fs';
import {randomUUID} from 'node:crypto';
import {registerSessionBindingAdapter,unregisterSessionBindingAdapter} from 'openclaw/plugin-sdk/thread-bindings-session-runtime';
import {readAcpSessionEntryAsync} from 'openclaw/plugin-sdk/acp-runtime';
import {waitUntilAbort} from 'openclaw/plugin-sdk/channel-outbound';
import {channelReadyPatch,channelStoppedPatch} from 'openclaw/plugin-sdk/gateway-runtime';
const channel=${JSON.stringify(channelId)};
const log=event=>fs.appendFileSync(${JSON.stringify(channelEventsPath)},JSON.stringify(event)+'\\n');
const records=[];
const adapters=['bot-alpha','bot-beta'].map(accountId=>({
  channel,accountId,capabilities:{placements:['child'],bindSupported:true,unbindSupported:true},
  async bind(input) {
    input.assertCurrent?.();
    const parentConversationId=input.conversation.conversationId;
    const record={bindingId:randomUUID(),targetSessionKey:input.targetSessionKey,targetKind:input.targetKind,status:'active',boundAt:Date.now(),metadata:input.metadata,
      conversation:{channel,accountId,conversationId:'thread-'+randomUUID(),parentConversationId}};
    records.push(record);
    log({phase:'thread-bound',input,record});
    return record;
  },
  listBySession:sessionKey=>records.filter(record=>record.targetSessionKey===sessionKey && record.conversation.accountId===accountId && record.status==='active'),
  resolveByConversation:ref=>records.find(record=>record.conversation.accountId===accountId && record.conversation.conversationId===ref.conversationId && record.status==='active')??null,
  async unbind(input) {
    const selected=records.filter(record=>record.conversation.accountId===accountId && (record.bindingId===input.bindingId || record.targetSessionKey===input.targetSessionKey));
    for(const record of selected) record.status='ended';
    return selected;
  },
}));
export default {id:channel,register(api) {
  api.registerChannel({plugin:{
    id:channel,meta:{id:channel,label:'ACP Account Proof',selectionLabel:'ACP Account Proof',docsPath:'/channels/acp-account-proof',blurb:'Synthetic channel boundary proof.'},
    capabilities:{chatTypes:['direct','group','channel']},
    conversationBindings:{defaultTopLevelPlacement:'child'},
    config:{listAccountIds:()=>['bot-alpha','bot-beta'],resolveAccount:(_cfg,accountId)=>({accountId:accountId??'bot-beta',enabled:true,configured:true}),isEnabled:()=>true,isConfigured:()=>true},
    gateway:{startAccount:async ctx=>{
      ctx.setStatus(channelReadyPatch({accountId:ctx.accountId,configured:true,enabled:true}));
      log({phase:'channel-ready',accountId:ctx.accountId});
      try {
        await waitUntilAbort(ctx.abortSignal);
      } finally {
        ctx.setStatus(channelStoppedPatch({accountId:ctx.accountId}));
        log({phase:'channel-stopped',accountId:ctx.accountId});
      }
    }},
    messaging:{
      normalizeTarget:raw=>raw.trim(),
      resolveInboundConversation:({to,conversationId,threadId})=>({conversationId:threadId??(to??conversationId).replace(/^channel:/,''),...(threadId?{parentConversationId:(to??conversationId).replace(/^channel:/,'')}:{})}),
      resolveDeliveryTarget:({conversationId,parentConversationId})=>({to:'channel:'+(parentConversationId??conversationId),...(parentConversationId?{threadId:conversationId}:{})}),
    },
    outbound:{deliveryMode:'direct',sendText:async ({to,text,accountId,threadId})=>{
      const messageId=randomUUID();
      log({phase:'outbound',to,text,accountId,threadId,messageId});
      return {channel,messageId};
    }},
  }});
  api.registerService({id:'account-bindings',start(){for(const adapter of adapters) registerSessionBindingAdapter(adapter);},stop(){for(const adapter of adapters) unregisterSessionBindingAdapter({...adapter,adapter});}});
  api.registerGatewayMethod('qa-acp-account-proof.identity',async ({params,respond})=>{
    const result=await readAcpSessionEntryAsync({cfg:api.runtime.config.current(),agentId:'reviewer',sessionKey:params.sessionKey});
    respond(true,{entry:result?.entry,meta:result?.acp,bindings:records});
  },{scope:'operator.read',profileAccess:'independent'});
}};
`);
const toolArgs={task:"Return ACP-STDIO-CHILD-OK",runtime:"acp",mode:"session",thread:true,expectsCompletionMessage:false};
const scenario:{callId:string;args:Record<string,unknown>;receipt?:any}={callId:"call_default_alias_account",args:toolArgs};
const providerErrors: unknown[] = [];
const provider = createServer((request, response) => {
  void (async () => {
    if (request.method === "GET" && request.url === "/v1/models") {
      response.writeHead(200, {"content-type":"application/json"}).end(JSON.stringify({data:[{id:"qa-parent",object:"model"}]}));
      return;
    }
    if (request.method !== "POST" || request.url !== "/v1/responses") { response.writeHead(404).end(); return; }
    const chunks = [];
    for await (const chunk of request) chunks.push(Buffer.from(chunk));
    const body = JSON.parse(Buffer.concat(chunks).toString("utf8"));
    const active = scenario;
    const output = active && body.input?.findLast(item => item.type === "function_call_output" && item.call_id === active.callId)?.output;
    if (output !== undefined) active.receipt = JSON.parse(output);
    if (!active || JSON.stringify(body.input).includes("Generate a concise session title") || active.receipt) {
      writeOpenAiResponsesText(response,{text:active?.receipt?"ACP-PARENT-DONE":"ACP proof",messageId:"msg_"+randomUUID(),responseId:"resp_"+randomUUID()});
      return;
    }
    const item={type:"function_call",id:"fc_"+active.callId,call_id:active.callId,name:"sessions_spawn",arguments:JSON.stringify(active.args)};
    writeOpenAiResponsesSse(response,[
      {type:"response.output_item.added",output_index:0,item:{...item,arguments:""}},
      {type:"response.function_call_arguments.delta",item_id:item.id,output_index:0,delta:item.arguments},
      {type:"response.output_item.done",output_index:0,item},
      {type:"response.completed",response:{id:"resp_"+active.callId,status:"completed",output:[item],usage:{input_tokens:1,output_tokens:1,total_tokens:2}}},
    ]);
  })().catch(error => { providerErrors.push(error); if (!response.headersSent) response.writeHead(500); response.end(); });
});
await new Promise<void>((resolve,reject)=>{provider.once("error",reject);provider.listen(0,"127.0.0.1",resolve);});
const address=provider.address();
assert(address && typeof address!=="string");
const owner=createQaGatewayChild();
let gateway;
const readLog=async(file:string)=>{
  const data=await fs.readFile(file,"utf8").catch(error=>{if(error.code==="ENOENT")return "";throw error;});
  return data.trim().split("\n").filter(Boolean).map(line=>JSON.parse(line));
};
try {
  gateway=await owner.start({repoRoot,providerMode:"mock-openai",providerBaseUrl:`http://127.0.0.1:${address.port}/v1`,transportBaseUrl:`http://127.0.0.1:${address.port}`,primaryModel:"mock-openai/qa-parent",alternateModel:"mock-openai/qa-parent",controlUiEnabled:false,enabledPluginIds:["acpx"],
    mutateConfig(cfg){return {...cfg,
      memory:{...cfg.memory,search:{...cfg.memory?.search,enabled:false}},
      agents:{...cfg.agents,ownership:"explicit",defaults:{...cfg.agents?.defaults,systemAgent:{agentId:"qa"}},entries:{...cfg.agents?.entries,reviewer:{workspace:peerDir,runtime:{type:"acp",acp:{agent:"raw-harness",backend:"acpx"}}}}},
      acp:{enabled:true,dispatch:{enabled:true},defaultAgent:"reviewer",backend:"acpx",allowedAgents:["raw-harness"]},
      session:{...cfg.session,threadBindings:{enabled:true,spawnSessions:true}},
      channels:{...cfg.channels,[channelId]:{enabled:true,accounts:{"bot-alpha":{enabled:true},"bot-beta":{enabled:true}}}},
      bindings:[{type:"route",agentId:"reviewer",match:{channel:channelId,accountId:"bot-alpha"}},{type:"route",agentId:"qa",match:{channel:channelId,accountId:"bot-beta"}}],
      plugins:{...cfg.plugins,allow:[...(cfg.plugins?.allow??[]),channelId],load:{paths:[pluginDir]},entries:{...cfg.plugins?.entries,[channelId]:{enabled:true},acpx:{enabled:true,config:{
        probeAgent:"raw-harness",stateDir:path.join(fixtureRoot,"acpx-state"),cwd:peerDir,permissionMode:"deny-all",nonInteractivePermissions:"deny",pluginToolsMcpBridge:false,openClawToolsMcpBridge:false,
        nativeAgents:{opencode:false,qwen:false,pi:false,kilocode:false,copilot:false},piSessionCatalog:{enabled:false},agents:{"raw-harness":{command:process.execPath,args:[adapterPath,peerDir,"raw-harness"]}},
      }}}},tools:{...cfg.tools,toolSearch:{enabled:false}},
    };},
  });
  const parentKey="agent:qa:dashboard:alias-account-parent";
  const accepted=await gateway.call("agent",{agentId:"qa",sessionKey:parentKey,message:"Spawn the default ACP alias in a child thread.",channel:channelId,replyChannel:channelId,accountId:"bot-beta",replyAccountId:"bot-beta",to:"channel:parent-room",replyTo:"channel:parent-room",deliver:false,idempotencyKey:randomUUID()},{timeoutMs:60000});
  assert.equal(accepted.status,"accepted");
  const parentResult=await gateway.call("agent.wait",{runId:accepted.runId,timeoutMs:120000},{timeoutMs:125000});
  assert.equal(parentResult.status,"ok");
  const receipt=scenario.receipt;
  assert(receipt,"parent model must observe actual sessions_spawn receipt");
  console.log(JSON.stringify({phase:"default-alias-tool-result",toolArgs,receipt}));
  assert.equal(receipt.status,"accepted");
  assert.equal(receipt.inlineDelivery,true);
  assert.match(receipt.childSessionKey,/^agent:reviewer:acp:/);
  const childResult=await gateway.call("agent.wait",{runId:receipt.runId,timeoutMs:60000},{timeoutMs:65000});
  assert.equal(childResult.status,"ok");
  const identity=await gateway.call("qa-acp-account-proof.identity",{sessionKey:receipt.childSessionKey});
  const channels=await readLog(channelEventsPath);
  const external=await readLog(eventsPath);
  console.log(JSON.stringify({phase:"default-alias-account-evidence",identity,channels,external}));
  const binding=channels.find(event=>event.phase==="thread-bound" && event.record.targetSessionKey===receipt.childSessionKey);
  assert(binding,"actual session-binding adapter must bind the child");
  assert.equal(binding.record.conversation.accountId,"bot-alpha");
  assert.equal(binding.input.conversation.accountId,"bot-alpha");
  assert.equal(binding.record.metadata.agentId,"reviewer");
  const delivered=channels.filter(event=>event.phase==="outbound" && event.text.includes("ACP-STDIO-CHILD-OK"));
  assert(delivered.length>0,"actual channel outbound must deliver the ACP child reply");
  assert(delivered.every(event=>event.accountId==="bot-alpha" && event.threadId===binding.record.conversation.conversationId && event.to==="channel:parent-room"));
  assert.equal(identity.meta.agent,"raw-harness");
  assert.equal(identity.meta.backend,"acpx");
  assert.equal(identity.entry.spawnedBy,parentKey);
  assert(external.some(event=>event.method==="session/prompt/result" && event.harness==="raw-harness" && event.pid!==gateway.pid));
  assert.deepEqual(providerErrors,[]);
  console.log(JSON.stringify({phase:"PASS",contract:"default-alias-account",requesterAccount:"bot-beta",ownerAccount:"bot-alpha",ownerAgent:"reviewer",harness:"raw-harness"}));
} catch(error) {
  if(gateway)console.error(gateway.logs());
  console.error(JSON.stringify({phase:"channel-proof-failure",channels:await readLog(channelEventsPath),external:await readLog(eventsPath)}));
  throw error;
} finally {
  const stopped=await owner.stop();
  provider.closeAllConnections();
  await new Promise<void>((resolve,reject)=>provider.close(error=>error?reject(error):resolve()));
  const external=await readLog(eventsPath);
  const alive=[...new Set(external.map(event=>event.pid))].filter(pid=>{try{process.kill(pid,0);return true;}catch(error){if(error.code==="ESRCH")return false;throw error;}});
  console.log(JSON.stringify({phase:"cleanup",errors:stopped.errors.map(String),aliveAdapterPids:alive}));
  if(!stopped.errors.length&&!alive.length)await fs.rm(fixtureRoot,{recursive:true,force:true});
  assert.deepEqual(stopped.errors,[]);assert.deepEqual(alive,[]);
}

Raw sessions_spawn ACP targets like "codex" were minted and dispatched
as agent:codex:acp:*, so the gateway rejected them as unknown agents.
Keep the harness as ACP runtime identity and mint/dispatch under the
configured requester or explicit OpenClaw alias. Resume requires
requester, backend, and persisted ACP runtime identity to match.
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M labels Oct 8, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 8, 2026, 5:36 AM ET / 09:36 UTC (Revision 7).

ClawSweeper review

What this changes

Separate an ACP child's OpenClaw owner from its external coding harness while preserving authorized historical resumes and owner-based channel routing.

Example: Spawn an ACP task targeting raw-harness from agent qa

  • Before: The child uses agent:raw-harness:acp:… and dispatch fails with Unknown agent id "raw-harness".
  • After: The child uses agent:qa:acp:… and the external harness completes the task with ACP-STDIO-CHILD-OK:1.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, correct repair with production-boundary proof, compatibility coverage, and no remaining blocking finding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): Exact-head terminal traces and fully inspected fixtures exercise real Gateway sessions_spawn, bundled ACPX, and a separate stdio ACP process: raw spawning succeeds, authorized history loads, forbidden and stale-source resumes cause no new external operations, and default reviewer alias binding/delivery uses bot-alpha instead of requester bot-beta. Synthetic external adapters do not claim vendor authentication coverage. Released-format historical state remains readable with nonempty history intact and no schema or existing-history rewrite.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An agent cannot start an external ACP coding harness unless that harness also happens to be configured as an OpenClaw agent.
Reason: The linked issue describes a concrete failure in an existing supported workflow. Prior ACP area ownership and the recorded cleanup direction support the bounded repair, including historical resume preservation.

Merge readiness

✅ Ready for maintainer review

This PR remains necessary and now has sufficient real behavior proof. The previous account-routing proof gap is resolved, and no blocking patch defect remains.

Priority: P1
Reviewed head: a01c04c77d6eb086c514cc3163b430cb28420ec0

Before merge

None.

Findings

None.

Provenance

  • src/agents/subagents/spawn/acp-spawn.ts: child ownership and dispatch: original intent not found (unknown: Path history was inspected, but git log -S could not retrieve required historical blobs because the promisor fetch returned HTTP 403; the original introduction remains unknown.)
  • src/agents/subagents/spawn/acp-spawn-runtime.ts: pre-initialization session read: original intent not found (unknown: File history was inspected, but unavailable historical blobs prevented establishing the introducing rationale for the redundant synchronous read.)
Agent review details

How this fits together

ACP connects OpenClaw agents to external coding harnesses. The spawn path selects the session owner, workspace, channel account, and resume authority before initializing the external harness and dispatching the task.

flowchart TD
 A[Agent requests ACP task] --> B[Resolve harness and OpenClaw owner]
 B --> C[Select owner workspace and channel account]
 B --> D[Check current resume authority]
 C --> E[Initialize external harness]
 D --> E
 E --> F[Dispatch child task]
 F --> G[Deliver reply through owner account]
Loading

Technical review

Best possible solution:

Keep owner selection in the existing spawn path and resume authorization at the manager's initialization boundary, preserving historical access until a separately verified Doctor cutover.

Do we have a high-confidence way to reproduce the issue?

Yes: current-main source still assigns the raw harness as the child owner, and the supplied real Gateway comparison records Unknown agent id "raw-harness" on pinned main. This read-only review did not execute a current-main reproduction.

Is this the best way to solve the issue?

Yes: separating owner and harness in the existing orchestration path repairs the identity error without adding configuration or a competing dispatcher, and the updated proof covers historical resumes and distinct owner/requester accounts.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against bd23988e2b9d.

Provenance checked

  • src/agents/subagents/spawn/acp-spawn-target.ts: explicit and default alias resolution keeps the original intent (465043c: The introducing PR separates inferred harness ownership from explicit agent selection and scopes backend identity to its owner.)
  • src/acp/runtime/session-meta-resume.ts and resume authorization keeps the original intent (0237767: Replace full-session scans with indexed worker reads while preserving requester, backend, lifecycle, duplicate ordering, and live-caller checks.)
  • src/agents/subagents/spawn/acp-spawn-requester.ts: channel account selection keeps the original intent (c39314c: Cross-agent children should use the target agent's bound account while same-agent children retain the caller's active account.)
  • src/agents/subagents/spawn/acp-spawn-parent-stream.ts: diagnostic store selection keeps the original intent (930bd38: Persist diagnostic batches through the canonical per-agent worker writer with captured ownership and shutdown settlement.)

Testing

Proof path: shipped entry point. Added test files: 5.

Security

None.

Evidence

What I checked:

  • Current main still needs the fix: Fetched main still passes the external target as the OpenClaw owner. None of the introduced production paths changed between the pinned merge base and fetched main; the additional ACP changes concern unrelated translator tests. (src/agents/subagents/spawn/acp-spawn.ts:246, bd23988e2b9d)
  • Owner and harness separation: The introduced diff uses the configured alias or requester for session creation, workspace, registration, dispatch, diagnostics, and cleanup while passing the external harness separately to runtime initialization. (src/agents/subagents/spawn/acp-spawn.ts:247, a01c04c77d6e)
  • Final-effect resume authorization: Resume ownership is reread after manager preparation, and its synchronous guard runs immediately before runtime.ensureSession. The scoped subscription fences source changes and expires retained callbacks in finally. (src/acp/control-plane/manager.initialize-session.ts:66, a01c04c77d6e)
  • Exact-head real Gateway and ACP proof: The body records real Gateway → bundled ACPX → separate stdio-process execution on the reviewed head. Raw spawning and authorized session/load succeed; foreign requester and wrong harness produce zero new/load/prompt operations; reassigned and deleted sources produce zero stale-spawn operations. Both complete fixtures were inspected as text and were not executed by this review. (a01c04c77d6e)
  • Previous rank-up move satisfied: The complete default-alias fixture drives a real agent RPC and sessions_spawn without an explicit agentId. Its observed binding and outbound reply use bot-alpha for owner reviewer rather than requester bot-beta, with ACP-STDIO-CHILD-OK:1 delivered into the bound thread. Synthetic adapters establish the production routing boundary; vendor authentication is not claimed. (a01c04c77d6e)
  • Proof source identity: The supplied body identity is SHA-256 dcfa042529645fe30d2e6030ffe379e3072df1cf93c3b0b5cd32164f9593b7ee. REST reads covered the omitted evidence, command, and fixture ranges; the historical fixture explicitly reproduces released-format state rather than running a published binary. (a01c04c77d6e)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • lukeboyett: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

PR surface

Source +79, Tests +377, Docs +10. Total +466 across 19 files.

View PR surface stats
Area Files Added Removed Net
Source 11 196 117 +79
Tests 6 483 106 +377
Docs 2 14 4 +10
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 19 693 227 +466

Review metrics

Metric Value Why it matters
Production growth justification production net +79 lines; tests/support net +377 lines The added scoped authority lifetime preserves released resume access and fences source changes while removing duplicated resolution and synchronous reads.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #138580
Summary: This PR is the candidate repair for the linked raw-harness ownership issue; the broader alias/Doctor draft is not a merged replacement.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 message-delivery: Current PR review selected no merge-risk labels.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P1: The existing ACP agent workflow rejects raw external harness targets during Gateway dispatch.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (6 earlier review cycles)
  • reviewed 2026-10-08T02:36:24.251Z sha ec7caaf :: needs real behavior proof before merge. :: [P1] Read the runtime identity from authoritative ACP metadata | [P1] Preserve access to previously recorded resume sessions | [P2] Use the configured owner for stream diagnostic storage
  • reviewed 2026-10-08T02:56:48.717Z sha 4fc03f9 :: needs real behavior proof before merge. :: [P1] Preserve access to previously recorded resume sessions
  • reviewed 2026-10-08T06:37:25.634Z sha f58877c :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-08T07:07:36.564Z sha ce6a03f :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-08T08:13:56.379Z sha ce6a03f :: blocked before merge. :: [P1] [P1] Resolve channel accounts through the configured ACP owner
  • reviewed 2026-10-08T08:46:30.547Z sha a01c04c :: needs real behavior proof before merge. :: none

Canonical session entries omit acp, so resume now reads and rechecks
acp_sessions.agent instead of the stripped entry. Parent-stream
diagnostics use the OpenClaw owner store, not the harness id.
@saariuslystoned

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Follow-up on 4fc03f9e189: resume authorization now reads and rechecks indexed acp_sessions.agent instead of stripped canonical acp. Parent-stream diagnostics use the OpenClaw owner store. Worker fixture no longer embeds acp on the canonical entry.

Legacy harness-owned recovery is intentionally deferred to the Doctor cutover in #136165. Live Gateway/ACP harness proof is still not in this PR.

@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

steipete and others added 2 commits October 7, 2026 23:20
Keep historical harness-owned resume records accessible under the existing requester, backend, and harness checks. Revalidate source authority after preparation and fence source changes until runtime initialization. Resolve configured default targets through the same alias owner as explicit targets.

Original fix by @saariuslystoned; maintainer cleanup and authority regression coverage.

Co-authored-by: saariuslystoned <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: L and removed size: M labels Oct 8, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 8, 2026
Pass typed resume revalidation from spawn into manager initialization, preserving source-change fencing without ambient authority. Resolve configured-alias thread binding and inline delivery through the OpenClaw owner, including default aliases, and cover distinct owner/requester accounts.
@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 8, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 8, 2026
@steipete
steipete merged commit 4e7a4aa into openclaw:main Oct 8, 2026
160 checks passed
@steipete

steipete commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 9, 2026
…penclaw#166908)

* fix: keep raw ACP harness ids off OpenClaw session ownership

Raw sessions_spawn ACP targets like "codex" were minted and dispatched
as agent:codex:acp:*, so the gateway rejected them as unknown agents.
Keep the harness as ACP runtime identity and mint/dispatch under the
configured requester or explicit OpenClaw alias. Resume requires
requester, backend, and persisted ACP runtime identity to match.

* fix: authorize ACP resume from indexed runtime identity

Canonical session entries omit acp, so resume now reads and rechecks
acp_sessions.agent instead of the stripped entry. Parent-stream
diagnostics use the OpenClaw owner store, not the harness id.

* fix(acp): preserve resume ownership through runtime initialization

Keep historical harness-owned resume records accessible under the existing requester, backend, and harness checks. Revalidate source authority after preparation and fence source changes until runtime initialization. Resolve configured default targets through the same alias owner as explicit targets.

Original fix by @saariuslystoned; maintainer cleanup and authority regression coverage.

Co-authored-by: saariuslystoned <[email protected]>

* test(acp): use inferred deferred gate types

* test(acp): type the bound spawn fixture accurately

* refactor(acp): use the initialized session entry for spawn

* fix(acp): pass resume authority and route through the owner account

Pass typed resume revalidation from spawn into manager initialization, preserving source-change fencing without ambient authority. Resolve configured-alias thread binding and inline delivery through the OpenClaw owner, including default aliases, and cover distinct owner/requester accounts.

---------

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: saariuslystoned <[email protected]>
gshpychka added a commit to gshpychka/realm that referenced this pull request Oct 12, 2026
acp-raw-harness-owner.patch backports OpenClaw's fix for raw ACP harness
spawns (openclaw/openclaw#166908): a sessions_spawn with agentId "claude"
creates its session under the agent that asked for it, which the gateway
accepts as a known agent. The configured `claude` agent goes away, so
sessions belong to the agent that starts them. Such a session starts in
that agent's workspace when given no cwd, so the Claude Code skill always
passes one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LNTt5yXBj4uDUwJmPGvXLd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ACP raw external target is used as the OpenClaw session owner

2 participants