Prompt file imported from galarzafrancisco/ai-monorepo (
.codex/prompts/start-task.md). Copyright stays with the author.
description: Your goal is to pick up a task and work on it, taking it all the way from "not started" to "done". argument-hint: [TASK_ID=] [ROLE=]
Input
- TASK_ID: id of the task to work on
- ROLE: who is picking up the task (dev, reviewer, pm etc). Usually dev.
Your AGENT_NAME will be codex-{$ROLE}. For example, codex-dev.
Workflow
Prep
- Get a session ID:
.codex/scripts/workflow/start_session.sh - Fetch the task using MCP tool
mcp.tasks.get_task - Prepare the local environment
.codex/scripts/workflow/start_task.sh {AGENT_NAME} {SESSION_ID} {TASK_ID} {TASK_NAME}where TASK_NAME is a branch-safe-short-name you make up based on the task - Assign the task to yourself using the MCP tool
mcp.tasks.mark_task_in_progresswith the {TASK_ID} {AGENT_NAME} {SESSION_ID} and {BRANCH_NAME}
Work
- Get instructions for your role from
.codex/roles/{ROLE}.md(for example,.codex/roles/dev.md) - Implement & make frequent comments to the task
Finish
- Open PR to
agents/mainby running.codex/scripts/workflow/open_pr_to_agents_main.sh "PR Title" "PR Body"-- you will get a link to the PR. - Mark task as in review by calling the MCP tool
mcp.tasks.mark_task_for_reviewwith {TASK_ID} {AGENT_NAME}, {PR_LINK} - Watch CI
- If CI passed:
- Merge pull request
- Update task - done & comment saying CI passed by calling the MCP tool
mcp.tasks.mark_task_donewith {TASK_ID} {AGENT_NAME} {COMMENTS}.
- If CI Failed:
- Put the task back to in progress with a comment explaining the failure by using the MCP tool
mcp.tasks.mark_task_needs_workwith {TASK_ID} {AGENT_NAME} {COMMENTS} - Start work again
- When done, checkout
agents/mainand pull