Skip to content

feat: multi-agent team workflow — state persistence and structured handoff patterns#10

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/configure-agentic-ide-for-teams
Draft

feat: multi-agent team workflow — state persistence and structured handoff patterns#10
Copilot wants to merge 2 commits intomainfrom
copilot/configure-agentic-ide-for-teams

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 23, 2026

When running agent teams in OpenCode, workflow context gets lost between Task dispatches because sub-agents receive no state, no history, and no downstream awareness — they answer locally and break cohesion.

Changes

New skill: .opencode/skills/agent-team-workflow/SKILL.md

Four concrete patterns to eliminate thread loss:

  • State file — create .workflow-state.md at step 0, update before/after every dispatch. Single source of truth for resuming interrupted workflows.
  • Structured handoff — every Task call must include: global context, completed-steps summary, scoped mission, and a "what comes after you" paragraph that prevents arbitrary downstream-breaking micro-decisions.
  • OpenCode config — permission archetypes per role (orchestrator: write: deny + task: allow; builders: write: allow), model assignment, primary vs subagent mode rules.
  • Recovery — ready-to-use prompts to resume from a state file or reconstruct state when none exists.

Updated: agents/devtools/episode-orchestrator.md

  • Adds mandatory Step 0 (create .workflow-state.md) directly in the identity paragraph
  • New Thread continuity decision branch: mark IN-PROGRESS before dispatch, capture output after, resume from state file on interruption
  • Rewrites the dispatch example to include the full context block — global context + completed steps + "what comes after you"
  • Quality gate now enforces state file creation and full context in every dispatch

Dispatch format (before → after)

Before — minimal, no thread context:

**Context:** We're adding user notification preferences.
**Deliverable:** Migration file creating notification_preferences table...

After — full context block preventing thread loss:

### Global context
Project: Adding user notification preferences. Stack: Node/Express + PostgreSQL + React.
State file: .workflow-state.md (step 2 of 4).

### What is already done
- Step 1 (postgres-pro): db/migrations/20260223_add_notification_preferences.sql
  Schema: notification_preferences — FK users.id CASCADE, JSON channels...

### What comes after you
Step 3 (frontend-dev) will build the settings UI from your API contract.
Be explicit about the response shape — include field names and types.
Original prompt

comment je peux configurer mon ide agentic pour lancer des teams d'agent efficacement. souvent quand je lance une team avec un agent et des sous agents, le fil du workflow se perd.
Analyse et propose moi

…or state management

- New skill .opencode/skills/agent-team-workflow/SKILL.md: explains why workflow
  threads get lost and provides 4 concrete patterns (state file, structured handoff,
  OpenCode config, recovery)
- Update agents/devtools/episode-orchestrator.md: add Step 0 state file creation,
  Thread continuity decision branch, structured dispatch example with global context
  block and "what comes after you" section, updated quality gate

Agent-Logs-Url: https://github.com/dmicheneau/opencode-template-agent/sessions/89d4e8e4-4ed9-4cd1-a3b3-9387ba80a7df

Co-authored-by: dmicheneau <47741512+dmicheneau@users.noreply.github.com>
Copilot AI changed the title [WIP] Configure Agentic IDE for effective team launches feat: multi-agent team workflow — state persistence and structured handoff patterns Apr 23, 2026
Copilot AI requested a review from dmicheneau April 23, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants