Expose and serialize allowAllMcpServerInstructions in TypeScript SDK
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- api, testing-qa
Research direction
Start with dist/types.d.ts and dist/client.js, then trace the generated RPC types and the CopilotClient.createSession() request path, including resume or update handling. Use the same non-allowlisted MCP server fixture for side-by-side tests and wire-level assertions. Done means omitted and false keep the canary hidden while true exposes it, with tools available in every case.
Written by the indexing model from the issue text.
Description
Problem
The Copilot runtime protocol supports allowAllMcpServerInstructions, but TypeScript SDK 1.0.11 does not provide a working SessionConfig path for it.
The generated RPC types contain the field, and the runtime describes it as including instructions from every MCP server instead of only allowlisted servers. However:
dist/types.d.tsdoes not expose it onSessionConfigBase.CopilotClient.createSession()indist/client.jsdoes not serialize it into thesession.createrequest.- A consumer adding the property at runtime therefore has no effect.
This prevents evaluation harnesses and other SDK consumers from explicitly testing or enabling instructions from a non-allowlisted MCP server.
Controlled reproduction
A one-turn probe used a temporary MCP server whose unique canary existed only in server-level initialization instructions. The tool description did not contain the canary, and the prompt prohibited tool calls.
- Stock SDK: agent returned
NO_MCP_INSTRUCTION_CANARY(18,924 tokens, 1 turn, 0 tool calls). - Consumer supplied
allowAllMcpServerInstructions: truewithout changing SDK serialization: same negative result. - Temporary SDK wiring that serialized the field into
session.create, together with the consumer option: agent returned the exact instruction canary (19,028 tokens, 1 turn, 0 tool calls).
This isolates the missing SDK forwarding from model variance and MCP tool selection.
Requested behavior
- Add
allowAllMcpServerInstructions?: booleanto the public TypeScript session configuration shared by create/resume paths as appropriate. - Serialize it to the runtime request and ensure resumed or updated sessions honor the same policy.
- Preserve the secure default: omitted or
falsemust continue to exclude instructions from non-allowlisted servers.
Required side-by-side tests
Please cover both policy states using the same non-allowlisted MCP server fixture:
- Disallowed: omitted and explicit
falsedo not expose the server instruction canary. - Allowed: explicit
trueexposes the exact canary. - The server's tools remain available in both states, proving the assertion concerns instruction visibility rather than MCP startup.
- Wire-level tests assert both
falseandtrueare serialized correctly where supplied.
The allow/disallow behavior should remain explicit rather than changing the default globally.
- Dominant language
- Java
- Stars
- 10.5k
- Forks
- 1.5k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 131
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/copilot-sdk
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/copilot-sdk#2709 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
github/copilot-sdk#2673 ·
-
bug testing
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
github/copilot-sdk#2628 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/copilot-sdk#2627 · 1 comment ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
github/copilot-sdk#2493 ·
All issues in github/copilot-sdk
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
elastic/gradle-plugins#157 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cryptomator/hub#497 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
johanhaleby/occurrent#1120 ·