Skip to content

spawnInteractive == spawnAgent in process-spawner, but interactive (broker-PTY) steps have weaker completion guarantees — unify or document #14

Description

@khaliqgant

Summary

In `dist/process-spawner.js`, `spawnAgent` and `spawnInteractive` are implemented identically — both `runCommand(buildAgentCommand(agent, task))`, and `buildCommand` (~line 21) always uses `definition.nonInteractiveArgs(...)`. So at the process-spawner layer there is no behavioral difference between a worker and an interactive agent.

Yet interactive agents in practice run via a broker-PTY-backed path (`agent-relay-broker pty --agent-name ...`) whose completion detection is the flaky one (see the owner-completion issue), while `interactive: false` agents go through spawnAgent and reliably complete on process exit.

Ask

  • Document the two execution backends (process-spawner vs broker-PTY) and where step-executor routes each (`if (agent.interactive === false) spawnAgent else spawnInteractive`).
  • Give the broker-PTY interactive path the SAME completion guarantee as the process-exit path, or unify them.
  • If spawnInteractive is meant to differ from spawnAgent, make it actually differ + documented; the dead-identical methods are currently misleading.

Evidence

step-executor.js routes on `agent.interactive === false`; process-spawner.js methods are byte-identical; coordinator.js/channel-messenger.js exclude `interactive:false` agents from message edges. The observed reliability gap is NOT explained by process-spawner — it lives in the broker-PTY path used for interactive agents.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions