You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Session-scoped default /opencode:result and /opencode:cancel selection #31
/opencode:status is scoped to the current Claude session, but implicit /opencode:result and /opencode:cancel are not. In a multi-session workspace, one Claude session can hide another session's running jobs in status but still cancel or display them through the implicit default selection path.
Local evidence
handleStatus() passes { sessionId } to buildStatusSnapshot(...).
handleResult() calls resolveResultJob(state.jobs ?? [], ref) without session filtering.
handleCancel() calls resolveCancelableJob(state.jobs ?? [], ref) without session filtering.
The underlying helpers in plugins/opencode/scripts/lib/job-control.mjs also do not accept a session-id option.
Expected behavior
With no explicit job id, result and cancel should use the same current-session visibility rules as status.
If the current session has no matching job, implicit result/cancel should say so rather than selecting another session's job.
Explicit result <job-id> and cancel <job-id> can remain cross-session precision operations.
Suggested fix
Filter jobs by getClaudeSessionId() in handleResult() and handleCancel() only when ref is omitted. Keep exact/prefix explicit references searching all jobs.
Add tests for:
status hides another session's jobs.
implicit cancel does not cancel another session's running job.
implicit result does not show another session's latest finished job.
explicit job-id lookup still works across sessions.
changed the title [-]Implicit /opencode:result and /opencode:cancel ignore Claude session scoping[/-][+]Session-scoped default /opencode:result and /opencode:cancel selection[/+]on Apr 12, 2026
Consolidating #45 here. The canonical scope is session-aware implicit job selection for both result and cancel, while preserving explicit job-id lookup as a cross-session override.
Fixed by PR #51 commit 260d84b — resolveCancelableJob now filters default target by sessionId; explicit ref still searches all active jobs. handleResult and handleCancel similarly scope.
Activity
[-]Implicit /opencode:result and /opencode:cancel ignore Claude session scoping[/-][+]Session-scoped default /opencode:result and /opencode:cancel selection[/+]JohnnyVicious commentedon Apr 12, 2026
Consolidating #45 here. The canonical scope is session-aware implicit job selection for both result and cancel, while preserving explicit job-id lookup as a cross-session override.
JohnnyVicious commentedon Apr 12, 2026
Fixed by PR #51 commit 260d84b — resolveCancelableJob now filters default target by sessionId; explicit ref still searches all active jobs. handleResult and handleCancel similarly scope.