fix: honor lightContext in spawned subagents (#62264) (thanks @theSamPadilla)

* Add lightContext support for spawned subagents

* Clarify and guard lightContext usage in sessions_spawn

* test: guard sessions_spawn lightContext acp misuse

* fix: honor lightContext in spawned subagents (#62264) (thanks @theSamPadilla)

---------

Co-authored-by: Jaz <jaz@bycrux.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
This commit is contained in:
Sam Padilla
2026-04-07 00:35:45 -05:00
committed by GitHub
parent 7240830ca4
commit f1b7dd6c0a
10 changed files with 103 additions and 0 deletions
+2
View File
@@ -473,6 +473,8 @@ export function runAgentAttempt(params: {
lane: params.opts.lane,
abortSignal: params.opts.abortSignal,
extraSystemPrompt: params.opts.extraSystemPrompt,
bootstrapContextMode: params.opts.bootstrapContextMode,
bootstrapContextRunKind: params.opts.bootstrapContextRunKind,
internalEvents: params.opts.internalEvents,
inputProvenance: params.opts.inputProvenance,
streamParams: params.opts.streamParams,
+4
View File
@@ -85,6 +85,10 @@ export type AgentCommandOpts = {
lane?: string;
runId?: string;
extraSystemPrompt?: string;
/** Bootstrap workspace context injection mode for this run. */
bootstrapContextMode?: "full" | "lightweight";
/** Run kind hint for bootstrap context behavior. */
bootstrapContextRunKind?: "default" | "heartbeat" | "cron";
internalEvents?: AgentInternalEvent[];
inputProvenance?: InputProvenance;
/** Per-call stream param overrides (best-effort). */