Skip to content

Evaluate: Steering and follow-up message queues for ADF agent interaction #687

@AlexMikhalev

Description

@AlexMikhalev

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

  1. Is real-time steering valuable for ADF? Current agents run autonomously. Would "stop, do this instead" improve outcomes for long-running tasks?
  2. 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.
  3. Does the Agent SDK support steering? Check if query() accepts mid-stream prompts or if it requires session resume.
  4. 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

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions