Skip to content

Engine sidecar floods the node log with the raw model event stream #128

Description

@AbirAbbas

What happens

With the coding engine enabled, the supervised sidecar's entire stdout — the raw
per-token/per-tool event stream — is relayed into the node's own log file with a
[pro-engine] prefix.

Measured on a single trivial build (add one function + one test) against a local
control plane:

  • ~/.agentfield/logs/swe-planner.log reached 6.1 MB in ~30 minutes
  • of the first 2,144 lines, 1,987 were message.part.delta events (~93%)
  • individual lines run to several KB each, since tool events embed full file
    contents, diffs and reasoning traces

Why it matters

  • af logs swe-planner and AgentField Desktop's log view are unreadable — the
    handful of lines an operator actually needs (startup, engine acknowledgement,
    dispatch, outcome) are buried under streaming deltas.
  • Log growth is unbounded and proportional to token throughput, not to events
    worth recording. A long-running node on a busy repo will fill a disk.
  • The same content is already delivered to the control plane as structured DAG
    nodes (turns, tool calls, notes), so this is duplicate storage of data that
    has a better home.

Suggested fix

Filter what the supervisor relays rather than passing the child's stdout
through verbatim. Roughly, in increasing order of effort:

  1. Drop message.part.delta (and other high-frequency streaming event types)
    from the relay entirely — they carry no operator value once the turn's
    result is recorded.
  2. Relay only lifecycle lines: serve/registration, per-task start and outcome,
    errors and warnings.
  3. Put the full stream behind a debug switch (e.g. SWE_PRO_LOG_STREAM=1) for
    when someone genuinely needs to debug the engine.

Environment

  • SWE-AF main @ 4237beb, engine enabled by default via af install
  • AgentField v0.1.122
  • Linux, OpenRouter-only configuration

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