Skip to content

fix: follow native OpenCode task lifecycle - #4

Merged
psh4607 merged 1 commit into
psh4607:mainfrom
FlorentinDUBOIS:fix/opencode-1.18-lifecycle
Aug 18, 2026
Merged

fix: follow native OpenCode task lifecycle#4
psh4607 merged 1 commit into
psh4607:mainfrom
FlorentinDUBOIS:fix/opencode-1.18-lifecycle

Conversation

@FlorentinDUBOIS

Copy link
Copy Markdown
Contributor

Summary

  • derive activity only from real task and delegate tool parts so persistent prompt metadata cannot become permanent running rows
  • follow native sessionId / jobId child sessions after parent completion and deduplicate resumed calls immediately through task_id
  • preserve the update notifier, / header, and observed OMO/legacy background lifecycles without resurrecting historical reminders
  • add deterministic lifecycle tests to CI and regenerate the tracked dist/ output

Verification

  • bun install --frozen-lockfile
  • bun run test (18 passed)
  • bun run typecheck
  • bun run clean && bun run build
  • git diff --check
  • isolated OpenCode 1.18.13 TUI startup loaded subagent-sidebar once with no plugin error

Fixes #3

Persistent prompt parts and parent completion can create false agent
activity under OpenCode 1.18. Derive rows only from real task and
delegate parts, follow child sessions, and deduplicate resumes.

Keep legacy background compatibility limited to observed tool rows and
add deterministic lifecycle tests to CI.

Fixes psh4607#3

Signed-off-by: Florentin Dubois <florentin.dubois@clever.cloud>

@psh4607 psh4607 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the lifecycle rewrite against the OpenCode 1.18.13 Task/session-status implementation. The reactive snapshot approach removes the historical prompt-part false positives, follows native background child sessions through busy/retry/idle, and preserves the legacy compatibility paths without resurrecting unobserved work. Local verification passed (18 tests, typecheck, build, and diff check), and the approved GitHub Actions run is green.

@psh4607
psh4607 merged commit f950027 into psh4607:main Aug 18, 2026
1 check passed
@psh4607 psh4607 mentioned this pull request Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix stale prompt-part rows and OpenCode 1.18 background lifecycle

2 participants