Skip to content

Auto-enter away mode when the captain is clearly AFK #2

Description

@NewAiCoder

Problem

/afk is entirely captain-invoked today. When nothing is actually happening in
a session except a recurring declared-pause recheck (e.g. a paused mockup
scout waiting on a captain pick in an external tool like a review tool), every
FM_PAUSE_RESURFACE_SECS tick (default 1h) forces a full LLM turn just to
re-confirm "still waiting on you" - because AGENTS.md section 8 requires no
turn to end blind while work is under way, and a declared pause still counts
as work under way.

Observed 2026-09-09: 8 consecutive hourly full-turn wakes overnight on one
paused mockup-review scout, each one draining tokens for zero new
information, with no captain present to notice and say "just go quiet."
The captain had to point this out; firstmate had no way to recognize the
pattern itself and enter /afk (or /quiet) on its own initiative.

Proposal

Detect "clearly AFK" from firstmate's own session signal, not just a captain
command, and auto-enter away mode (or a lighter always-quiet-until-actionable
posture) when the pattern holds:

  • Some number of consecutive wake-handling turns (config, maybe 2-3) resolve
    to "no captain-relevant content, same declared pause/wedge-check as last
    time" with zero intervening captain messages.
  • No live captain-relevant work otherwise pending (no needs-decision, no
    blocked, no PR ready for review).

On that pattern, auto-launch the same bin/fm-afk-launch.sh path /afk uses,
and say so explicitly in the wake reply so it's visible when the captain
next looks, e.g. "Captain, no new information across N consecutive
re-checks - entering away mode on my own initiative; say anything to
return."

Non-goals / care needed

  • Never auto-enter while genuine work is actively progressing (a build,
    a review, anything with recent non-declared-pause status lines) - only
    for the specific shape of "N repeats of the exact same no-op wake."
  • Exit contract stays exactly as /afk's today (any unmarked message returns
    control) - this only changes how entry is triggered, not the lifecycle
    itself.
  • Should compose with the existing FM_PAUSE_RESURFACE_SECS cadence rather
    than fighting it - the auto-entry should ideally suppress needing that
    cadence to consume a full turn at all once away mode is active, since the
    daemon already self-handles declared-pause rechecks per the classification
    policy in .agents/skills/afk/SKILL.md.

Evidence

Session transcript 2026-09-09, ~8 identical stale: default:w6R:p2 wakes at
roughly hourly cadence, each requiring drain -> crew-state check -> ack, with
the captain's exact words: "you got stop hook alerts every hour since last
night - that's obviously a huge waste of tokens - why is this happening? You
should have just gone to sleep instead of staying idle."

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions