Parent Epic
#682 -- Evaluate Pi architectural patterns
Pattern
Pi distinguishes two types of messages sent while the agent is working:
| Queue |
Trigger |
Effect |
| Steering |
Enter while agent runs |
Delivered after current tool completes. Remaining tools skipped. Agent responds to interruption. |
| Follow-up |
Alt+Enter while agent runs |
Delivered only after agent finishes all work. Triggers another turn. |
Both queues are configurable: "one-at-a-time" (waits for response before next) or "all" (delivers all queued at once).
Current State
ADF agent interaction model:
- Agents are subprocesses (claude -p, codex exec) that run to completion
- No mechanism to steer a running agent mid-task
- No follow-up queue -- must wait for agent_end then spawn new process
- The reconciliation loop runs on a 30s tick -- no real-time interaction
- Claude Code's
--resume enables multi-turn but requires process restart
Evaluation Questions
- Is real-time steering valuable for ADF? Current agents run autonomously. Would "stop, do this instead" improve outcomes for long-running tasks?
- How would this work with subprocess agents? Pi's queues work because the agent loop is in-process. ADF spawns external processes. Options: (a) migrate to Agent SDK (in-process), (b) use stdin pipe to subprocess, (c) signals.
- Does the Agent SDK support steering? Check if
query() accepts mid-stream prompts or if it requires session resume.
- Follow-up vs reconciliation loop: ADF's 30s reconciliation tick is a crude follow-up mechanism. Would explicit follow-up queues improve this?
Acceptance Criteria
Dependencies
References
Parent Epic
#682 -- Evaluate Pi architectural patterns
Pattern
Pi distinguishes two types of messages sent while the agent is working:
Both queues are configurable:
"one-at-a-time"(waits for response before next) or"all"(delivers all queued at once).Current State
ADF agent interaction model:
--resumeenables multi-turn but requires process restartEvaluation Questions
query()accepts mid-stream prompts or if it requires session resume.Acceptance Criteria
Dependencies
References