Describe the bug
I am observing two anomalous behaviors with content my sessionStart hooks inject into the session:
- Every single prompt I submit reinjects (duplicates) the same additionalContext prior to my first message. Confirmed via
/context as well as analysis of AIC and tokens consumed, and a minimal repro plugin.
- Subagents get the additionalContext prepended, which is new behavior (at some point, not sure which version). This is not a subagentStart hook, it's sessionStart.
My sessionStart is about 1k tokens right now which means every single prompt gets an additional 1k token rider repeating itself in the transcript, and it's also tuned to the top level session and I don't want it in subagent contexts.
Affected version
1.0.82
Steps to reproduce the behavior
- Create a sessionStart hook that injects ~1k tokens of lorem ipsum + a canary phrase via
additionalContext
- Load the hook in an otherwise blank session
- Say "hi", invoke
/context, observe the expected ~1k tokens
- Take two more turns "hi: respond ACK"; "hi again: respond ACK"
/context, observe ~2k additional message tokens more than expected based on the short turns
Unzip attachment for a standalone repro; run copilot with --plugin-dir pointing at it and follow steps in the README.
sessionstart-context-replay-repro.zip
Expected behavior
sessionStart context is injected once; no additional compounding cost is paid per turn other than that flat set of tokens at the start of the conversation.
sessionStart context is not propagated to subagents.
Additional context
No response
Describe the bug
I am observing two anomalous behaviors with content my
sessionStarthooks inject into the session:/contextas well as analysis of AIC and tokens consumed, and a minimal repro plugin.My sessionStart is about 1k tokens right now which means every single prompt gets an additional 1k token rider repeating itself in the transcript, and it's also tuned to the top level session and I don't want it in subagent contexts.
Affected version
1.0.82
Steps to reproduce the behavior
additionalContext/context, observe the expected ~1k tokens/context, observe ~2k additional message tokens more than expected based on the short turnsUnzip attachment for a standalone repro; run copilot with
--plugin-dirpointing at it and follow steps in the README.sessionstart-context-replay-repro.zip
Expected behavior
sessionStart context is injected once; no additional compounding cost is paid per turn other than that flat set of tokens at the start of the conversation.
sessionStart context is not propagated to subagents.
Additional context
No response