Skip to content

fm-send: steers falsely succeed while agent is busy on long shell (Pi queues Steering) #677

Open

Description

@korallis

Problem

When firstmate (or any caller) uses bin/fm-send.sh to steer a Pi/Herdr crewmate that is mid-long-shell (for example no-mistakes axi respond for many minutes), Pi only queues the message as Steering: … and does not process it until the shell exits.

fm-send still reported success as soon as the text hit the composer. That looks like a delivered instruction but nothing runs for a long time — bad for:

  • captain decisions that must feed axi respond
  • standing close-out / course-correction steers
  • secondmate supervision messages

Observed in production supervision: copy-sanitization worker ran no-mistakes axi respond for 10+ minutes while steers sat in the Pi Steering queue; operators had to wait for the shell to finish before any new instruction took effect.

Expected

Text steers should not pretend to land while the agent is busy on a long command. Either wait until the agent is idle, then deliver, or fail loudly after a budget — never silent false success into Pi's queue.

Non-goals

  • Do not interrupt long no-mistakes runs by default (that can corrupt gate ownership).
  • --key (Escape / C-c) must still send immediately so operators can interrupt.

Proposed fix

In bin/fm-send.sh on the text path only:

  1. Poll fm_backend_busy_state for the target.
  2. While busy, wait (default up to 3600s, poll every 5s; env-tunable).
  3. When idle/unknown, deliver text as today.
  4. If still busy after the budget, exit non-zero with a clear error.
  5. --key path unchanged (no wait).

Acceptance

  • Text send waits for idle when herdr reports busy, then delivers.
  • FM_SEND_BUSY_WAIT_SECS=0 disables wait.
  • --key never waits.
  • Hermetic unit coverage for the wait loop.
  • Existing fm-send settle tests still pass.

Activity

  1. devin-ai-integration commented on Sep 24, 2026

    @devin-ai-integration
    No description provided.
  2. kunchenguid commented on Oct 14, 2026

    @kunchenguid
    Owner

    Speaking as Kun's firstmate: restamp after newer thread activity.

    Checked on main 24f3a6b8: still unrepaired. bin/fm-send.sh has no FM_SEND_BUSY_WAIT / wait-for-idle on the text path before typing. Closed #678 (same author) never merged. Related #775 (merged) covered OpenCode busy-queued composer submit, not Pi Steering queue false-success.

    Newer activity: @lucaspanjer's 2026-10-14 comment is about a polyscalp wallet lag strategy branch and does not address this issue — treating it as off-topic noise, not progress.

    Contract-class: new-default. False success into Pi's Steering queue is a real honesty gap, but the proposed default (poll fm_backend_busy_state and wait up to 3600s before text delivery) changes unconfigured fm-send latency/semantics for every busy agent. VISION/honesty framing does not make that restore (FM-LEARN-4627). A PR that only fails loudly when busy, or gates the wait behind an opt-in, would reclassify; the wait-by-default shape stays new-default and would need a captain merge decision when otherwise ready.

    VISION.md (each rule):

    • One captain, one interface: aligns — silent false success forces tab-juggling until the shell ends.
    • Authority is explicit: aligns if wait stays opt-in / captain-visible; a silent hour-long default wait would not.
    • Scripts own the mechanics: aligns — busy-state polling is script work.
    • A restart is a non-event: aligns — durable decisions must not look delivered when queued.
    • Delegation with a spine: aligns — steers and close-outs need a truthful delivery contract.
    • The fleet outlives any vendor: aligns with care — Pi Steering queue is harness behavior; wait/fail belongs in the send adapter.
    • Scope: aligns — command-layer send.

    Outcome: labeled ready-for-pr. Open for a PR; note contract-class so a wait-by-default implementation is not auto-merged.

  3. added
    ready-for-pr
    on Oct 14, 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

    ready-for-pr

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions