-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
Description
Bug
The Copilot SDK documents additionalContext as a valid return field from onSessionStart hooks (docs). However, the Copilot CLI v1.0.8 ignores the return value entirely.
Evidence
In the CLI's bundled source, the sessionStart hook invocation is fire-and-forget — no variable assignment, so the result (including additionalContext) is discarded. Compare with userPromptSubmitted which captures modifiedPrompt, and postToolUse which captures modifiedResult.
Repro
- Create an extension with onSessionStart returning { additionalContext: 'test' }
- Start a session and ask the agent if it sees 'test' in its context
- Agent says NO
Impact
Extensions wanting to inject boot-time context (knowledge graphs, project metadata, etc.) cannot use the documented additionalContext mechanism. Workaround: cache context in onSessionStart, inject via onUserPromptSubmitted modifiedPrompt.
Environment
- CLI: v1.0.8
- OS: Windows 11
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.