Skip to content

SDK/Gateway: align cancel response, terminal event, and wait status #9

@BunsDev

Description

@BunsDev

Live dogfood finding

During the live OpenMeow SDK cancel/stop dogfood run, the immediate cancel response, streamed terminal events, and run.wait() result did not agree.

Evidence doc:

Observed cancel response:

{
  "ok": true,
  "abortedRunId": "4f4390d1-3434-4f78-af24-dbbd66c423d5",
  "status": "aborted"
}

But:

  • no run.cancelled terminal stream event was observed during the cancel probe window
  • run.wait() normalized to status: "completed" for the same aborted run

Impact

OpenMeow cannot rely solely on streamed terminal events or wait() to recover stop-button UI today.

The dogfood adapter now mitigates this by mapping a successful immediate cancel response to a deterministic synthetic cancelled UI state via reduceOpenMeowCancelResult().

Desired contract

Gateway/SDK should define one stable cancel semantic for app clients:

  • successful cancel response should correlate with a terminal run.cancelled event, and/or
  • agent.wait after abort should return cancelled / aborted, not completed, and/or
  • SDK should explicitly document that the immediate cancel response is authoritative for UI state.

Acceptance

  • OpenMeow stop button can transition from active/cancelling to idle from a stable SDK contract.
  • run.wait() and terminal run event semantics are documented or aligned for cancelled runs.

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