From dfeae47a174f0f695b651b762e09a7eee9420da7 Mon Sep 17 00:00:00 2001 From: garrytan Date: Thu, 8 Oct 2026 06:15:45 +0000 Subject: [PATCH] docs(openclaw): stop advising a per-spawn env for spawned sessions OpenClaw's sessions_spawn has no env argument (openclaw/openclaw#51654 was closed without adding one), so the documented env: { OPENCLAW_SESSION: "1" } silently did nothing. Point users at the ACP harness or Gateway environment instead and guard the old advice. Adopts #2749. Co-authored-by: DanCanadian <211164803+DanCanadian@users.noreply.github.com> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- docs/OPENCLAW.md | 8 +++++++- test/openclaw-native-skills.test.ts | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/OPENCLAW.md b/docs/OPENCLAW.md index e0bb60ad7..2f1b162bb 100644 --- a/docs/OPENCLAW.md +++ b/docs/OPENCLAW.md @@ -127,7 +127,13 @@ environment variable should be set. gstack detects this and adjusts: rendering prose to nobody - Focuses on task completion and prose reporting -Set the env var in sessions_spawn: `env: { OPENCLAW_SESSION: "1" }` +`sessions_spawn` has no per-spawn environment argument +([openclaw/openclaw#51654](https://github.com/openclaw/openclaw/issues/51654) +was closed without adding one), so an `env` field in the tool call is ignored. +Set `OPENCLAW_SESSION=1` in the environment of the Claude ACP harness or the +Gateway service instead, keep credentials out of that wrapper, and confirm the +variable from inside the spawned process (for example `echo $OPENCLAW_SESSION`) +rather than trusting the session's final message. ### Explicit override: GSTACK_SESSION_KIND diff --git a/test/openclaw-native-skills.test.ts b/test/openclaw-native-skills.test.ts index 009b5e22c..994b9038a 100644 --- a/test/openclaw-native-skills.test.ts +++ b/test/openclaw-native-skills.test.ts @@ -32,4 +32,9 @@ describe('OpenClaw native skills', () => { expect((parsed.description as string).length).toBeGreaterThan(0); } }); + + test('integration docs do not advertise an unsupported per-spawn env', () => { + const content = fs.readFileSync(path.join(ROOT, 'docs/OPENCLAW.md'), 'utf-8'); + expect(content).not.toContain('env: { OPENCLAW_SESSION'); + }); });