Skip to content

docs: fix EnableConfigDiscovery summary to accurately describe agent discovery behavior - #2019

Open
smz202000 wants to merge 2 commits into
github:mainfrom
smz202000:fix/enable-config-discovery-doc
Open

docs: fix EnableConfigDiscovery summary to accurately describe agent discovery behavior#2019
smz202000 wants to merge 2 commits into
github:mainfrom
smz202000:fix/enable-config-discovery-doc

Conversation

@smz202000

Copy link
Copy Markdown

Summary

Fixes #1887

The previous documentation for EnableConfigDiscovery incorrectly stated that custom instruction files are "always loaded from the working directory regardless of this setting." In practice, agent files (e.g. .github/agents/) are only discovered when EnableConfigDiscovery is true.

Changes

Updated the XML doc comment on SessionConfig.EnableConfigDiscovery in dotnet/src/Types.cs to:

  1. Clarify that agent discovery is gated by EnableConfigDiscovery
  2. Reference SkipCustomInstructions as the independent control for instruction file loading

Before:

/// <para>
/// Custom instruction files (.github/copilot-instructions.md, AGENTS.md, etc.)
/// are always loaded from the working directory regardless of this setting.
/// </para>

After:

/// <para>
/// Agent discovery (e.g. .github/agents/) is only performed when this is
/// true. Use SkipCustomInstructions to control
/// loading of custom instruction files independently.
/// </para>

…discovery behavior

The previous documentation incorrectly stated that custom instruction files
are always loaded from the working directory regardless of the
EnableConfigDiscovery setting. In practice, agent files (e.g. .github/agents/)
are only discovered when EnableConfigDiscovery is true.

Update the summary to clarify that:
- Agent discovery is gated by EnableConfigDiscovery
- Use SkipCustomInstructions to independently control instruction file loading

Fixes github#1887
@smz202000
smz202000 requested a review from a team as a code owner July 17, 2026 08:07
Replace the per-language doc comments for EnableConfigDiscovery (and its
ResumeSessionConfig equivalent) with a single consistent description:
'Enables runtime discovery of supported configuration. Explicitly
supplied configuration takes precedence over discovered values.'

The previous wording varied by language and, in .NET/Go/Node.js/Python,
incorrectly claimed that custom instruction files are always loaded
regardless of this setting (github#1887) while omitting that agent discovery
is gated by it. Rather than special-casing that one clarification in a
single language, this applies one accurate, artifact-agnostic
description everywhere EnableConfigDiscovery is documented:
dotnet/src/Types.cs, go/types.go (SessionConfig + ResumeSessionConfig),
nodejs/src/types.ts, python/copilot/client.py (create + resume),
rust/src/types.rs (fields + builder methods on both configs), and
java SessionConfig.java/ResumeSessionConfig.java setters.

Files under src/generated/ (Node.js, Java, .NET, Rust, Go rpc/zrpc.go)
are auto-generated from api.schema.json upstream and are intentionally
left untouched.

Fixes github#1887

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EnableConfigDiscovery - Incorrect Behaviour

2 participants