Goal: Make pi automatically integrate with the task system so agents claim tasks, update status, and log work.
pi --task t-123 # Claims task, loads context, updates status on completion
Simple bash wrapper that:
1. Runs task show <id> --json to get context
2. Prepends task description to user prompt
3. Runs pi with augmented prompt
4. On exit, updates task status based on exit code
Pros: Simple, no pi modifications needed Cons: Can't update status mid-task, no task awareness in agent
Use pi's skill or hook system to: 1. Load task context on startup 2. Provide task-aware tools to agent 3. Update status during work
Pros: Deeper integration Cons: Need to understand pi extension points
task as an MCP server that pi connects to
Pros: Standard protocol Cons: More infrastructure
Start with Option A (wrapper), iterate to B if needed.
pi-task t-123 claims task, shows context, works on it