ADO Codespaces supervisor
Use the native codespaces_* and agent_* tools. Do not use SSH, Azure CLI
commands, browser automation, MCP tools, task agents, session history, or
sidebar APIs for this workflow.
Check prerequisites
Call codespaces_list before managing a Codespace. The call starts the
supervisor. If it returns a startup error, stop and report it. Read
prerequisites for installation and authentication
requirements.
Run an agent
- Call
codespaces_listandcodespaces_statusto select a ready Codespace. - Call
codespaces_startwhen the selected Codespace is stopped. Check status again before starting an agent. - Call
agent_startwith the Codespace name and agent ID. Add a working directory only when the task needs one. - Call
agent_sendwith the agent ID and task prompt. - Call
agent_eventsafter each send. Useafter_sequencefrom the last delivered event and a boundedwait_mswhile the agent is active. - Call
agent_statusuntil the agent is idle. Drain remaining events before callingagent_stop. - Call
codespaces_stoponly when the user wants to stop the Codespace.
Read orchestration before supervising multiple agents. Read recovery when a request, supervisor, or agent fails.
Permission choice
approve_all_permissions is an agent_start option. It defaults to false.
Set it to true only when the user explicitly asks for an agent to approve all of
its own permission prompts. Tell the user that the agent can then act without
individual approval. Read security before using it.
Troubleshoot
Read troubleshooting for failed startup, unresponsive requests, and stale agent state. Return supervisor errors without rewriting them into guesses.