mirror of
https://github.com/openai/codex.git
synced 2026-04-24 22:54:54 +00:00
1.8 KiB
1.8 KiB
Agent Handoff Workflow
This document explains the multi-agent handoff pattern used for task development and commits
in the agentydragon workspace. It consolidates shared guidance so individual agent prompts
do not need to repeat these details.
1. Developer Agent
- Scope: Runs inside a sandboxed git worktree for a single task branch (
agentydragon-<ID>-<slug>). - Actions:
- If the task’s Status is
Needs input, stop immediately and await further instructions; do not implement code changes or run pre-commit hooks. - Update the task Markdown file’s Status to
Donewhen implementation is complete. - Implement the code changes for the task.
- Run
pre-commit run --files $(git diff --name-only)to apply and stage any autofix changes. - Do not run
git commit.
- If the task’s Status is
2. Commit Agent
- Scope: Runs in the sandbox (read-only
.git) or equivalent environment. - Actions:
- Emit exactly one line to stdout: the commit message prefixed
agentydragon(tasks):summarizing the task’s Implementation section. - Stop immediately.
- Emit exactly one line to stdout: the commit message prefixed
3. Orchestrator
- Scope: Outside the sandbox with full Git permissions.
- Actions:
- Stage all changes:
git add -u. - Run
pre-commit run --files $(git diff --name-only --cached). - Read the commit message and run
git commit -m "$MSG".
- Stage all changes:
4. Status & Launch
- Use
agentydragon_task.py statusto view tasks (including those in.done/). - Summaries:
- Merged: tasks with no branch/worktree.
- Ready to merge: tasks marked Done with branch commits ahead.
- Unblocked: tasks with no outstanding dependencies.
- The script also prints a
agentydragon/tools/create_task_worktree.py --agent --tmux <IDs>command for all unblocked tasks.
This guide centralizes the handoff workflow for all agents.