Skip to content

Foreground channel turns can silently leave WIP after timeout or supersession #85068

Description

@mrclawfield

Bug: foreground channel turns can silently leave WIP after timeout/supersession

Summary

Long-running foreground channel sessions can end before completing a multi-step coding/release task, leaving local filesystem changes behind without a terminal user-visible report. In observed cases, Taskdash/outcome supervision showed the session as timeout/interrupted/error, while no detached worker remained active and the project repo was left dirty, unverified, uncommitted, and unshipped.

This creates a reliability gap for serious work because the user sees neither a clean completion report nor a clear "partial WIP left behind" report.

Environment

  • OpenClaw package: 2026.5.18
  • Channel: Telegram direct chat
  • Work type: multi-step coding/release flow with file edits, build/test/archive/upload phases
  • Execution shape: foreground direct session, not a detached task/controller

Observed Behavior

  1. User asks for a multi-phase app implementation/release task from a direct Telegram chat.
  2. Assistant starts foreground work and edits project files.
  3. The foreground turn times out or is superseded before verification/release/reporting.
  4. No active worker/task remains.
  5. Project repo is left with modified files.
  6. Taskdash/outcome supervisor reports timeout/interrupted/error, but the user does not receive a reliable terminal message explaining that work is partial and unverified.

Example post-incident state:

  • No active worker/release process.
  • Dirty worktree with multiple modified files.
  • Initial requested edits partially applied.
  • git diff --check may pass, but no build/test/archive/upload was completed.
  • No commit/push/final report was produced.

Expected Behavior

OpenClaw should prevent this from looking like a completed or vanished task. Preferably one or more of:

  • If a foreground session performed file writes or long-running tool work and then ends as timeout/interrupted/superseded, create an explicit action-debt incident.
  • Send a best-effort user-visible report such as: "The foreground turn ended before completion; worktree has WIP; no verification/release was completed."
  • Mark Taskdash state as partial_wip or equivalent instead of only generic timeout/interrupted/error.
  • Provide a first-class "detached controller required" warning or auto-handoff for direct-channel tasks that include multi-step coding plus release/upload work.
  • Preserve enough metadata to show changed repo path, dirty files count, last successful verification, and whether any background worker is still alive.

Why This Matters

For agentic coding, a silent foreground timeout is worse than a normal failure: it can leave code changed but unverified, then the user has to ask another agent to reconstruct whether anything is still running and what state the repo is in.

Suggested Fix Direction

  • Add a direct-session finalizer/supervisor rule keyed on:
    • session ended as timeout/interrupted/superseded,
    • file-edit/tool-write activity occurred,
    • no explicit terminal report was sent,
    • optional dirty git worktree or known workdir.
  • Emit a user-visible partial-state notification and Taskdash classification.
  • For direct channel requests that are likely to outlive a foreground turn, provide an automatic or strongly recommended detached controller pattern with checkpoint messages.

Privacy

This report intentionally omits private project names, repository contents, credentials, Apple/GitHub account details, and user-specific data. The issue is about the OpenClaw session/task lifecycle behavior, not the private app being worked on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions