Describe the bug
I have multiple sessionStart/subagentStart hooks, and each of them prints {"additionalContext":"some value"} to stdout. I observed, that only the last emitted value is actually injected into the context. I validated this by simulating this with 2 synthetic hooks that inject different things and then asking the agent about them (or telling it to spawn a sub-agent and ask it). In all cases, only one of the two values is known to the agent.
To be clear, the hooks are all called (I validated this by adding an echo <hook_name> >> /tmp/test.txt to each hook), so the problem is not that only one of them is run. All are run, but only the last output is injected.
Affected version
GitHub Copilot CLI 1.0.56.
Steps to reproduce the behavior
- Define multiple
sessionStart/subagentStart hooks that each print additionalContext to stdout
- Start a new copilot instance
- Ask it about both the injected contexts.
Expected behavior
If multiple hooks return additional context, they should all be concatenated.
Additional context
No response
Describe the bug
I have multiple sessionStart/subagentStart hooks, and each of them prints
{"additionalContext":"some value"}to stdout. I observed, that only the last emitted value is actually injected into the context. I validated this by simulating this with 2 synthetic hooks that inject different things and then asking the agent about them (or telling it to spawn a sub-agent and ask it). In all cases, only one of the two values is known to the agent.To be clear, the hooks are all called (I validated this by adding an
echo <hook_name> >> /tmp/test.txtto each hook), so the problem is not that only one of them is run. All are run, but only the last output is injected.Affected version
GitHub Copilot CLI 1.0.56.
Steps to reproduce the behavior
sessionStart/subagentStarthooks that each printadditionalContextto stdoutExpected behavior
If multiple hooks return additional context, they should all be concatenated.
Additional context
No response