Skip to content

docs: clarify context supervision signal - #25

Merged
kunchenguid merged 1 commit into
mainfrom
fm/fm-no-context-babysit-c5
Jun 19, 2026
Merged

kunchenguid merged 1 commit into
mainfrom
fm/fm-no-context-babysit-c5

Conversation

@kunchenguid

Copy link
Copy Markdown
Owner

Intent

Bake into firstmate's shared AGENTS.md supervision instructions that firstmate must not intervene in a crewmate merely because the pane shows low context remaining. Modern agent harnesses manage their own context windows by auto-compacting or summarizing as needed and keep going. The change must be general to harnesses, not codex-specific. Keep it scoped to Section 8 only: reframe the stuck-crewmate playbook so exit/relaunch is for genuine wedging such as looping, unresponsive, repeating the same obstacle, or truly dead, and add token-discipline guidance that context percentage shown in a peek is not actionable as a crew-health metric. Match the existing terse declarative voice, edit AGENTS.md directly, do not touch the CLAUDE.md symlink, and do not add a co-author.

What Changed

  • Clarifies that low context percentage in supervision peeks is not actionable crew-health signal.
  • Reframes relaunch guidance around genuine wedging after redirection, such as looping, unresponsiveness, repeated obstacles, or a dead pane.
  • Notes that modern harnesses auto-compact and continue, so low context alone should not trigger intervention.

Risk Assessment

✅ Low: The change is limited to Section 8 documentation in AGENTS.md and aligns with the requested supervision behavior without introducing executable-code risk.

Testing

Exercised the documentation change as an end user would review it: inspected the changed supervision instructions, verified the diff is scoped to AGENTS.md Section 8 with CLAUDE.md untouched, checked the required low-context and genuine-wedging guidance is present and harness-general, saved the exact reviewer-visible diff artifact, and confirmed the worktree stayed clean.

Evidence: Reviewer-visible AGENTS.md Section 8 diff

Diff shows context-% shown in a peek is not actionable as crew health added under token discipline and the stuck-crewmate playbook changed from context-exhausted or wedged to genuine wedging only, with examples and auto-compaction guidance.

diff --git a/AGENTS.md b/AGENTS.md
index 3c973ca..51b5621 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -418,6 +418,7 @@ This includes your own no-mistakes pipeline, long builds, and any other multi-mi
 Background that work so watcher wakes can interleave with it and the supervision loop stays responsive.
 
 Token discipline: status files before panes; default peeks to 40 lines; never stream a pane repeatedly through yourself; batch what you tell the captain.
+The context-% shown in a peek is not actionable as crew health; ignore it and intervene only on real signals (`signal`, `stale`, `needs-decision`, `blocked`), looping or confusion in the pane, or a question the brief already answers.
 Silence is the correct state while a healthy background watcher is waiting.
 
 ### Stuck-crewmate playbook (escalate in order)
@@ -425,7 +426,10 @@ Silence is the correct state while a healthy background watcher is waiting.
 1. Peek the pane.
 2. Crewmate is waiting on a question its brief already answers: answer in one line via fm-send.
 3. Crewmate is confused or looping: interrupt with the adapter's interrupt key (the window's harness is recorded as `harness=` in `state/<id>.meta`; e.g. `bin/fm-send.sh <window> --key Escape`), then redirect with one corrective line.
-4. Crewmate is context-exhausted or wedged: exit the agent with the adapter's exit command, relaunch with the same brief plus a `progress so far` note you append to it. The worktree and commits persist; this is cheap.
+4. Crewmate is genuinely wedged after redirection: exit the agent with the adapter's exit command, relaunch with the same brief plus a `progress so far` note you append to it.
+   Genuine wedging means looping, unresponsive, repeating the same obstacle, or truly dead.
+   A low context reading is not wedging; modern harnesses auto-compact and keep going.
+   The worktree and commits persist; this is cheap.
 5. Second relaunch fails too: write `failed` to backlog, tell the captain with evidence.
 
 ## 9. Escalation and captain etiquette

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.

  • Reviewed AGENTS.md Section 8 lines 420-431 to confirm low-context guidance is general to harnesses and wedging is limited to real stuck states.
  • Ran git diff --name-status 8216d04800ae8120a28c386717e3a9c9bd0dc026...5f7a3b668eb0bc848c087827528b368fcd1fc03d to confirm only AGENTS.md changed.
  • Ran git diff --quiet 8216d04800ae8120a28c386717e3a9c9bd0dc026...5f7a3b668eb0bc848c087827528b368fcd1fc03d -- . &#39;:!AGENTS.md&#39; and git diff --quiet ... -- CLAUDE.md to confirm no out-of-scope files or symlink changes.
  • Ran focused rg -q acceptance checks for the required phrases: context-% is not actionable, low context is not wedging, modern harnesses auto-compact, and genuine wedging examples.
  • Generated reviewer evidence with git diff --output=/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KVEVGJV56BMNNDR5RBQTX9WM/agents-section8-low-context.diff 8216d04800ae8120a28c386717e3a9c9bd0dc026...5f7a3b668eb0bc848c087827528b368fcd1fc03d -- AGENTS.md.
  • Ran git status --short after testing to confirm no transient working-tree artifacts remained.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@kunchenguid
kunchenguid merged commit 07c19a4 into main Jun 19, 2026
3 checks passed
@kunchenguid
kunchenguid deleted the fm/fm-no-context-babysit-c5 branch June 19, 2026 02:39
This was referenced Aug 7, 2026
ICBreakerLA referenced this pull request in ICBreakerLA/firstmate Oct 6, 2026
…hot.test.sh that broke "Behavior portable serial 7". Rule that was broken: each test must start from a clean remote-ledger fixture, whatever tests ran before it. Cause: call #5 (test_remote_ledgers_share_one_concurrent_budget_and_fall_back_to_cache) leaves $TMP_ROOT/remote-ledger-home-1/state/slow-ledger-read behind, and only call #6 removes it. Slice 1of2 runs #5 but skips #6, so in call #25 (test_landed_preserves_kindless_v1_summary_reports) the fake ssh sleeps 30s against the 15s budget and collection times out. Fix: one line in make_remote_ledger_fleet (line 258), the single place every test builds these homes. After mkdir -p "$remote_home/state" it runs rm -f on slow-ledger-read, unbounded-ledger-read and home-summary.json; write_remote_home_summary then rewrites the summary. All other uses of these marker files are per-test create/remove pairs. The 15s budget and all assertions are unchanged. Verification: (1) a copy of the script calling only #5 then #25 (slice 1of2 order) fails without the line ("structured home ledger collection timed out and no valid cached copy is available") and passes with it; the copy and the leftover untracked tests/_verify-fix.test.sh were deleted. (2) bin/fm-lint.sh exits 0 (ShellCheck 0.11.0, actionlint 1.7.12). A direct shellcheck run shows one SC2034 at line 271 that predates this fix and is not flagged by the project lint. (3) bin/fm-test-run.sh --lane portable-serial-7of12 still exits 1 locally with 4 failures, each from sandbox gaps (no tmux, no tasks-axi, curl 403 fetching the pinned action verifier). The remote-ledger tests in it pass, but the bearings script stops at the tasks-axi requirement before call #25, so only check (1) exercises #25. Nothing was committed
ICBreakerLA referenced this pull request in ICBreakerLA/firstmate Oct 6, 2026
* ci: split long serial suites into slices, add lint partitions, run parallel lanes 4-wide

The serial lane's longest shard carried 30 minutes of one-runner work and was
cancelled at its cap. Slice the independent test_* calls of ten long suites
across twelve shards, partition lint eight ways, and run the proven-isolated
parallel lanes at their proven --jobs 4. No test, check, or threshold is
removed or loosened.

* test: drop the unused dups local from the serial shard partition test

* no-mistakes(document): Update CONTRIBUTING.md required-check list for 8 lint and 12 serial shards

* no-mistakes(lint): Add missing shellcheck shell=bash directive to sourced test slice gate

* no-mistakes(ci): Fixed the real defect behind "Lint 4": bin/fm-test-run.sh:907 (`portable_serial_lane_weight()`) was dead code — its only call site had been replaced by `portable_serial_assignments | awk ...` earlier in the same diff, and ShellCheck's SC2329 ("function is never invoked") correctly flags it, which fails the lint step by default severity. Confirmed by reproducing locally: `FM_LINT_JOBS=1 bin/fm-lint.sh --partition 4of8` reported `bin/fm-test-run.sh ... reason=findings rc=1` with the SC2329 hit before the fix, and exits clean (rc=0, no SC2329) after deleting the unused function. Grepped the whole tree to confirm nothing else calls it, so removal (not suppression) is correct per the removal-first rule. This was the only genuine lint finding in the diff; a second PR-noted dead-code item (an unreachable `uniq -d` duplicate check inside `run_coverage_guard`, PR body line ~130) is real but belongs to the separate "Test coverage guard" job, which is not among the failing checks, is not flagged by any tool, and is out of scope for this round's two selected findings — left untouched. For "Behavior portable serial 7" I could not confirm a code-caused defect. I verified the new 12-shard/slice mechanism directly: `bin/fm-test-run.sh --check-coverage` passes cleanly (exact-once coverage, no dup/missing units across all 12 shards), the full `tests/fm-test-run.test.sh` self-test suite passes every case about the new slicing/packing logic ("slice gate runs every call exactly once...", "portable serial shards are a deterministic disjoint cover...", etc.), and a direct manual run of slice 1of8 of the longest split script (tests/fm-watch-triage.test.sh) dispatched exactly 18 of its 141 top-level test_* calls (the expected ~1/8), confirming the slice gate works correctly. Running the actual portable-serial-7of12 lane locally produced only 4 script failures, and each traces unambiguously to this sandbox's missing tooling rather than to the change: no tmux binary (blocks the afk/tmux-dependent fm-supervision-host assertions), no tasks-axi binary and a blocked npm registry (`fail "tasks-axi is required for ..."` in fm-bearings-snapshot and fm-teardown-sandbox), and blocked outbound network (curl 403 fetching a pinned GitHub Action verifier in fm-no-mistakes-required, a pre-existing test untouched by this PR). I could not fetch the actual GitHub Actions job log for shard 7 either — the Actions log-blob endpoint returned 403/"approval required" in this sandbox, matching the task's own "log retrieval incomplete" note. Per the task rules, since every concrete signal I could obtain points at sandbox-only tooling/network gaps rather than the PR's sharding/slicing code (which I verified behaves correctly), I did not invent a speculative fix for this check

