Skip to content

fix: regression — auto-ingest + status not firing on startup (waiting for session) #151

@four-bytes-robby

Description

@four-bytes-robby

Regression (from #148, commit 1fa320a)

Auto-ingest and startup status updates stopped working immediately at plugin init. Two root causes:

1. status.ts write() drops all unscoped publishes

The if (!sid) return; guard introduced in #148 silently drops all status updates before a session exists. The TUI home view subscribes to the unscoped brain service channel, so it receives nothing until a session is created. Pre-#148, write() fell through to sid ? scoped.forSession(sid) : scoped.

2. Auto-ingest deferred to session.created

Previously auto-ingest was immediate fire-and-forget at plugin init. #148 moved it to the session.created event handler, delaying ingest until a session opens.

Fix

  1. status.ts: Remove if (!sid) return; guard, restore unscoped fallback const target = sid ? scoped.forSession(sid) : scoped;
  2. four-opencode-brain.ts: Move auto-ingest back to immediate fire-and-forget at plugin init (keep session.created handler for session ID capture only)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions