Skip to content

[Fix] Task auto-notification not working in oclite #116

@randomm

Description

@randomm

Problem

When background tasks complete in oclite, there's no notification or auto-delivery of results. Works in TUI, broken in oclite.

Root Cause

oclite's chat() generator creates a scoped Bus subscription that only lasts for ONE user prompt. When auto-wakeup fires via SessionPrompt.prompt(), nobody is listening to render the response.

TUI works because it has a global reactive event listener that's ALWAYS subscribed.

Fix

Add a persistent subscriber for task completion events in index.ts:

Bus.subscribe(Session.BackgroundTaskEvent.Completed, (event) => {
  if (event.properties.parentSessionID !== currentSessionID) return
  // Re-subscribe and stream the auto-wakeup response
})

Files

  • src/cli/lite/index.ts — add persistent subscriber
  • src/session/index.ts:448-509enableAutoWakeup() reference

Acceptance Criteria

  • Task completion triggers notification in oclite
  • Results auto-deliver like in TUI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions