Skip to content

[Bug]: Embedded run attempt-dispatch span lacks dispatch subphase detail #82782

@galiniliev

Description

@galiniliev

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Embedded runner startup tracing can report multi-second attempt-dispatch spans without enough subphase detail to identify whether the delay came from workspace setup, prompt assembly, runtime-plan setup, or final dispatch.

Steps to reproduce

NOT_ENOUGH_INFO

Expected behavior

When the embedded runner emits a slow startup summary for phase=attempt-dispatch, the summary should include subspans that identify the first-attempt dispatch setup phases.

Actual behavior

A local trace snapshot contained 7 lines matching attempt-dispatch, including a representative line showing attempt-dispatch:11632ms, but the available evidence did not include enough dispatch subphase detail to isolate the slow setup step.

OpenClaw version

NOT_ENOUGH_INFO

Operating system

NOT_ENOUGH_INFO

Install method

NOT_ENOUGH_INFO

Model

NOT_ENOUGH_INFO

Provider / routing chain

NOT_ENOUGH_INFO

Additional provider/model setup details

NOT_ENOUGH_INFO

Logs, screenshots, and evidence

Trace/proof:
- Representative previous line in this snapshot:
  "[trace:embedded-run] ... attempt-dispatch:11632ms"

Observed count: 7 lines matching "attempt-dispatch".
Likely source: embedded runner attempt dispatch / trace timing.

Impact and severity

Affected users/systems/channels: NOT_ENOUGH_INFO
Severity: Low/Medium observability gap; the observed trace shape makes slow embedded-run dispatch hard to diagnose.
Frequency: 7 observed matching trace lines in the local evidence snapshot.
Consequence: Dispatch latency can add several seconds before the model/tool attempt starts, and the current trace output does not identify the responsible setup subphase.

Additional information

Current code on origin/main emits a startup summary at src/agents/pi-embedded-runner/run.ts for phase=attempt-dispatch, while the lower-level attempt path already has separate prep/core-plugin-tool stage summaries. The bug is the missing breakdown inside the outer first-attempt dispatch region before runEmbeddedAttemptWithBackend starts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.bugSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.maintainerMaintainer-authored PR

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions