Skip to content

fix(cli): the OpenCode and Kilo bridge loses turn-end hook answers in run mode #1320

Done

Description

@blafourcade

Description

On OpenCode and Kilo, the turn-end artifact hook from #1317 judges the files the model wrote, but its answer never reaches the model in run mode: the process exits before the follow-up lands. Against serve, the answer arrives.

Affected file(s)

  • cli/assets/hooks-runtime/host-bridge.cjs, the OpenCode and Kilo bridge that relays Stop answers.

Expected behaviour

  • A Stop answer reaches the model in run mode, as it does with serve.
  • When several plugins answer at Stop, every answer reaches the model.

Observed behaviour

  • run exits before the follow-up lands, so the findings are lost.
  • With several plugins answering at Stop, one answer can be lost. This already happens with aidd-ui and aidd-context.
  • Kilo re-prompts twice.
  • On OpenCode, the first turn has no reference time, because SessionStart carries no session id. A shell-written artifact on that turn is not checked.

AI tool

OpenCode, Kilo

aidd-cli version

unreleased, next

OS

macOS (others not tried)

Refs #1149

Activity

  1. blafourcade commented on Nov 25, 2026

    @blafourcade
    ContributorAuthor

    Partly landed in next with #1253 (364ca04): on OpenCode, dispose awaits the follow-up, the continuation guard survives a recreated plugin, and delivery errors are logged; the Kilo double re-prompt is fixed (continued resets only on a non-follow-up message). Remaining: on OpenCode, SessionStart still carries no session id, so the first turn has no reference time and a shell-written artifact on that turn is not checked; and no test covers several plugins answering at the same Stop.

  2. blafourcade commented on Nov 26, 2026

    @blafourcade
    ContributorAuthor

    Delivered in #1402 (merged into next as 9e7e919): the shared bridge runs a Stop script synchronously, so kilo run queues the follow-up before it drains. Probed 3 of 3 on Kilo 7.8.32, no OpenCode regression 3 of 3.

  3. moved this from Ideation to Done in AIDD Roadmapon Nov 26, 2026
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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions