Add customAgentDirectories session config option - #2362
Draft
timrogers wants to merge 1 commit into
Draft
Conversation
This comment has been minimized.
This comment has been minimized.
timrogers
force-pushed
the
timrogers-custom-agent-directories
branch
from
August 19, 2026 20:20
e58349c to
6d4af83
Compare
This comment has been minimized.
This comment has been minimized.
Add a `customAgentDirectories` option to the session config across all six SDK languages, mirroring the existing `instructionDirectories` / `skillDirectories` passthrough options. It accepts a list of directory paths that the CLI searches for custom agent definition files, forwarded on both session create and resume. - nodejs: SessionConfigBase.customAgentDirectories + create/resume forwarding - go: SessionConfig/ResumeSessionConfig + request structs + forwarding - python: create_session/resume_session custom_agent_directories param - dotnet: SessionConfig.CustomAgentDirectories + Clone + create/resume/update - java: SessionConfig/ResumeSessionConfig + request builders - rust: SessionConfig::with_custom_agent_directories + create/resume wire Unit tests verify the option is forwarded on the session.create and session.resume JSON-RPC requests in every language. End-to-end tests (with handcrafted replay-proxy snapshots) additionally assert that a custom agent placed in a `customAgentDirectories` path is discovered by the CLI and surfaced in the task tool's `agent_type` enum, on both create and resume. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d4c94c34-dda4-49a1-b876-687fc771d0e0
timrogers
force-pushed
the
timrogers-custom-agent-directories
branch
from
August 19, 2026 20:34
6d4af83 to
1eddcfb
Compare
Contributor
✅ Cross-SDK Consistency ReviewThis PR adds Coverage
API Naming ConsistencyNaming follows each language's conventions correctly:
All SDKs forward the option on both No consistency issues found. The PR maintains full feature parity across all six SDK implementations.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
customAgentDirectoriesoption to the session config across all six SDK languages (Node/TS, Go, Python, .NET, Java, Rust), mirroring the existinginstructionDirectories/skillDirectoriespassthrough options. It accepts a list of directory paths that the CLI searches for custom agent definition files (*.agent.md), forwarded on both session create and resume.Per language:
SessionConfigBase.customAgentDirectories+ create/resume forwardingSessionConfig/ResumeSessionConfig+ request structs + forwardingcreate_session/resume_sessioncustom_agent_directoriesparamSessionConfig.CustomAgentDirectories+Clone+ create/resume/updateSessionConfig/ResumeSessionConfig+ request buildersSessionConfig::with_custom_agent_directories+ create/resume wireWhy
Callers need a way to point the CLI at additional directories containing custom agent definitions, consistent with the existing skill and instruction directory options. This closes that gap in the SDK surface.
Testing
session.createandsession.resumeJSON-RPC requests.test/snapshots/session_config/) additionally assert that a custom agent placed in acustomAgentDirectoriespath is discovered by the CLI and surfaced in the task tool'sagent_typeenum, on both create and resume.