Skip to content

V2 footer shows "AFT starting…" until the first AFT tool call because the bridge now spawns lazily #369

Description

@coleleavitt

Short description

On OpenCode 2 the footer reads AFT starting… for the whole session until the model happens to call an AFT tool, although nothing is starting.

What happened?

Follow-up to #334 (fixed in 0.57.2 for the "health counts never arrive" case). With a healthy install the footer still sits on AFT starting…, because the bridge is spawned lazily and getStatus answers:

{"success":true,"status":"not_initialized","cache_role":"not_initialized",
 "message":"AFT bridge is now spawned lazily; status will be populated after the first tool call."}

formatAftStatusSegment (packages/opencode-plugin/src/tui/v2-status.ts) maps cache_role === "not_initialized" to AFT starting…, so a session that only uses built-in tools (or hasn't used any yet) shows "starting" indefinitely. Users read that as a hang (it's what made me go looking). After an aft_outline call the footer and sidebar populate normally.

Expected: distinguish "not spawned yet, by design" from "spawning", e.g. show AFT idle / AFT ready on first use when the status says the bridge is lazy and not yet started, and keep AFT starting… for an actual spawn in progress.

Happy to send a PR once there's agreement on the wording/signal (the status already carries status: "not_initialized" plus the lazy-spawn message; a dedicated field would be cleaner than matching text).

Plugin version

@cortexkit/aft-opencode 0.57.2

AFT binary version

0.57.2

Platform

linux x64, OpenCode 2.0.18

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