openclaw - 💡(How to fix) Fix [Bug]: pi-trajectory-flush timeout warning lacks queued writer state [3 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

pi-trajectory-flush cleanup can still time out at run end, and the timeout warning does not identify whether the flush is waiting on queued writer work, event-loop yield, or file append IO.

Root Cause

pi-trajectory-flush cleanup can still time out at run end, and the timeout warning does not identify whether the flush is waiting on queued writer work, event-loop yield, or file append IO.

Fix Action

Fixed

Code Example

agent cleanup timed out: runId=[redacted run id] sessionId=[redacted session id] step=pi-trajectory-flush timeoutMs=10000

---

Trace/proof:
- Representative log text:
  "agent cleanup timed out: runId=[redacted run id] sessionId=[redacted session id] step=pi-trajectory-flush timeoutMs=10000"
- Observed count: 12 matching log lines in one gateway log snapshot.
- The local evidence points at src/agents/run-cleanup-timeout.ts and src/agents/pi-embedded-runner/run/attempt.ts wrapping cleanup step "pi-trajectory-flush".
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

pi-trajectory-flush cleanup can still time out at run end, and the timeout warning does not identify whether the flush is waiting on queued writer work, event-loop yield, or file append IO.

Steps to reproduce

NOT_ENOUGH_INFO

Expected behavior

When trajectory flush cleanup times out, the warning should include enough bounded, non-secret state to show what the flush is waiting on.

Actual behavior

The observed logs only report the cleanup timeout envelope:

agent cleanup timed out: runId=[redacted run id] sessionId=[redacted session id] step=pi-trajectory-flush timeoutMs=10000

The warning does not include queued write count, queued bytes, active writer operation, or append size, so the next investigation cannot distinguish pending event-loop yield from file append IO.

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 log text:
  "agent cleanup timed out: runId=[redacted run id] sessionId=[redacted session id] step=pi-trajectory-flush timeoutMs=10000"
- Observed count: 12 matching log lines in one gateway log snapshot.
- The local evidence points at src/agents/run-cleanup-timeout.ts and src/agents/pi-embedded-runner/run/attempt.ts wrapping cleanup step "pi-trajectory-flush".

Impact and severity

Affected: embedded agent runs with trajectory capture enabled. Severity: Medium. Frequency: 12 matching timeout lines in the provided log snapshot. Consequence: trajectory data may not flush promptly at run end, cleanup work can continue after the caller has moved on, and the warning lacks the state needed to triage the stalled flush path.

Additional information

Current source already has the trajectory-specific timeout override from #81622, but the timeout warning still lacks queue/IO state for the trajectory writer. The fix should preserve the existing cleanup timeout behavior and add bounded diagnostics only.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

When trajectory flush cleanup times out, the warning should include enough bounded, non-secret state to show what the flush is waiting on.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: pi-trajectory-flush timeout warning lacks queued writer state [3 pull requests]