Skip to content

WordPress platform: child-session idle completes the user's run; busy/aborted never fire #777

Closed

Description

@chubes4

Problem

bridges/roadie/roadie-plugins/wordpress-platform.mjs (#773) maps Roadie session actions onto WP run status (SESSION_STATUS: session_busy→running, session_idle→completed, session_error→failed, session_aborted→cancelled). Against Roadie main, two things go wrong:

  1. A child session going idle completes the parent run. thread-session-runtime.ts fires session_idle and session_error for delegated child sessions too, with parentSessionId set and the same threadId. sessionStateChanged() matches only on threadId, so the first subagent finishing calls set-chat-run-status completed on the user's run while the main session is still working.
  2. session_busy and session_aborted are never emitted by Roadie core, so those two mappings are dead. Run status is only running because the pending handler left it open, and an abort that starts inside Roadie (not from WP cancel) never finalizes the run as cancelled.

Target state

  • sessionStateChanged() ignores events carrying parentSessionId (child sessions), or events whose sessionId isn't the thread's main session.
  • Busy/aborted come from signals Roadie actually emits. Check MessageAbortedError handling and handleSessionError in thread-session-runtime.ts. If a generic session_busy/session_aborted action is genuinely missing, file it against Extra-Chill/roadie as a separate issue; don't special-case it here.

Deliverable

A committed change with tests in tests/roadie-wordpress-platform.mjs:

  • A child session_idle leaves the run running.
  • Main-session idle completes it.
  • A Roadie-side abort finalizes it as cancelled.

CHANGELOG and VERSION are release-owned and stay as they are.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions