Problem
When building multi-agent workflows with custom agents (.agent.md), handoffs always continue in the same chat session. For long, multi-step workflows this causes real problems:
- Context window saturation — By step 5 of a 7-step workflow, the context window is heavily loaded with prior conversation history from steps 1–4. The agent has less effective working memory for the current task.
- No clean separation of concerns — Each step produces file-based artifacts that the next agent reads from disk. The in-memory conversation history is redundant and sometimes contradictory (e.g., earlier drafts that were revised).
- No way to programmatically start a fresh session — Prompt files (
.prompt.md) already encode per-step instructions with the correct agent, model, and tools, but there's no mechanism to invoke them automatically from a handoff or hook.
Real-World Use Case
I maintain azure-agentic-infraops, a multi-agent system with 14 agents spanning a 7-step workflow for Azure infrastructure:
Requirements → Architecture → Design → Governance → IaC Plan → IaC Code → Deploy → As-Built Docs
Each agent writes artifacts to agent-output/{project}/ and the next agent reads them from disk. We have 18 prompt files (/step0-kickoff, /step1-requirements, /step2-architecture, etc.) that perfectly encode each step's agent, model, and instructions. But there's no way to chain them across fresh chat sessions.
By the time we reach Step 5 (IaC Code Generation), the context window has accumulated 4+ prior steps worth of conversation. The code generation agent would perform significantly better with a clean context that only includes its own instructions plus the artifact files on disk.
Proposed Solutions (any of these would work)
Option A: newChat field in handoff schema
Add an optional newChat: boolean field to the handoffs: frontmatter:
handoffs:
- label: "Step 5: Generate Bicep"
agent: 06b-Bicep CodeGen
prompt: "Implement Bicep templates per agent-output/{project}/04-implementation-plan.md"
send: true
newChat: true # ← Opens a new chat session with the target agent
Option B: VS Code command to run a prompt file
Expose a command like copilot.chat.runPrompt that opens a new chat and invokes a specific .prompt.md:
This would also enable hooks (e.g., the Stop lifecycle event) to chain to the next step.
Option C: chat.promptFilesRecommendations with agent awareness
The existing chat.promptFilesRecommendations setting shows prompts when starting a new chat, but it could be smarter — surface the most relevant next prompt based on the last active agent. For example, after 05b-Bicep Planner finishes, a new chat could prominently suggest /step5b-bicep-codegen.
Current Workaround
Users must manually:
- Open a new chat
- Select the correct agent from the picker
- Type
/step5b-bicep-codegen or paste the handoff prompt
This breaks the flow and is error-prone for non-technical users following the workflow.
Environment
- VS Code: 1.111.0
- OS: Linux (dev container) / Windows / macOS
- Copilot Extension: Latest
Problem
When building multi-agent workflows with custom agents (
.agent.md), handoffs always continue in the same chat session. For long, multi-step workflows this causes real problems:.prompt.md) already encode per-step instructions with the correctagent,model, andtools, but there's no mechanism to invoke them automatically from a handoff or hook.Real-World Use Case
I maintain azure-agentic-infraops, a multi-agent system with 14 agents spanning a 7-step workflow for Azure infrastructure:
Each agent writes artifacts to
agent-output/{project}/and the next agent reads them from disk. We have 18 prompt files (/step0-kickoff,/step1-requirements,/step2-architecture, etc.) that perfectly encode each step's agent, model, and instructions. But there's no way to chain them across fresh chat sessions.By the time we reach Step 5 (IaC Code Generation), the context window has accumulated 4+ prior steps worth of conversation. The code generation agent would perform significantly better with a clean context that only includes its own instructions plus the artifact files on disk.
Proposed Solutions (any of these would work)
Option A:
newChatfield in handoff schemaAdd an optional
newChat: booleanfield to thehandoffs:frontmatter:Option B: VS Code command to run a prompt file
Expose a command like
copilot.chat.runPromptthat opens a new chat and invokes a specific.prompt.md:This would also enable hooks (e.g., the
Stoplifecycle event) to chain to the next step.Option C:
chat.promptFilesRecommendationswith agent awarenessThe existing
chat.promptFilesRecommendationssetting shows prompts when starting a new chat, but it could be smarter — surface the most relevant next prompt based on the last active agent. For example, after05b-Bicep Plannerfinishes, a new chat could prominently suggest/step5b-bicep-codegen.Current Workaround
Users must manually:
/step5b-bicep-codegenor paste the handoff promptThis breaks the flow and is error-prone for non-technical users following the workflow.
Environment