Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6902362
fix(bin): share timed background launch and isolate terminal stdin (#…
blu3eee Nov 3, 2026
bf50f29
fix: isolate interrupted auto-arm failures by session (#7921)
WTF-Am-ID Nov 3, 2026
4ee956e
feat(bin): choose a Claude account per ship or scout from a declared …
trillium Nov 3, 2026
8aa66ff
feat(branch-prompt): append an optional home include to the supervisi…
c6aw Nov 3, 2026
87f26ac
fix(bin): bind live-lab tmux calls to explicit sockets so cleanup can…
jaig-in Nov 3, 2026
89cdf4b
fix(bin): return 124 on retriable bounded lock contention (#8119)
Azd325 Nov 3, 2026
ed1eb1d
fix(bin): ignore the no-mistakes mirror when teardown checks for land…
trillium Nov 3, 2026
355ea8d
fix: prevent Codex Stop hook JSON contamination (#7231)
mikaelz Nov 3, 2026
c6b6232
fix(calm): leave one blank row above the Claude Code working boat (#7…
lewismazzei Nov 3, 2026
b329c27
fix(bin): refuse to relaunch a worker into a primary home or checkout…
trillium Nov 4, 2026
c2ee5e7
fix(bin): read session-lock owner identity without the ps binary (#7609)
kesslerio Nov 4, 2026
54717a2
fix(bin): keep every custom check wake line and payload before acknow…
c6aw Nov 4, 2026
37e9a36
feat(bin): check watched tools against published npm and GitHub relea…
AgardnerAU Nov 4, 2026
2f6f277
fix(bin): restore Claude slash-command submission on Herdr (#6695)
AokDesu Nov 4, 2026
bb8dd20
fix(bin): tolerate slow Herdr worktree entry in fm-spawn (#8139)
alexg0 Nov 4, 2026
350cb69
feat: report worker status through OSC 7501 (#8011)
kunchenguid Nov 4, 2026
2773a02
feat(bin): add opt-in Linux container check for changed shell tests (…
Azd325 Nov 4, 2026
4bd1e3a
feat(bin): accept a caller-supplied expected PR head in fm-pr-merge (…
Azd325 Nov 4, 2026
956803e
test: add fail-closed test for the pinned Herdr installer (#7753)
c6aw Nov 5, 2026
7c6170e
fix(bin): record forced scout teardown as discarded instead of delive…
tiago-peixoto Nov 5, 2026
840cebe
fix: preserve full captain-hold questions in decision snapshots (#8173)
WTF-Am-ID Nov 5, 2026
2886bbe
fix(bin): canonicalize Windows drive-letter herdr socket paths before…
cr101 Nov 5, 2026
4869cf5
fix: wait for busy-state locks to reach the stale threshold (#8177)
rchristensen Nov 5, 2026
b77b66c
fix: sync record exports with empty overrides and hidden state files …
tiago-peixoto Nov 5, 2026
8b1618a
fix: refresh owner lease before detached process-event launches (#8191)
WTF-Am-ID Nov 5, 2026
f95d427
fix: recover remote inheritance after sender counter loss (#8104) (#8…
WTF-Am-ID Nov 6, 2026
65a9a51
feat: support explicit GitHub branch updates before merging (#6330)
jazz127 Nov 6, 2026
298ca6e
fix: clean up Perl timeout processes on interruption (#7922)
WTF-Am-ID Nov 6, 2026
10b7163
fix: prevent watcher marker collisions between endpoints (#7923)
WTF-Am-ID Nov 6, 2026
6125d41
test: stabilize extension orphan recovery readiness (#8210)
Dematom1 Nov 6, 2026
998c19f
feat: allow configurable TypeSafe dispatch base URLs (#7957) (#8192)
WTF-Am-ID Nov 6, 2026
bf05a4f
fix(bin): refresh stale remote refs before teardown refuses landed wo…
jbarol Nov 6, 2026
e0370cd
chore: merge upstream main into house
jazz127 Nov 6, 2026
efabd07
no-mistakes(document): Correct account defaults and supervision docum…
jazz127 Nov 7, 2026
79e1e9d
no-mistakes(ci): Captain, set House lint to one worker while preservi…
jazz127 Nov 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Every Claude spawn therefore pre-registers its launch directory before launch, a
A second, separate dialog - "Allow external CLAUDE.md file imports?" - renders whenever a loaded CLAUDE.md chain reaches outside the project tree, which every crewmate's does through the captain's own `~/.claude/CLAUDE.md` importing `~/.claude/RTK.md`.
`--setting-sources project,local`, which only `../../../bin/fm-live-lab.sh` passes (an `fm-spawn.sh` worker loads the user settings too), does not suppress it either, and it gates the session exactly like the trust dialog: cursor on "No, disable external imports", no way to move the selection from firstmate's steering plane.

`../../../bin/fm-claude-trust.sh` records `hasTrustDialogAccepted` for both the worktree and its primary checkout in `${CLAUDE_CONFIG_DIR:-$HOME}/.claude.json`, where a home's worker account pin decides `CLAUDE_CONFIG_DIR` (`../../../docs/configuration.md` "Worker account pin"), for a ship or scout spawn; a secondmate spawn registers only its own home entry, since a secondmate home has no separate primary-checkout entry to carry import consent forward from.
`../../../bin/fm-claude-trust.sh` records `hasTrustDialogAccepted` for both the worktree and its primary checkout in `${CLAUDE_CONFIG_DIR:-$HOME}/.claude.json`, where a home's worker account pin or the declared account a spawn names decides `CLAUDE_CONFIG_DIR` (`../../../docs/configuration.md` "Worker account pin"), for a ship or scout spawn; a secondmate spawn registers only its own home entry, since a secondmate home has no separate primary-checkout entry to carry import consent forward from.
For a ship or scout spawn, the external-imports flags (`hasClaudeMdExternalIncludesApproved`, `hasClaudeMdExternalIncludesWarningShown`) are carried forward alongside the trust flag only when the primary checkout's project entry already carries an explicit `hasClaudeMdExternalIncludesApproved===true` from a prior interactive session - the common first-spawn case is a project claude has never been asked about, so those two flags are left unwritten and the import dialog still renders, even though trust registers normally.
When the project entry instead already carries an explicit decline (`hasClaudeMdExternalIncludesApproved===false` with `hasClaudeMdExternalIncludesWarningShown===true`), the whole registration refuses - including the trust flag - rather than manufacture consent the human never gave, so that spawn wedges on the trust dialog before it would even reach the import one.
Both flags `false` is Claude Code's default entry for a project never asked, not a decline, and is treated like an absent flag: trust registers and the import dialog still renders.
Expand Down
8 changes: 2 additions & 6 deletions .agents/skills/harness-adapters/references/harness/codex.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,9 @@ This is why `$no-mistakes` reaches a Codex worker instead of being consumed by t

## Primary integration

The primary integration was verified on 2026-07-08 with codex-cli 0.142.1.
The firstmate primary's `.codex/hooks.json` registers a Stop hook that pipes Codex's payload to `../../../bin/fm-turnend-guard.sh`, through `../../../bin/fm-codex-stop-park.sh --guard` when that script is present.
Codex Stop hooks preserve exit status 2 and stderr to block, and expose `stop_hook_active` for the same one-block loop safety used by the guard's default mode.
[`turnend-guard.md`](../../../../../docs/turnend-guard.md#harness-integrations) owns the primary Stop wrapper's scoping, response streams, and bounded continuation; [runtime backend verification](../../../../../docs/verification/runtime-backends.md#stop-response-parsing) owns the current parser evidence.

The Stop payload includes `cwd`, but the tracked hook does not use it to choose the guard executable.
Codex runs the Stop command with process PWD set to the hook-loaded project root, while no `CODEX_PROJECT_DIR`, `CODEX_WORKSPACE_ROOT`, or `CODEX_CWD` root variable is set.
The tracked hook anchors to `pwd -P`, verifies that root is Firstmate-shaped and hook-bearing, and then invokes the guard with the original payload.
Verified on 2026-07-08 with codex-cli 0.142.1: Codex runs the Stop command with process PWD set to the hook-loaded project root, while no `CODEX_PROJECT_DIR`, `CODEX_WORKSPACE_ROOT`, or `CODEX_CWD` root variable is set.

Codex CLI 0.163.0 supports the native asynchronous Stop park registered by `bin/fm-codex-stop-park.sh` in a home that opts in with [`config/codex-stop-park`](../../../../../docs/configuration.md#codex-native-stop-park-configcodex-stop-park), verified in an isolated real CLI lab on 2026-10-19.
The hook waits outside the model and delivers actionable wakes with `codex queue --thread`, including in embedded mode without a shared app-server daemon.
Expand Down
4 changes: 3 additions & 1 deletion .agents/skills/operational-home-layout/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ bin/ helper scripts, committed; read each script's header before
config/crew-harness crewmate harness override; LOCAL, gitignored; absent or "default" = same as firstmate. Inherited as the literal file: a concrete primary adapter value also controls a secondmate home's own crewmates (section 4)
config/claude-permission-mode optional worker permission posture; LOCAL, gitignored; schema and failover: docs/configuration.md "Claude permission mode" and "Persistent managed-policy failover"
config/codex-approval-mode optional worker approval posture; LOCAL, gitignored; schema and failover: docs/configuration.md "Codex automatic approval review" and "Persistent managed-policy failover"
config/claude-account config/pi-account optional per-home worker account pin for Claude and Pi launches; LOCAL, gitignored, not inherited; absent keeps today's ambient account; present refuses a launch unless the pinned account resolves and is signed in (section 4 owns the refusal rule); see docs/configuration.md "Worker account pin"
config/claude-account config/pi-account optional per-home worker account pin for Claude and Pi launches; LOCAL, gitignored, not inherited; docs/configuration.md "Worker account pin" owns defaults and launch refusals
config/claude-accounts optional list of Claude accounts a home's ships and scouts may launch on, one per line; LOCAL, gitignored, not inherited; absent changes nothing; present needs --account <declared entry> on every Claude ship or scout spawn and excludes config/claude-account; see docs/configuration.md "Several Claude accounts"
config/secondmate-accounts/<id>/claude-account config/secondmate-accounts/<id>/pi-account optional PRIMARY-home account pin for one local secondmate's own agent, in the worker account pin format; LOCAL, gitignored, not inherited; absent keeps the home-wide pin; see docs/configuration.md "Per-secondmate account pins"
config/secondmate-accounts/<id>/omp-profile optional PRIMARY-home omp profile name for one local omp secondmate's own agent (`omp --profile <name>`); LOCAL, gitignored, not inherited; absent adds no flag; see docs/configuration.md "Per-secondmate omp profile"
config/crew-dispatch.json optional crewmate dispatch profiles; LOCAL, gitignored; firstmate-maintained but human-editable natural-language rules that choose a per-task harness/model/effort profile (section 4). Inherited by secondmate homes
Expand All @@ -49,6 +50,7 @@ config/rex-tint optional "off" (default when absent), "subtle", or "subtle-ligh
config/trace-context optional presence flag enabling default-off native W3C trace-context propagation to spawned agents; LOCAL, gitignored; inherited by secondmate homes; see docs/configuration.md "Trace context propagation" and docs/trace-context.md
config/lavish-axi-host optional one-line per-machine Lavish server address; LOCAL, gitignored, inherited by secondmate homes, and exported into every worker launch; see docs/configuration.md "Lavish server address" for opening versus polling
config/brief-include.md optional standing worker instructions appended verbatim as the last section of every ship and scout scaffold; LOCAL, gitignored, and not inherited; keep its text out of `## Firstmate spec`; see docs/configuration.md "Home brief include"
config/branch-prompt-include.md optional standing home rules appended verbatim as the last section of the supervision branch prompt; LOCAL, gitignored, and not inherited; see docs/configuration.md "Home branch prompt include"
config/herdr-lifecycle-spawn-guard optional presence flag opting this home into the default-off spawn refusal of a ship or scout brief that names a Herdr lifecycle command without the Herdr isolation contract; LOCAL, gitignored, and not inherited; see docs/configuration.md "Herdr lifecycle spawn guard"
config/fleet-ledger optional presence flag opting this home in to the default-off fleet activity ledger state/fleet-ledger.jsonl that outside tools can follow; LOCAL, gitignored, and not inherited; see docs/fleet-ledger.md
config/firstmate-role optional LOCAL, gitignored firstmate-repository publication role; see docs/configuration.md "Firstmate role" for operator opt-in and secondmate inheritance
Expand Down
14 changes: 13 additions & 1 deletion .agents/skills/quota-array-dispatch/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: quota-array-dispatch
description: >-
Load when a crew-dispatch rule or default resolves to more than one profile candidate.
Load when a crew-dispatch rule or default resolves to more than one profile candidate, or a Claude ship or scout is dispatched from a home that declares config/claude-accounts.
user-invocable: false
metadata:
internal: true
Expand Down Expand Up @@ -41,6 +41,18 @@ Firstmate can optionally arm `bin/fm-procevent-quota.sh` for a recurring mid-tas
The opt-in [typed resolver](../../../docs/configuration.md#typed-dispatch-resolution-env-fm_dispatch_provider-fm_dispatch_model) has its own documented gates.
It never removes this skill's authority, and its `ambiguous`, `escalate`, and `error` outcomes return here.

## Claude account list

When the home declares `config/claude-accounts`, each Claude candidate is one candidate per declared account, and the spawn needs the chosen account as `--account <entry>`.
The [shared-quota opt-out](#shared-quota-opt-out) also disables this section's measurement and quota ranking; still name a declared usable account explicitly.
Otherwise measure them with `bin/fm-claude-account-quota.sh [--model <model>]` instead of the default TOON's single `claude` row, which reads only the ambient account; its header owns the per-account read and output.
It prints data only, never a choice: each account's applicable scopes and any uncertainty it could not measure.
Apply the three gates below to each account's rows, taking a projected runway's time from the row's own `usableRunwaySeconds`, rank the eligible ones by their limiting scope's `spendPriority` exactly as for profiles, and pass the chosen entry as `--account <entry>`.
A genuine tie or no rankable account is the same terminal case as below: decide in the open from the rows or ask the captain, never by file order.
Account for every declared account in the rationale, including unmeasured ones.
A typed-resolver `clear` profile for Claude still needs this step's `--account`.
The account is chosen once, at intake: a relaunch keeps the recorded one, and only an explicit `--account` relaunch moves a task ([`docs/configuration.md`](../../../docs/configuration.md#several-claude-accounts-configclaude-accounts) owns the contract).

## Read the default TOON

When the home declares the [shared-quota opt-out](#shared-quota-opt-out), skip this section's quota reading and every quota-derived check built on it (quota rows, floors, runway, and `spendPriority`); catalog eligibility and reasoning-class fit still apply.
Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/secondmate-provisioning/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ The declared `config/supervision-host-off` opt-out follows the same primary-auth
`config/secondmate-harness` is not inherited because it is only the primary's knob for launching secondmate agents.
`config/firstmate-role` is inherited under the additional [resolved-role and receipt policy](../../../docs/configuration.md#firstmate-role-configfirstmate-role), not as a raw copy of the primary file.
Account pins are not inherited.
[`Worker account pin`](../../../docs/configuration.md#worker-account-pin-configclaude-account-configpi-account) owns `config/claude-account` and `config/pi-account` inheritance and backend limits; [`T3 provider instances`](../../../docs/t3code-backend.md#provider-instances-and-models) owns T3 account selection.
[`Worker account pin`](../../../docs/configuration.md#worker-account-pin-configclaude-account-configpi-account) owns `config/claude-account`, `config/claude-accounts`, and `config/pi-account` inheritance and backend limits; [`T3 provider instances`](../../../docs/t3code-backend.md#provider-instances-and-models) owns T3 account selection.
[`docs/configuration.md` "Per-secondmate account pins"](../../../docs/configuration.md#per-secondmate-account-pins) owns the explicit `config/secondmate-accounts/<id>/` override and the independent worker pins inside each mate's home.
`config/dock.json` is likewise never inherited or removed by propagation: provision each machine's credential store and dock record in each launching home before its first seated worker ([`docs/configuration.md`](../../../docs/configuration.md) "Dock-local seat binding").
`data/captain-shared.md` is main-authoritative in the primary home and read-only in secondmate homes.
Expand Down
2 changes: 2 additions & 0 deletions .claude/mods/firstmate-calm/hooks/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,10 @@ export const register: Register = (on) => {
const packed = packCalmShipRasterCells(sprite.frame(columns), columns, palette);
sites.set(e.requestId, { columns, rows: packed.rows });
const { Box, Raster } = $.ui.resolve(e);
// One blank row above the boat keeps its sail off the highlighted prompt, since Calm hides the rows between.
return Box({
flexDirection: "column",
paddingTop: 1,
children: Raster({ key: CALM_SHIP_RASTER_KEY, columns, rows: packed.rows, cells: packed.cells }),
});
});
Expand Down
32 changes: 26 additions & 6 deletions .claude/mods/firstmate-calm/tests/support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,20 +272,40 @@ export function isStock(tree: unknown): boolean {
return JSON.stringify(tree).includes(STOCK_TEXT);
}

/** The Raster element inside a Spinner drawing, or undefined when the drawing has none. */
export function rasterOf(tree: unknown): { columns: number; rows: number; cells: string; key: string } | undefined {
function drawingNodes(tree: unknown): unknown[] {
const seen: unknown[] = [tree];
const nodes: unknown[] = [];
while (seen.length > 0) {
const node = seen.pop();
if (node === null || typeof node !== "object") continue;
const element = node as { type?: unknown; props?: Record<string, unknown>; children?: unknown };
if (element.type === "Raster" && element.props !== undefined) {
return element.props as { columns: number; rows: number; cells: string; key: string };
}
nodes.push(node);
const element = node as { props?: Record<string, unknown>; children?: unknown };
if (Array.isArray(element.children)) seen.push(...element.children);
else if (element.children !== undefined) seen.push(element.children);
if (element.props !== undefined && "children" in element.props) seen.push(element.props.children);
}
return nodes;
}

/** The Box wrapping a Spinner Raster, or undefined when the drawing has none. */
export function boxOf(tree: unknown): { props?: Record<string, unknown> } | undefined {
for (const node of drawingNodes(tree)) {
const element = node as { type?: unknown; props?: Record<string, unknown> };
if (element.type === "Box" && element.props !== undefined && rasterOf(element) !== undefined) {
return element;
}
}
return undefined;
}

/** The Raster element inside a Spinner drawing, or undefined when the drawing has none. */
export function rasterOf(tree: unknown): { columns: number; rows: number; cells: string; key: string } | undefined {
for (const node of drawingNodes(tree)) {
const element = node as { type?: unknown; props?: Record<string, unknown> };
if (element.type === "Raster" && element.props !== undefined) {
return element.props as { columns: number; rows: number; cells: string; key: string };
}
}
return undefined;
}

Expand Down
10 changes: 9 additions & 1 deletion .claude/mods/firstmate-calm/tests/working-ship.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// working row while Calm is on, its cadence on the mocked clock, its size against the
// viewport, and how it lets go of a site the surface no longer draws.
import { describe, expect, test } from "claude-code/testing";
import { calmCommand, decodeCells, isStock, rasterOf, spinner, themeChange, unmeasuredSpinner, world } from "./support.ts";
import { boxOf, calmCommand, decodeCells, isStock, rasterOf, spinner, themeChange, unmeasuredSpinner, world } from "./support.ts";

const SAIL = "◿│◣";
const HULL = "╲▁▁▁╱";
Expand Down Expand Up @@ -43,6 +43,14 @@ describe("the working ship", () => {
expect(backgrounds.flat().every((color) => color === DEFAULT)).toBe(true);
});

test("leaves one blank row above the boat so its sail stays off the highlighted prompt", async ($, on) => {
world(on, { preference: "on\n" });
const drawing = await $.ui.render(spinner());
const wrapper = boxOf(drawing);
expect(wrapper?.props?.paddingTop).toBe(1);
expect(rasterOf(wrapper)).toBeDefined();
});

test("animates the water every tick and moves the hull one column every fourth, through blits of the mounted size", async ($, on) => {
const { clock, journal } = world(on, { preference: "on\n" });
await $.session.start({ cwd: "/work", surface: "terminal", isInteractive: true });
Expand Down
2 changes: 1 addition & 1 deletion .codex/hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"hooks": [
{
"type": "command",
"command": "bash -lc 'payload=$(cat 2>/dev/null || true); [ -n \"$payload\" ] || exit 0; command -v jq >/dev/null 2>&1 || exit 0; root=$(pwd -P) || exit 0; [ -x \"$root/bin/fm-turnend-guard.sh\" ] || exit 0; [ -f \"$root/AGENTS.md\" ] || exit 0; [ -f \"$root/.codex/hooks.json\" ] || exit 0; jq -e \"any(.hooks.Stop[]?.hooks[]?.command?; type == \\\"string\\\" and contains(\\\"fm-turnend-guard.sh\\\"))\" \"$root/.codex/hooks.json\" >/dev/null 2>&1 || exit 0; if [ -x \"$root/bin/fm-codex-stop-park.sh\" ]; then printf \"%s\" \"$payload\" | \"$root/bin/fm-codex-stop-park.sh\" --guard; else printf \"%s\" \"$payload\" | \"$root/bin/fm-turnend-guard.sh\"; fi'",
"command": "bash -c 'fm_codex_stop() { payload=$(cat 2>/dev/null || true); [ -n \"$payload\" ] || return 0; command -v jq >/dev/null 2>&1 || return 0; root=$(pwd -P) || return 0; [ -x \"$root/bin/fm-turnend-guard.sh\" ] || return 0; [ -f \"$root/AGENTS.md\" ] || return 0; [ -f \"$root/.codex/hooks.json\" ] || return 0; jq -e \"any(.hooks.Stop[]?.hooks[]?.command?; type == \\\"string\\\" and contains(\\\"fm-turnend-guard.sh\\\"))\" \"$root/.codex/hooks.json\" >/dev/null 2>&1 || return 0; if [ -x \"$root/bin/fm-codex-stop-park.sh\" ]; then printf \"%s\" \"$payload\" | \"$root/bin/fm-codex-stop-park.sh\" --guard; else printf \"%s\" \"$payload\" | \"$root/bin/fm-turnend-guard.sh\"; fi; }; fm_codex_stop; code=$?; if [ \"$code\" -eq 0 ]; then printf \"{}\\n\"; fi; exit \"$code\"'",
"timeout": 30
},
{
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-house.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
bin/fm-install-actionlint.sh "$RUNNER_TEMP/bin"
echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"
- name: Lint the changed shell and workflow files
env:
FM_LINT_JOBS: '1'
run: >-
bin/fm-lint.sh
bin/fm-dod-lib.sh
Expand Down
Loading
Loading