You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add enableOnDemandInstructionDiscovery to all SDK SessionConfig types
Mirrors the existing enableConfigDiscovery and remoteSession precedents
(PRs #1044 and #1295). Exposes the SDK option that lets the runtime
discover custom instruction files on demand after the agent reads or
views files, complementing the existing up-front load of
`.github/copilot-instructions.md`, `AGENTS.md`, etc.
Wire key (camelCase, identical across all 5 SDKs):
enableOnDemandInstructionDiscovery
Type shapes:
Node enableOnDemandInstructionDiscovery?: boolean
Python enable_on_demand_instruction_discovery: bool | None = None
Go EnableOnDemandInstructionDiscovery *bool
.NET bool? EnableOnDemandInstructionDiscovery
Rust Option<bool> with #[serde(skip_serializing_if = "Option::is_none")]
Wire semantics: when set, the wire payload carries the literal value
(including explicit `false`); when omitted, the key is dropped.
Applies to both session.create and session.resume so callers can
toggle the setting on a resumed session.
Runtime-gated. The runtime honors the option only when custom
instructions are enabled and the connected runtime supports on-demand
custom instruction discovery; otherwise the option is accepted but
no-ops. The SDK does not attempt to detect the runtime gate. Requires
@github/copilot ^1.0.49-1 (the runtime change shipped in
github/copilot#7759).
Security: discovered instruction files are treated as model
instructions and may be stored or replayed with session history.
Docstrings caution against enabling for untrusted content, CI jobs
processing untrusted forks, or directories writable by untrusted
users or processes.
Go shape note: uses *bool (not bool) so consumers can disable a
previously-enabled session on resume. Reuses the precedent already
set by EnableSessionTelemetry *bool and IncludeSubAgentStreamingEvents
*bool. Does not retrofit the existing EnableConfigDiscovery bool field
(that would be a separate breaking source change).
Tests: each SDK adds tests for the new field on both create and
resume, asserting that explicit `false` is serialized as `false` and
that omission drops the key from the payload. Mirrors the test
patterns already in place for enable_session_telemetry,
include_sub_agent_streaming_events, and enable_config_discovery.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments