Conversation
…pervisor pane from stale scan
Two bugs that together completely broke autonomous (permanent-afk) supervision
when firstmate runs on opencode (the captain's harness):
Bug 1 — pane_input_pending() false-positives on opencode's idle composer.
opencode renders a bordered input widget on the cursor line, so a clean idle
prompt is NOT blank: the cursor line is '<indent>┃ Ask anything... "<sugg>"'
(┃ = U+2503 box-drawing border; 'Ask anything...' is the fixed empty-composer
placeholder). The old COMPOSER_IDLE_RE never matched it, so every injection was
deferred forever ('inject deferred: pending input'). Broaden the regex to
recognize opencode's idle composer (box-drawing border + placeholder, or
border-only chrome). Typed text ('┃ hello') matches neither, so the pending-
input guard still holds. A typed line resembling the placeholder but without
the literal '...' still classifies as pending.
Bug 2 — stale-wedge detector flagged the supervisor's own idle pane.
The supervisor pane (the opencode window running firstmate) is legitimately
idle between events while the captain is away; stale detection must apply ONLY
to crewmate panes (fm-* windows). Add is_crewmate_window() and guard
classify_stale + stale_marker_record so a non-crewmate window never records a
stale marker that housekeeping would age into a false wedge.
Verified against opencode 1.17.x's real idle rendering (live pane_input_pending
+ full inject path). New tests/fm-daemon-opencode.test.sh pins both fixes; all
existing daemon/supervision suites (fm-wake-queue, fm-afk-inject-e2e,
fm-teardown, fm-daemon-opencode) stay green. shellcheck clean.
This was referenced Aug 9, 2026
pranaypratyush
pushed a commit
to pranaypratyush/firstmate
that referenced
this pull request
Aug 24, 2026
) * feat: add Hermes crewmate adapter Add a supervised, resumable Hermes Agent runtime for crewmates and scouts, including guarded lifecycle hooks, headless steering, skill invocation, state reconciliation, cleanup, and verification. Keep Hermes excluded from primary and secondmate roles. * no-mistakes(review): Serialize Hermes delivery and split lifecycle acknowledgement * no-mistakes(review): Enforce Hermes runtime scope and idle-shell safety * no-mistakes(review): Harden Hermes session binding and resumable delivery * no-mistakes(review): Harden Hermes interrupts, hooks, and raw resolution * no-mistakes(review): Restrict secondmate launches and align Hermes timing * no-mistakes(review): Record fresh Hermes live probe transcript * no-mistakes(review): Filter crew-only Hermes from secondmate fallback, route Herdr reclaim through agent-state, prove fresh Hermes launch * no-mistakes(review): Drop Hermes from remote readiness, front-load secondmate refusal, extract testable reclaim guard * no-mistakes(review): Add per-turn nonce to Hermes start acknowledgement * no-mistakes(document): Document Hermes crew adapter and secondmate raw-command removal * no-mistakes(lint): Silence ShellCheck SC2016/SC2034 in Hermes harness test * no-mistakes(ci): Repair ci.yml block scalar so CI workflow parses The invariants job put its CLAUDE.md heredoc body at column 0 inside a `run: |` block scalar. That terminated the scalar early, so .github/workflows/ci.yml was unparseable YAML and GitHub answered every push with a startup_failure run in which no job executed. Indent the heredoc body and EOF to the block-scalar indent; the emitted shell is byte-identical. Add a fm-lint.test.sh guard that parses every workflow into a job/step model and bash -n's each emitted run body. * no-mistakes: apply CI fixes * no-mistakes: apply CI fixes
iscooter
added a commit
to iscooter/firstmate
that referenced
this pull request
Sep 21, 2026
Re-ran PR kunchenguid#50's previously-successful Wiz scan with no code change; it now fails identically. The demo repo's image scan broke between 15:33 and 15:37 UTC and Wiz is healthy elsewhere. Dockerfile never copies .github/, so the probe's image is byte-identical to main. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Captain, the developer was trying to finish validation for PR #49 after the earlier run failed only at the push step. They wanted fork routing enabled and verified with a green doctor check, then wanted the validation rerun so the already-passing review, tests, docs, and lint could proceed to a successful push through the fork instead of the upstream repository.
What Changed
Ask anything...prompt as idle while still deferring on real typed input.fm-*crewmate windows can create or escalate stale markers.Risk Assessment
✅ Low: Captain, the change is narrowly scoped to daemon stale-pane filtering and opencode idle-composer detection, with focused regression coverage and no material merge blockers found.
Testing
Captain, targeted opencode daemon regression and full shell behavior suite passed; evidence logs show idle opencode composer accepted as empty, typed composer guarded as pending, supervisor stale ignored, crewmate stale behavior preserved, and afk injection e2e scenarios still working. Worktree cleanup check found no transient test residue.
Evidence: Targeted opencode daemon evidence
Evidence: Full shell behavior suite evidence
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
tests/fm-daemon-opencode.test.sh | tee /var/folders/kg/vqcvwwlx3xs4wblm4wpvpkz00000gn/T/no-mistakes-evidence/01KVTHAFWWYCCNMXDRS475F212/fm-daemon-opencode-test.logfor test_script in tests/*.test.sh; do printf '== %s ==\n' "$test_script"; "$test_script" || exit $?; done | tee /var/folders/kg/vqcvwwlx3xs4wblm4wpvpkz00000gn/T/no-mistakes-evidence/01KVTHAFWWYCCNMXDRS475F212/all-shell-tests.loggit status --shortfind . -maxdepth 3 \( -name '.pytest_cache' -o -name 'node_modules' -o -name 'coverage' -o -name 'dist' -o -name 'tmp' -o -name '*.log' \) -print✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.