Add vendor-neutral GSTACK_SPAWNED_SESSION marker for spawned mode - #2381
Open
harikanthl wants to merge 1 commit into
Open
Add vendor-neutral GSTACK_SPAWNED_SESSION marker for spawned mode#2381harikanthl wants to merge 1 commit into
harikanthl wants to merge 1 commit into
Conversation
…ed mode Spawned/autonomous mode (auto-choose, no AskUserQuestion, completion report) was reachable only via OPENCLAW_SESSION. Any orchestrator that runs gstack headlessly (e.g. `claude -p` workers) needs the same behavior, but setting another tool's env var is a semantic hack. Add GSTACK_SPAWNED_SESSION as a vendor-neutral opt-in, recognized in the same two places as OPENCLAW_SESSION: - bin/gstack-session-kind: top-precedence spawned signal (alongside OPENCLAW). - preamble emission: SPAWNED_SESSION: true when either marker is set. OPENCLAW_SESSION keeps working unchanged. Adds a session-kind test; regenerates SKILL.md docs (freshness check). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
GSTACK_SPAWNED_SESSIONas a vendor-neutral way to opt a session into gstack's spawned/autonomous mode (auto-choose the recommended option, noAskUserQuestion, end with a completion report).Why
Today spawned mode is reachable only via
OPENCLAW_SESSION. Any AI orchestrator that runs gstack headlessly — e.g. a harness spawningclaude -pworkers — needs the exact same behavior, becausegstack-session-kindotherwise classifies those sessions asinteractive(the degrade-safe default) and the skills stall at the firstAskUserQuestiongate with no human to answer. Setting another tool's env var (OPENCLAW_SESSION) to get there is a semantic hack.Change
Recognized in the same two places as
OPENCLAW_SESSION, mirroring the existing pattern:bin/gstack-session-kind— top-precedence spawned signal, alongsideOPENCLAW_SESSION.scripts/resolvers/preamble/generate-preamble-bash.ts— emitsSPAWNED_SESSION: truewhen either marker is set.scripts/resolvers/preamble/generate-spawned-session-check.ts— docs the new knob in the spawned-session prose.OPENCLAW_SESSIONbehavior is unchanged. Regenerated the SKILL.md docs so the freshness check passes.Testing
bun test test/gstack-session-kind.test.ts— added a case forGSTACK_SPAWNED_SESSION → spawned(incl. top-precedence over headless/host markers). 10/10 pass.bun test test/auq-error-fallback-hook.test.ts— 13/13 pass (unchanged).