* no-mistakes(ci): Fixed a test fixture leak in tests/fm-bearings-snapshot.test.sh that broke "Behavior portable serial 7". Rule that was broken: each test must start from a clean remote-ledger fixture, whatever tests ran before it. Cause: call #5 (test_remote_ledgers_share_one_concurrent_budget_and_fall_back_to_cache) leaves $TMP_ROOT/remote-ledger-home-1/state/slow-ledger-read behind, and only call #6 removes it. Slice 1of2 runs #5 but skips #6, so in call #25 (test_landed_preserves_kindless_v1_summary_reports) the fake ssh sleeps 30s against the 15s budget and collection times out. Fix: one line in make_remote_ledger_fleet (line 258), the single place every test builds these homes. After mkdir -p "$remote_home/state" it runs rm -f on slow-ledger-read, unbounded-ledger-read and home-summary.json; write_remote_home_summary then rewrites the summary. All other uses of these marker files are per-test create/remove pairs. The 15s budget and all assertions are unchanged. Verification: (1) a copy of the script calling only #5 then #25 (slice 1of2 order) fails without the line ("structured home ledger collection timed out and no valid cached copy is available") and passes with it; the copy and the leftover untracked tests/_verify-fix.test.sh were deleted. (2) bin/fm-lint.sh exits 0 (ShellCheck 0.11.0, actionlint 1.7.12). A direct shellcheck run shows one SC2034 at line 271 that predates this fix and is not flagged by the project lint. (3) bin/fm-test-run.sh --lane portable-serial-7of12 still exits 1 locally with 4 failures, each from sandbox gaps (no tmux, no tasks-axi, curl 403 fetching the pinned action verifier). The remote-ledger tests in it pass, but the bearings script stops at the tasks-axi requirement before call #25, so only check (1) exercises #25. Nothing was committed
Asaki14 added a commit to Asaki14/firstmate that referenced this pull request Oct 14, 2026
* feat(bin): add experimental Tern runtime backend (kunchenguid#24)

* feat(backend): add experimental Tern session backend

Adds bin/backends/tern.sh (one Tern session per home, one fm-<id> tab per
task, target tern:<session>/<block>), runtime detection from TERN_PANE with
TERM_PROGRAM=tern, process-level agent state, plugin-fed busy state, a
window-side Tern plugin that publishes agent state and colors task tabs,
PI_TUI_NATIVE=0 for Tern task panes, bin/fm-tern-autostart.sh, the omp idle
hint in the shared composer placeholder set, tests, and docs.

* test: clear the Tern pane marker in the shared test library

Suites run from a Tern pane otherwise auto-detect the tern backend where they
expect the no-marker tmux fallback.

* no-mistakes(review): Close exited Tern task blocks on kill; test fm-send routing

* no-mistakes(test): Gate Tern agent-state file on writer window pid, not age

* no-mistakes(document): Add Tern to stale backend lists across docs

* no-mistakes(lint): Silence intentional SC2016 warnings in Tern backend tests

* no-mistakes(ci): Lint 1 (ci-2) was caused by this PR, and I fixed it. ShellCheck SC2034 fired on `tests/fm-backend-tern.test.sh:101` because the test reset the Tern state-file cache with the assignment `FM_BACKEND_TERN_STATE_FILE_CACHED=`, a variable that is only read inside the sourced `bin/backends/tern.sh`. The invariant is that the shared lint must pass on every changed shell file, and that assignment was the only site that broke it. I changed the line to `unset FM_BACKEND_TERN_STATE_FILE_CACHED`. The behaviour is the same because tern.sh reads the variable as `${FM_BACKEND_TERN_STATE_FILE_CACHED:-}`, so unset and empty both force a fresh lookup. `bin/fm-lint.sh tests/fm-backend-tern.test.sh` now passes with the pinned ShellCheck 0.11.0, and `tests/fm-backend-tern.test.sh` passes with no failures. Behavior portable serial 2 (ci-1) was not caused by this PR, so I made no code change for it. The only failing test was `tests/fm-calm-pi-extension.test.sh`, with the error "grep disappeared from /export calm.html HTML while calm mode was on". The PR doesn't touch any Calm or Pi extension files. CI installs `@earendil-works/pi-coding-agent` unpinned (`.github/workflows/ci.yml:111,224`), so this run got Pi 1.0.4. The 1.0.x line came out on 2026-10-01 at 19:15, after main's last green run at 02:04 that day, and 1.0.4 was published on 2026-10-05. With Pi 1.0.4 installed locally in temp, the test failed the same way on this branch and on the untouched base commit b95d776. The failure comes from upstream Pi 1.0.4 changing its `/export` HTML, not from the Tern backend. It needs a separate Calm/Pi compatibility fix or a pinned Pi version in CI, both outside this PR's scope

* fix(bin): publish Tern plugin state on a fresh window's first scan (kunchenguid#25)

* tern plugin: publish current-format state as soon as window_pid is known

window.luau's last_signature started equal to the empty string, which is
also the signature of a window with no agent panes and no fm-* task tabs.
A freshly loaded window that resolves window_pid before any pane/tab
activity therefore skipped its first scan's write forever, leaving a stale
or old-format agents.json from an earlier window in place for however long
the window stayed idle - the reader in bin/backends/tern.sh then trusted
that stale file as current.

Fix: start last_signature as nil, a sentinel no real signature (including
the empty one) can ever equal, so the first scan after window_pid is known
always publishes. Writes stay change-driven after that.

Adds a regression test that drives the real window.luau through a stubbed
window-host API via the luau CLI, reproducing the exact empty-signature
race and asserting the first write happens in current format (version,
window_pid, blocks). Skips cleanly without luau on PATH, matching this
suite's existing jq/tern skip convention.

* docs: note window.luau's first-write guarantee and its luau-driven test

* fix(bin): keep omp workers' worktrees clean and read the running-agent hint as an idle composer (kunchenguid#28)

* fix(spawn): opt omp workers out of ONNX Runtime telemetry so no :memory:.ses lands in the worktree

omp's local tiny-model worker runs onnxruntime-node 1.30 with the worktree
as its cwd. Inside the worker sandbox its Microsoft 1DS telemetry cannot
write its database under ~/Library, falls back to an in-memory store, and
writes an untracked ':memory:.ses' stamp into the worktree, which made
fm-teardown.sh refuse cleanup of finished work. Every omp launch now
carries ORT_DISABLE_TELEMETRY=1, ORT's own whole-process opt-out.

* fix(composer): read omp's running-agent hint as an idle composer

While a subagent runs, omp 18.6.1 right-aligns '←← to see N running
agent(s)' on its empty composer row. Its bright keycap survived ghost
stripping, so the row read as pending input and doorbells to a worker
waiting on its subagent were skipped until the subagent finished. The hint
joins the shared idle-placeholder set beside omp's thinking-effort hint;
typed text stays pending. A status row carrying the right-aligned session
title is pinned as furniture too.

* fix(bin): stop Tern tab flicker from omp worker titles and keep firstmate-agents within the timer budget (kunchenguid#30)

* tern: keep firstmate-agents inside the timer budget; stop omp title spinner in Tern workers

* docs: record Tern 0.6.2 title-overlay and plugin timing evidence

* no-mistakes(review): Test Tern omp overlay; stop pid lookup starving scans

* no-mistakes(document): Document why plugin pid lookup skips consecutive ticks

* no-mistakes(document): Show Tern overlay in omp launch shape

* fix(bin): let fm_backend_source load the tern adapter

Main now preflights each backend adapter and its sibling libraries from an
explicit per-backend list and refuses any backend missing from it, so the
ported Tern adapter could not be sourced at all. Add tern with the three
libraries bin/backends/tern.sh sources.

* docs(verification): record the Tern 0.8.3 live run of the ported backend

* docs: add CHANGELOG entry for the Tern runtime backend

---------

Co-authored-by: Daniel Kuykendall IV <danielkuykendall23@gmail.com>
Co-authored-by: wangyao <wangyao@zhuozhuo.io>
fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 2, 2026
Align the context field with the quota field and industry convention by
rendering used percentage (rising) instead of remaining (falling), with
inverted color thresholds that preserve the old severity boundaries.
@simonKristensen

Copy link
Copy Markdown

Corrections to the description above:

  • The risk line is out of date on one point: id ranges (U1-U3, U2-4, R1-R2-R3, task-id ranges) now get tooltips on both ends, after the review fixes.
  • Deferred to a follow-up: the plan index page (status plus links to every part and artifact), open plans with their phase in the fleet panel and the web /fleet page, and opening the question-round and review boards from other devices are not in this PR. They were split out with firstmate's agreement into the follow-up task fm-plan-index-and-fleet, which starts after this PR lands.
  • CI on this repo is not a merge signal under the standing rule. The five failing checks fail the same way on main at the base commit and were cleared without fixes.

fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 18, 2026
…enguid#25)

* feat(onboarding): let the first mate lead a new owner's first conversation

A new home's first conversation is now one skill, first-voyage, that the
first mate follows: the opening and tool consent, four questions asked one
at a time with their reasons (what to call them and how to talk, the one
thing they want off their plate, three house rules to keep or change plus
one of their own, and one repository), then the first project and a first
report chosen from what they said matters. The session-start digest leads
with a FIRST VOYAGE cue while the home has no captain record or no first
project, so the skill loads even from a spilled digest. ONBOARDING.md steps
4 and 5 and the handbook now point at the skill instead of spelling out
lines to type.

* no-mistakes(review): Narrow first-voyage cue and decouple onboarding from PR kunchenguid#24

* no-mistakes(review): Align onboarding check, resume cue and outward-send rule wording

* no-mistakes(review): Make handbook outward-send rule conditional on owner's choice

* no-mistakes(ci): All three checks fail for one reason: the new file `.agents/skills/first-voyage/SKILL.md` is not listed in any capability in `fork-surface.conf`. The rule it breaks: every tracked path that is not in the upstream base snapshot must belong to exactly one capability. Two checks enforce this: - "Declared fork surface" runs `bin/fm-fork-surface.sh check`. - `tests/fm-fork-surface.test.sh`, in portable serial shard 6, runs the same check on the current repo. "Full suite" failed only because those lanes failed. The skill is the only new unowned path in this PR. Fix: one line, `owns = .agents/skills/first-voyage/SKILL.md`, added to the existing `onboarding-guide` capability in `fork-surface.conf`. That capability already owns `ONBOARDING.md` and `docs/handbook.md`. No other files changed. Verification: - Before the fix, `tests/fm-fork-surface.test.sh` failed locally (exit 1) with the same unclaimed-path error as CI. - After the fix, `bin/fm-fork-surface.sh check` prints `FORK_SURFACE OK capabilities=95 owned_paths=339`. - After the fix, `tests/fm-fork-surface.test.sh` exits 0, both on its own and inside a local shard 6 run. - The full local shard 6 run (`bin/fm-test-run.sh --lane portable-serial-6of13`) did not complete: it hit the 20-minute background time limit and was stopped. - Before it was stopped, 11 test scripts finished, all with exit 0 and no "not ok" lines. - `fm-public-followup` and `fm-pi-worker-stream-live-e2e` were gate-skipped locally rather than actually run. - The rest of shard 6 was not run locally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants