Skip to content

fix(run-continuation): dedupe background markers by root session#5772

Open
Hungdoan565 wants to merge 1 commit into
code-yeongyu:devfrom
Hungdoan565:codex/fix-run-continuation-session-dedupe-5742-20260630
Open

fix(run-continuation): dedupe background markers by root session#5772
Hungdoan565 wants to merge 1 commit into
code-yeongyu:devfrom
Hungdoan565:codex/fix-run-continuation-session-dedupe-5742-20260630

Conversation

@Hungdoan565

@Hungdoan565 Hungdoan565 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Aggregate background-task run-continuation markers under a task's root session instead of descendant parent sessions.
  • Remove idle-only continuation marker files so completed background-task markers do not leave stale per-session JSON files behind.
  • Add regression coverage for descendant root-session marker writes and idle marker cleanup.

Fixes #5742.

Verification

  • bun test packages/omo-opencode/src/features/run-continuation-state/storage.test.ts packages/omo-opencode/src/features/background-agent/manager-continuation-marker.test.ts packages/omo-opencode/src/cli/run/continuation-state-marker.test.ts packages/omo-opencode/src/hooks/stop-continuation-guard/index.test.ts packages/omo-opencode/src/hooks/session-notification.test.ts -> 48 pass / 0 fail
  • bun test packages/omo-opencode/src/features/background-agent/manager.test.ts packages/omo-opencode/src/features/background-agent/manager-continuation-marker.test.ts -> 198 pass / 0 fail
  • bun run typecheck:packages
  • git diff --check
  • OpenCode QA evidence: .omo/evidence/20260630-run-continuation-session-dedupe-5742/
    • OpenCode 1.17.11 server smoke with local plugin shim
    • OMO plugin entry log and config handler observed
    • /agent returned OMO agents
    • SSE server.connected observed
    • Real OpenCode DB session count unchanged: 3376 -> 3376

Summary by cubic

Dedupes run-continuation background markers by writing them only to a task’s root session and removes idle-only markers so files don’t linger. Prevents duplicate per-session JSON and keeps marker storage accurate. Fixes #5742.

  • Bug Fixes
    • Aggregate background-task continuation state under the root session instead of descendant parent sessions.
    • Manager computes marker session IDs, active task count, and undelivered wakes per root session.
    • Storage deletes a source when set to "idle"; deletes the file if no sources remain.
    • Tests updated/added for root-session marker dedupe and idle marker cleanup; race tests now expect marker removal.

Written for commit 894c580. Summary will update on new commits.

Review in cubic

@github-actions github-actions Bot added the opencode OpenCode edition: packages/omo-opencode label Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

opencode OpenCode edition: packages/omo-opencode

1 participant