Why this matters
Background-subagent completion notifications and other injected prompts omit agent/model, which previously fell back to the default agent and dropped provider prompt cache.
Evidence
Tip 8997be2502fe59139aa3e5e3457af8923261c61d (base dev):
- Live:
cd packages/opencode && bun test test/session/prompt.test.ts -t "preserves current session agent|explicit agent switch|preserves the current variant|preserves the parent session model" → 4/4 pass
- Evidence class: BEHAVIORAL
Invariant: omitted fields resolve from the durable session row / last agent-carrying user message; an explicit agent change still adopts that agent's model.
Ask (design, light) — prospective; non-blocking
- Should ACP / external injectors be required to send explicit agent/model instead of relying on this fallback?
- Any case where preserving variant after compaction should intentionally reset?
Fork mirror of a sealed OSS review draft. Not posted upstream.
Why this matters
Background-subagent completion notifications and other injected prompts omit
agent/model, which previously fell back to the default agent and dropped provider prompt cache.Evidence
Tip
8997be2502fe59139aa3e5e3457af8923261c61d(basedev):cd packages/opencode && bun test test/session/prompt.test.ts -t "preserves current session agent|explicit agent switch|preserves the current variant|preserves the parent session model"→ 4/4 passInvariant: omitted fields resolve from the durable session row / last agent-carrying user message; an explicit agent change still adopts that agent's model.
Ask (design, light) — prospective; non-blocking
Fork mirror of a sealed OSS review draft. Not posted upstream.
8997be2502fe59139aa3e5e3457af8923261c61dpackages/opencodebun test test/session/prompt.test.ts -t "…preserves…|explicit agent switch…"→ 4/4 (preserve suite)anomalyco/opencode#46106