Skip to content

Hosted agent ops

This chapter collects runtime contracts that only become obvious when the CLI is viewed as a hosted coding-agent worker: job environment variables, hosted settings construction, GitHub MCP defaults, OIDC token exchange, feature gates, diagnostics, debug bundles, OpenTelemetry, firewall logs, trajectory output, and shutdown behavior.

Read this chapter when the question is: how does the same agent runtime behave inside a hosted GitHub/coding-agent job, and which operational surfaces control or observe it?

Source-anchor policy

This page is a chapter guide. Linked implementation pages carry concrete app.js anchors.

Semantic aliasMinified anchorScope
Hosted agent ops chapterN/A — navigation pageGroups hosted-agent environment contracts, MCP/OIDC bootstrap, feature gates, diagnostics, debug bundles, OTel switches, support artifacts, and shutdown.
Hosted implementation pagesSee linked source-anchor tablesConcrete bundle anchors live in the destination pages.

Hosted operations map

flowchart TD
Env[Hosted env vars] --> Settings[Settings envelope]
Settings --> MCP[Default GitHub MCP policy]
Settings --> Model[Model/provider config]
Settings --> Validation[Validation toggles]
MCP --> OIDC[OIDC token injection]
Settings --> Gates[Feature gates]
Settings --> Logs[Events/logs/trajectory]
Logs --> Diagnostics[Diagnostics and debug bundles]
Logs --> OTel[OpenTelemetry]
Firewall[Firewall JSONL] --> Trajectory[Trajectory/final output]
OTel --> Shutdown[Shutdown and flush]
Diagnostics --> Redaction[Redaction boundary]
click Env "./hosted-agent-environment/" "Open hosted agent environment"
click Gates "./feature-gates/" "Open feature gates"
click Diagnostics "./diagnostics-feedback-debug-bundles/" "Open diagnostics"
click Redaction "./debug-bundle-redaction-boundaries/" "Open redaction boundaries"
click OTel "./telemetry-update-and-shutdown/" "Open observability and shutdown"

Primary reading order

OrderPageHosted/runtime question answered
1Hosted agent environmentWhich COPILOT_AGENT_* settings, MCP/OIDC bootstrap values, OTel switches, firewall logs, trajectory outputs, and managed-agent SDK watchpoints are real runtime surfaces?
2Feature gates and rollout logicHow do static gates, env/settings overrides, remote experiments, repo/team allowlists, and MCP permission gates affect behavior?
3Diagnostics, feedback, and debug bundlesHow do /diagnose, /feedback, /bug, /collect-debug-logs, local archives, and secret gist uploads work?
4Debug bundle and redaction boundariesWhat can enter a diagnostic bundle, which redaction layers apply, and where support-sharing caveats remain?
5Telemetry, update, and shutdownHow are logging, telemetry, OpenTelemetry, update/version behavior, debug artifacts, signal handling, and graceful shutdown coordinated?

Operational boundaries

BoundaryPrimary pageNotes
Hosted settings constructionHosted agent environmentTWe() turns job/env state into a settings envelope.
Default hosted MCP policyHosted agent environment and MCP host, transports, and toolsHosted defaults overlay generic MCP host behavior.
Redaction and support artifactsDebug bundle and redaction boundariesDebug bundles are operational artifacts, not guaranteed clean-room exports.
Runtime telemetryTelemetry, update, and shutdownOTel can be enabled by Copilot-specific or standard OTLP env vars.

Handoffs

Created and maintained by Yingting Huang.