-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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
--resumeenables 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
- Map ADF agent interaction points where steering would add value
- Assess Agent SDK capabilities for mid-stream interaction
- Design: how would steering/follow-up integrate with the reconciliation loop?
- Decision: implement (via Agent SDK migration or subprocess protocol), defer to Agent SDK migration, or reject
Dependencies
- Agent SDK evaluation (if steering requires in-process agent loop)
- Phase 2: Session persistence for Claude Code agents in ADF #639 Session persistence for Claude Code agents in ADF
References
- Pi steering/follow-up: https://github.com/badlogic/pi-mono/tree/main/packages/agent (see "Steering and Follow-up" section)
- ADF reconciliation loop: terraphim-ai/crates/terraphim_orchestrator
- Agent SDK sessions: knowledge/claude-agent-sdk-reference.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request