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
Require separate opt-ins for managed harness, voice, and long-running invocation in the Foundry agents extension. All three previews are off by default. Ordinary hosted and plain prompt agents work without an opt-in.
The checks use the process-only flags from #10683 and stay inside the agents extension, without SDK or core API changes.
Prompt agents using microsoft_copilot_preview or legacy github_copilot_preview
AZD_ALPHA_ENABLE_AGENTS_MANAGED_HARNESS
agents.voice
Voice / prompt-voice agents and hosted voice bridges advertising invocations_ws
AZD_ALPHA_ENABLE_AGENTS_VOICE
agents.long_running
Starting background Responses invocations with --long-running / --no-wait
AZD_ALPHA_ENABLE_AGENTS_LONG_RUNNING
Check explicit inputs and selected agent definitions in init, invocation, optimization, endpoint updates, and package/publish/deploy. Apply the same checks to inline definitions, $ref files, staged templates, and lifecycle hooks.
Reject disabled explicit inputs before avoidable authentication or project writes. Keep argument validation first and use Responses as the --no-prompt default.
Hide disabled preview options in help and init pickers. Root help still lists all switches; metadata and shell completion keep the full command tree.
Keep show, endpoint discovery, invocation show/follow/cancel, delete, and down available with flags off.
Add regression coverage for independent opt-ins, early validation, init, and read/cleanup paths. Update help snapshots, docs, and five scenario definitions.
Compatibility
Set the matching variable to true before running azd. The evaluator uses strconv.ParseBool; false, missing, empty, and invalid values leave the feature off. The old AZD_FOUNDRY_EXT_ENABLE_* variables and config keys such as alpha.<ID> and alpha.all do not enable these previews. Core alpha behavior is unchanged.
The evaluator reads only the process environment. Values azd injects from the selected environment count and can override the same variable inherited from the shell. The evaluator does not load config or environment files itself.
Validation
Passed with Go 1.26.4:
go test ./internal/featureflags ./internal/project ./internal/cmd -count=1
go build ./... in the agents module
go vet ./internal/featureflags ./internal/project ./internal/cmd
Scoped golangci-lint, formatting, whitespace, and spelling checks also passed. The five scenario files passed parsing and structural checks. The scenario runner was unavailable, so those scenarios were not run.
E2E
Scenario
Expected
Result
azd ai agent init --help with all preview flags off
Hides --voice, prompt-voice, and harness surfaces
Pass
azd ai agent invoke --help with all preview flags off
Hides --long-running, --no-wait, and voice sections
Pass
azd ai agent init --kind prompt-voice or init --voice with flags off
Refuses with agents.voice
Pass
azd ai agent init --kind prompt --harness microsoft_copilot_preview with flags off
Refuses with agents.managed_harness
Pass
azd ai agent invoke --long-running with flags off
Refuses with agents.long_running
Pass
AZD_ALPHA_ENABLE_AGENTS_VOICE=true alone, then init --help
Voice surfaces return. Harness and long-running still refuse
Pass
AZD_ALPHA_ENABLE_AGENTS_MANAGED_HARNESS=true alone, then harness init
Passes the harness gate. Voice and long-running still refuse
Pass
AZD_ALPHA_ENABLE_AGENTS_LONG_RUNNING=true alone, then invoke --help
Shows --long-running and --no-wait. Voice stays hidden
Pass
azd ai agent --help
Still lists Preview Feature Switches and the three AZD_ALPHA_ENABLE_* keys
Pass
Agents list-alpha
Not present on this head
N/A
Enforcement limits
Calls using an explicit HTTP --agent-endpoint do not look up the remote definition, so they cannot enforce the managed-harness flag. The long-running check still applies. Text invoke does not accept voice WebSocket endpoints.
Template catalogs do not include capability metadata. Templates remain visible, but their staged definitions are checked before adoption.
These checks do not intercept generic requests from evaluations or routines, and do not migrate saved state.
Azure Pipelines:
Successfully started running 1 pipeline(s).
25 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.
Hui Miao (huimiu)
changed the title
feat: gate Hosted Agent path with IsFeatureEnabled
feat: gate Hosted Agent path with extension feature flags
Oct 21, 2026
Hui Miao (huimiu)
changed the title
feat: gate Hosted Agent path with extension feature flags
feat: gate Foundry agent previews independently
Oct 21, 2026
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
One or more issues must be addressed before approval.
No open issues 🎉
What changed in this PR
Adds independent opt-ins for managed harness, voice, and long-running Foundry agent features, including centralized enforcement and help visibility controls.
Changes:
Adds command, service, lifecycle, and definition-level feature gates.
Updates help output, README/spec documentation, and interactive scenarios.
Adds extensive unit, integration, and snapshot coverage.
The httptest handler runs on the server goroutine, so require.* calls here invoke FailNow off the test goroutine and can terminate the handler without reliably failing the test (or leave the client with an EOF). Record the request method/path/body in the handler and assert those values after executeRoot returns on the test goroutine.
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
ext-agentsazure.ai.agents extensionext-foundrymicrosoft.foundry meta package or Foundry/AI extensions overall. Not individual extension issues.
5 participants
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.
Summary
Require separate opt-ins for managed harness, voice, and long-running invocation in the Foundry agents extension. All three previews are off by default. Ordinary hosted and plain prompt agents work without an opt-in.
The checks use the process-only flags from #10683 and stay inside the agents extension, without SDK or core API changes.
Fixes #10659
Changes
agents.managed_harnessmicrosoft_copilot_previewor legacygithub_copilot_previewAZD_ALPHA_ENABLE_AGENTS_MANAGED_HARNESSagents.voiceinvocations_wsAZD_ALPHA_ENABLE_AGENTS_VOICEagents.long_running--long-running/--no-waitAZD_ALPHA_ENABLE_AGENTS_LONG_RUNNING$reffiles, staged templates, and lifecycle hooks.--no-promptdefault.Compatibility
Set the matching variable to
truebefore running azd. The evaluator usesstrconv.ParseBool; false, missing, empty, and invalid values leave the feature off. The oldAZD_FOUNDRY_EXT_ENABLE_*variables and config keys such asalpha.<ID>andalpha.alldo not enable these previews. Core alpha behavior is unchanged.The evaluator reads only the process environment. Values azd injects from the selected environment count and can override the same variable inherited from the shell. The evaluator does not load config or environment files itself.
Validation
Passed with Go 1.26.4:
go test ./internal/featureflags ./internal/project ./internal/cmd -count=1go build ./...in the agents modulego vet ./internal/featureflags ./internal/project ./internal/cmdScoped golangci-lint, formatting, whitespace, and spelling checks also passed. The five scenario files passed parsing and structural checks. The scenario runner was unavailable, so those scenarios were not run.
E2E
azd ai agent init --helpwith all preview flags off--voice,prompt-voice, and harness surfacesazd ai agent invoke --helpwith all preview flags off--long-running,--no-wait, and voice sectionsazd ai agent init --kind prompt-voiceorinit --voicewith flags offagents.voiceazd ai agent init --kind prompt --harness microsoft_copilot_previewwith flags offagents.managed_harnessazd ai agent invoke --long-runningwith flags offagents.long_runningAZD_ALPHA_ENABLE_AGENTS_VOICE=truealone, theninit --helpAZD_ALPHA_ENABLE_AGENTS_MANAGED_HARNESS=truealone, then harnessinitAZD_ALPHA_ENABLE_AGENTS_LONG_RUNNING=truealone, theninvoke --help--long-runningand--no-wait. Voice stays hiddenazd ai agent --helpAZD_ALPHA_ENABLE_*keyslist-alphaEnforcement limits
--agent-endpointdo not look up the remote definition, so they cannot enforce the managed-harness flag. The long-running check still applies. Text invoke does not accept voice WebSocket endpoints.