Skip to content

[Bug]: Orchestrator cannot see live task timing and falsely cancels active background tasks #1031

Description

@ProphetOfDoom-PoD

What happened, and what did you expect?

What happened:
With oh-my-opencode-slim 2.2.14, an orchestrator canceled an active background writer as “45+ minutes without liveness.” The actual task lifetime was 10m 29s. Slim’s task-session-manager log recorded 176 consecutive busy observations and lastLiveBusyAt only 10 seconds before the parent-initiated cancellation.

The parent-facing Background Job Board and orchestrator-wake reminder did not expose elapsed time, last_live_busy_at, or idle duration. The wake text was static, so the parent inferred a stall incorrectly and issued cancel_task. The child session was then deleted after abort, removing its normal inspectable history.

Expected:
The parent should receive actual per-task elapsed and liveness metadata. A task with recent busy activity should not be presented as plausibly stalled without an explicit warning. Canceled child-session history should remain inspectable or be archived.

This was not an OpenCode automatic timeout: cancellation was explicitly parent-initiated.

Steps to reproduce

  1. Use oh-my-opencode-slim 2.2.14 with default orchestrator-wake settings and no wallClockTimeoutMs override.
  2. Start a background task that spends 10–12 minutes reading/searching files or invoking tools without editing files.
  3. Let the orchestrator-wake reminder fire.
  4. Observe that parent-visible task information contains no elapsed time, last activity timestamp, or idle duration.
  5. Cancel the task while the task-session-manager still records recent busy activity.
  6. Observe that cancellation deletes the child session history.

Observed incident:

  • task created: 2026-08-15T09:42:17Z
  • last busy observation: 2026-08-15T09:52:36Z
  • parent cancellation: 2026-08-15T09:52:46Z
  • claimed stall duration: “45+ minutes”

oh-my-opencode.json

{
  "preset": "omniroute-hybrid"
  // No orchestratorWake or wallClockTimeoutMs override.
}

OpenCode version

1.18.13

oh-my-opencode-slim version

2.2.14

Operating system

Windows

Logs, screenshots, or extra context

Sanitized task-session-manager evidence:

2026-08-15T09:52:36.474Z:
busy/status busy observed
sessionID=ses_ffb330710...
updatedLastLiveBusyAt=1786787556474

2026-08-15T09:52:46.480Z:
cancel-task request received
requested=ses_ffb330710...
state=running
cancellationRequested=false

The task-session-manager had no runtime-stopped, terminalized, or stalled event before cancellation. Cancellation was initiated by the parent, then the child session was deleted.

Related reports/PRs:
- #941 (canceled-task history deletion)
- #998 (false cancellation during fallback)
- #1018 (premature task shutdown)

Requested changes:
- expose started_at, elapsed, last_live_busy_at, and idle_for to the parent;
- warn before canceling a recently-live task;
- preserve/archive canceled child-session history.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions