Recurring task resume ownership errors after #1216 fix; lease owner unclear
Summary
I continue to encounter this task-resume error frequently:
Task CHILD cannot be resumed safely: its current generation is already owned by another lifecycle operation. Do not launch a duplicate with the same task_id.This is a follow-up to #1216, which is closed as completed. Maintainer comments there say #1217 and #1222 shipped fixes in v2.2.22. I previously reported recurrence in a September 29 comment on that issue: https://github.com/alvinunreal/oh-my-opencode-slim/issues/1216#issuecomment-5888362428
The earlier observation was that repeated delegation/resume failures eventually led the orchestrator to perform the work itself. I am filing this follow-up to help distinguish a remaining lease problem from a legitimate in-flight conflict or orchestration misuse. The runtime lease owner was not captured, so this report does not establish that the previous bug has regressed.
Environment and version qualifications
Collected on October 1, 2026:
- Platform: macOS / Darwin.
- Local CLI:
opencode --versionreports 1.18.34. This is the installed CLI version, not independent proof of the version used by the affected running host. - User plugin registration:
oh-my-opencode-slim(unversioned). - Cached package under
packages/oh-my-opencode-slim@latest/node_modules/oh-my-opencode-slim: 2.2.25. - A separate older cache under
packages/oh-my-opencode-slim/node_modules/oh-my-opencode-slim: 2.2.8. - Multiplexer configuration:
type: auto.
Loaded-version limitation: both cached copies exist. The exact reported error is present in the inspected 2.2.25 bundle and was not found in the 2.2.8 bundle, but the running process's loaded plugin version was not independently established. Cache presence alone should not be treated as proof of the loaded version.
Sanitized incident evidence
A bounded local plugin-log inspection for the affected designer child recorded this timeline (UTC, October 1):
| Time | Observed event |
|---|---|
| Before 09:37:29 | Child running; two permission waits opened and resolved. |
| 09:37:29.294 | Terminal state dispatched: generation 3, state completed. |
| 09:37:29.294 | Terminal published with attribution transcript. |
| 09:37:39.002 | Terminal job injected into the parent for reconciliation: generation 3, terminal revision 1. |
| 09:37:53.235 | Injected terminal job reconciled. |
The user-observed resume rejection references this child. However, the bounded plugin-log results did not contain the rejection itself or identify which operation held its lease. The timing of the rejection relative to the table above is unconfirmed. Permission waits are context, not an asserted cause.
Source observations from the cached 2.2.25 bundle
Read-only inspection of dist/index.js found:
- At lines 34300 and 34330–34339, the task hook resolves a reusable/recoverable task, attempts
acquireRelaunchLease, and emits the exact error when acquisition returns no lease. - At lines 28393–28405, acquisition rejects either a stored/requested generation mismatch or an existing entry in
liveLeases. - Lease kinds include
cancellation,relaunch,message, andterminal-notification. - At lines 35881–35926, terminal-notification delivery holds a lease around its local transport wait and releases it in
finally. - At lines 34541–34545, normal resumed-task after-hook cleanup releases the relaunch lease.
These observations explain the guard, but do not identify the owner during this occurrence. In particular, the error message presents both generation mismatch and existing ownership as the same condition.
Expected behavior
- Legitimate concurrent lifecycle operations should remain fenced; please do not disable the safety guard.
- After a task is completed/reconciled and no lifecycle operation remains active, it should be resumable.
- When resume is refused, diagnostics should distinguish a generation mismatch from a held lease and identify the lease kind/operation and its age, without exposing private transcript contents or lease tokens.
Reproduction status / requested investigation
This is a recurring incident report, not a deterministic reproducer. We have not proven that retries occur only after reconciliation or that a lease is leaked.
Could maintainers advise:
- Which supported read-only diagnostic captures the active lease kind, acquisition age, board state, and generation at the moment of this error?
- Whether there are known remaining cases after #1217/#1222 involving terminal-notification, relaunch, message, or cancellation leases?
- How to verify the plugin version actually loaded by a running host when both unversioned and
@latestpackage caches exist?
No configuration changes, package updates, lifecycle interventions against the affected child, or debugger attachment were performed during this investigation. Raw session IDs, private prompts, project details, and absolute local paths are omitted.
Source: alvinunreal/oh-my-opencode-slim