Skip to content

Ephemeral steps get uninterpolated {{ steps.* }} prompts; sandbox failures surface generic error #274

Open

Description

@jameswnl

Two bugs found verifying the lightspeed-stack harness demo against a110214, both in the local-runner sandbox path:

1. spawn:ephemeral steps receive the raw, uninterpolated prompt template

graph_translator interpolates {{ steps.X.output.Y }} into StepInput.prompt/system_prompt before dispatch. DirectExecutor (spawn:none) and SubprocessExecutor (spawn:local) use those fields. But SandboxExecutor.run() passes only step_input.raw_step into run_step, and _run_step_inner builds the sandbox request from step.get("prompt") / step.get("instructions") — the raw step dict — so the sandboxed agent receives the literal {{ steps.triage_result.output.root_cause }} text.

Evidence (same run, same template, same stored state with root_cause present in Postgres):

  • triage-remediate-none-demo (spawn:none): remediate engaged the expanded root cause ✓
  • triage-remediate-demo (spawn:ephemeral): remediate replied "the placeholder didn't get expanded" ✗

Calling interpolate() directly against the stored run state resolves fine, confirming the mechanism is OK — only the plumbing drops the interpolated fields. The Temporal path is unaffected (it interpolates at the workflow level and writes the result back into the step dict).

2. Sandbox agent failures surface as generic "agent returned success=false"

The sandbox app reports agent failures in summary (RunResponse(success=False, summary=...)), not error. _run_step_inner's failure path reads only data.get("error", "agent returned success=false"), dropping the real cause. Reproduced live: with the mock MCP server scaled to zero, agent-ephemeral returned the generic error; the sandbox's own log showed Failed to connect to MCP server 'kubectl-mcp' — which never reached the caller.

Fix on the way from the harness-uie-demo-1 fork branch: pass step_input.prompt/system_prompt through run_step's input dict (raw-step fallback preserved for direct callers), and fall back to summary in the error path.

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