Skip to content

feat(bin): let a Claude seat be held out of automatic rotation - #22

Merged
max-metaplanet merged 1 commit into
mainfrom
fm/seat-auto-exclude
Oct 4, 2026
Merged

max-metaplanet merged 1 commit into
mainfrom
fm/seat-auto-exclude

Conversation

@max-metaplanet

Copy link
Copy Markdown
Owner

Intent

bin/fm-seat.sh needs a way to keep a seat out of AUTOMATIC rotation while still allowing a manual switch to it.
The case: seat-max-gmail (~/.claude-seats/seat-max-gmail, just created with fm-seat.sh add) is a personal account outside the Metaplanet org; it should be usable on this machine, but be possible to take in and out of the auto-switch candidates.
Today rotation (switch --next and the automatic watch / lead-restart destination) covers every named seat under the seats root.
Wanted: something like fm-seat.sh auto-exclude <name> / auto-include <name> (or an equivalent documented LOCAL gitignored config such as config/claude-seat-auto-exclude listing names), shown in status and list, honoured by every automatic path including the lead-restart destination choice, with switch <name> still allowed explicitly.
Tests plus docs/claude-seats.md and docs/configuration.md updates; firstmate-coding-guidelines apply.

What Changed

  • Added fm-seat.sh auto-exclude [<name>] and auto-include <name>. They maintain a new local, gitignored config/claude-seat-auto-exclude file with one seat name per line. The file is inherited by local secondmate homes but never sent to a remote route. auto-exclude with no name prints the current exclusions. It refuses default and any name that has no seat profile directory. auto-include succeeds when the seat isn't excluded, and it can clear a stale name.
  • The exclusion is checked in next_seat, the one function that builds the rotation candidate list. That makes it apply to switch --next, the armed watch's switch, the lead-restart destination and the arm feasibility check. Excluded seats are skipped before any quota read, with the reason printed on stderr. switch <name> doesn't go through next_seat, so an excluded seat can still be picked by name. status shows the excluded seats, and list marks each one with "excluded from automatic rotation". The "no destination" errors now suggest auto-include.
  • Added tests in tests/fm-seat.test.sh and updated the docs: docs/claude-seats.md, docs/configuration.md and the config entry in AGENTS.md.

🤖 Generated with Claude Code

Risk Assessment

✅ Low: One shared helper (fm_seat_auto_excluded) holds the exclusion, and the candidate builder next_seat applies it. Every automatic path goes through next_seat: switch --next, the watch's auto_trigger, auto_lead_trigger, the lead-restart destination choice and arm. Explicit switch and lead-restart --to skip it. The change also covers status/list output, config inheritance, docs and behavioral tests, as the intent requires.

Testing

I drove the real fm-seat.sh CLI with the real quota-axi against the real ~/.claude-seats root, using a throwaway FM_HOME that I deleted afterwards. I covered exclude/include round trips, status and list output, switch --next, arm, the watch pass, lead-restart --check, and an explicit switch to an excluded seat. All of these behaved as intended. The real quota reader intermittently gave no login verdict for seat-max2, so I could not repeat the step where rotation reaches a seat again after it is re-included. That scenario is marked untested live. The deterministic auto-exclude tests in tests/fm-seat.test.sh cover that path, including the watch and lead-restart, and all of them passed. This is a CLI-only change, so there is no visual surface; the evidence is CLI transcripts.

  • Live validation: ✅ go - 6 of 7 scenarios driven live against the product
Scenario Result Live Evidence
Excluding seat-max-gmail records it and marks it as excluded in list, status and the bare auto-exclude listing; a repeat exclude is a no-op ✅ pass live 01-exclude-list-status.txt
switch --next from seat-max skips the excluded seat-max-gmail with a stated reason and lands on seat-max2 ✅ pass live 02-rotation-explicit-arm.txt
Adversarial: with every other seat excluded, switch --next and arm refuse with the per-seat exclusion reasons, and the active seat does not move ✅ pass live 02-rotation-explicit-arm.txt
Explicit switch to the excluded seat-max-gmail still succeeds (with --force, only because its login cannot be confirmed on this machine) and it stays excluded ✅ pass live 03-include-and-explicit-switch.txt
lead-restart --check never picks an excluded seat as firstmate's destination ✅ pass live 04-lead-restart-and-watch.txt
The automatic watch pass (fm-seat.sh auto) with the threshold crossed does not switch onto an excluded seat, for workers or for the lead ✅ pass live 04-lead-restart-and-watch.txt
auto-include puts a seat back (idempotent) and rotation reaches it again ⏸️ untested no The prior payload did not establish a live result for the full scenario. The auto-include step ran live, but the real quota-axi gave no login verdict for seat-max2 on the retries (likely rate limiting…
Evidence: auto-exclude, list and status transcript (real seats root)

Source: auto-exclude, list and status transcript (real seats root)

$ fm-seat.sh list
seats root: ~/.claude-seats
* default	logged-in	[email protected]	(ambient default login)
  seat-max	logged-in	[email protected]	~/.claude-seats/seat-max
  seat-max-gmail	unknown	-	~/.claude-seats/seat-max-gmail
  seat-max2	logged-in	[email protected]	~/.claude-seats/seat-max2
[exit 0]

$ fm-seat.sh status
active seat for NEW workers: default
active profile: (ambient default login)
login state: logged-in
firstmate itself is running on: (not recorded for this session)
auto-switch trigger: (unset - no automatic switching)
destination minimum: (unset - any logged-in seat is a valid destination)
extra-usage policy: (unset - nothing holds Claude dispatch)
excluded from automatic rotation: (none - every seat under the root is a rotation candidate)
auto-switch watch: not armed
new Claude dispatch: allowed
  no extra-usage policy is configured, so no quota is read and nothing holds

live workers keep the seat they launched with:
  (no task records)

local secondmate homes declining inherited seats:
  (none - every local home takes this seat)
[exit 0]

$ fm-seat.sh auto-exclude
(none - every seat under the root is an automatic rotation candidate)
[exit 0]

$ fm-seat.sh switch seat-max
switched: default -> seat-max
applies to NEW claude workers only; running workers keep their own seat
config-push: no live secondmate homes found
[exit 0]

$ fm-seat.sh auto-exclude seat-max-gmail
excluded from automatic rotation: seat-max-gmail
'fm-seat.sh switch seat-max-gmail' still switches to it; only the automatic paths skip it
[exit 0]

$ fm-seat.sh auto-exclude seat-max-gmail
already excluded from automatic rotation: seat-max-gmail
[exit 0]

$ fm-seat.sh auto-exclude
seat-max-gmail
[exit 0]

--- config file:
seat-max-gmail

$ fm-seat.sh list
seats root: ~/.claude-seats
  default	logged-in	[email protected]	(ambient default login)
* seat-max	logged-in	[email protected]	~/.claude-seats/seat-max
  seat-max-gmail	unknown	-	~/.claude-seats/seat-max-gmail	excluded from automatic rotation
  seat-max2	logged-in	[email protected]	~/.claude-seats/seat-max2
[exit 0]

$ fm-seat.sh status
active seat for NEW workers: seat-max
active profile: ~/.claude-seats/seat-max
login state: logged-in
firstmate itself is running on: (not recorded for this session)
auto-switch trigger: (unset - no automatic switching)
destination minimum: (unset - any logged-in seat is a valid destination)
extra-usage policy: (unset - nothing holds Claude dispatch)
excluded from automatic rotation: seat-max-gmail (switch <name> still reaches them)
auto-switch watch: not armed
new Claude dispatch: allowed
  no extra-usage policy is configured, so no quota is read and nothing holds

live workers keep the seat they launched with:
  (no task records)

local secondmate homes declining inherited seats:
  (none - every local home takes this seat)
[exit 0]
Evidence: switch --next skips excluded seat; all-excluded refusal for switch --next and arm

Source: switch --next skips excluded seat; all-excluded refusal for switch --next and arm

## active=seat-max, excluded=seat-max-gmail; rotation should skip gmail and land on seat-max2
$ fm-seat.sh switch --next
seat seat-max-gmail: skipped, excluded from automatic rotation (fm-seat.sh auto-include seat-max-gmail puts it back; switch seat-max-gmail still reaches it)
switched: seat-max -> seat-max2
applies to NEW claude workers only; running workers keep their own seat
config-push: no live secondmate homes found
[exit 0]

$ fm-seat.sh switch seat-max
switched: seat-max2 -> seat-max
applies to NEW claude workers only; running workers keep their own seat
config-push: no live secondmate homes found
[exit 0]

## adversarial: exclude seat-max2 too -> no automatic destination at all
$ fm-seat.sh auto-exclude seat-max2
excluded from automatic rotation: seat-max2
'fm-seat.sh switch seat-max2' still switches to it; only the automatic paths skip it
[exit 0]

$ fm-seat.sh switch --next
seat seat-max-gmail: skipped, excluded from automatic rotation (fm-seat.sh auto-include seat-max-gmail puts it back; switch seat-max-gmail still reaches it)
seat seat-max2: skipped, excluded from automatic rotation (fm-seat.sh auto-include seat-max2 puts it back; switch seat-max2 still reaches it)
error: no seat under the seats root qualifies as a destination (each skipped seat and its reason is printed above); add and log into a second seat, put an excluded seat back with 'fm-seat.sh auto-include <name>', or lower 'fm-seat.sh destination-min' (docs/claude-seats.md). The default profile is never a rotation target, so switch to it by name if that is what you want
[exit 1]

--- active seat file after refused rotation:
seat-max

$ fm-seat.sh threshold 100
auto-switch threshold: 100% left
[exit 0]

$ fm-seat.sh arm
seat seat-max-gmail: skipped, excluded from automatic rotation (fm-seat.sh auto-include seat-max-gmail puts it back; switch seat-max-gmail still reaches it)
seat seat-max2: skipped, excluded from automatic rotation (fm-seat.sh auto-include seat-max2 puts it back; switch seat-max2 still reaches it)
error: no seat under the seats root qualifies as a destination right now, so an automatic switch would have nowhere to go (each skipped seat and its reason is printed above); add and log into a second seat, put an excluded seat back with 'fm-seat.sh auto-include <name>', or lower 'fm-seat.sh destination-min' (docs/claude-seats.md). The default profile is never a rotation target
[exit 1]

## explicit manual switch to an excluded seat still works
$ fm-seat.sh switch seat-max2
error: could not confirm seat 'seat-max2' is logged in (quota read gave no verdict); re-run with --force to switch anyway
[exit 1]

$ fm-seat.sh switch seat-max
seat unchanged: seat-max
[exit 0]

## auto-include puts seat-max2 back
$ fm-seat.sh auto-include seat-max2
back in automatic rotation: seat-max2
[exit 0]

$ fm-seat.sh auto-include seat-max2
not excluded from automatic rotation: seat-max2
[exit 0]

$ fm-seat.sh auto-exclude
seat-max-gmail
[exit 0]

$ fm-seat.sh switch --next
seat seat-max-gmail: skipped, excluded from automatic rotation (fm-seat.sh auto-include seat-max-gmail puts it back; switch seat-max-gmail still reaches it)
seat seat-max2: skipped, its login state could not be confirmed
error: no seat under the seats root qualifies as a destination (each skipped seat and its reason is printed above); add and log into a second seat, put an excluded seat back with 'fm-seat.sh auto-include <name>', or lower 'fm-seat.sh destination-min' (docs/claude-seats.md). The default profile is never a rotation target, so switch to it by name if that is what you want
[exit 1]
Evidence: explicit switch to excluded seat-max-gmail succeeds

Source: explicit switch to excluded seat-max-gmail succeeds

## retry: excluded seat-max-gmail, seat-max2 included again; rotation from seat-max
$ fm-seat.sh switch --next
seat seat-max-gmail: skipped, excluded from automatic rotation (fm-seat.sh auto-include seat-max-gmail puts it back; switch seat-max-gmail still reaches it)
seat seat-max2: skipped, its login state could not be confirmed
error: no seat under the seats root qualifies as a destination (each skipped seat and its reason is printed above); add and log into a second seat, put an excluded seat back with 'fm-seat.sh auto-include <name>', or lower 'fm-seat.sh destination-min' (docs/claude-seats.md). The default profile is never a rotation target, so switch to it by name if that is what you want
[exit 1]

## explicit manual switch to the excluded seat-max-gmail (login unconfirmed on this machine, so --force as the CLI instructs)
$ fm-seat.sh switch seat-max-gmail
error: could not confirm seat 'seat-max-gmail' is logged in (quota read gave no verdict); re-run with --force to switch anyway
[exit 1]

$ fm-seat.sh switch --force seat-max-gmail
switched: seat-max -> seat-max-gmail
applies to NEW claude workers only; running workers keep their own seat
config-push: no live secondmate homes found
[exit 0]

$ fm-seat.sh status
active seat for NEW workers: seat-max-gmail
active profile: ~/.claude-seats/seat-max-gmail
login state: unknown
firstmate itself is running on: (not recorded for this session)
auto-switch trigger: at or below 100% left on the active seat
destination minimum: (unset - any logged-in seat is a valid destination)
extra-usage policy: (unset - nothing holds Claude dispatch)
excluded from automatic rotation: seat-max-gmail (switch <name> still reaches them)
auto-switch watch: not armed
new Claude dispatch: allowed
  no extra-usage policy is configured, so no quota is read and nothing holds

live workers keep the seat they launched with:
  (no task records)

local secondmate homes declining inherited seats:
  (none - every local home takes this seat)
[exit 0]

$ fm-seat.sh switch seat-max
switched: seat-max-gmail -> seat-max
applies to NEW claude workers only; running workers keep their own seat
config-push: no live secondmate homes found
[exit 0]
Evidence: lead-restart --check and watch pass honour the exclusion

Source: lead-restart --check and watch pass honour the exclusion

## throwaway home: lead recorded on seat-max, active seat seat-max, threshold 100% (always crossed)
$ fm-seat.sh auto-exclude seat-max2
excluded from automatic rotation: seat-max2
'fm-seat.sh switch seat-max2' still switches to it; only the automatic paths skip it
[exit 0]

$ fm-seat.sh auto-exclude
seat-max-gmail
seat-max2
[exit 0]

$ fm-seat.sh status
active seat for NEW workers: seat-max
active profile: ~/.claude-seats/seat-max
login state: logged-in
firstmate itself is running on: seat-max
auto-switch trigger: at or below 100% left on the active seat
destination minimum: (unset - any logged-in seat is a valid destination)
extra-usage policy: (unset - nothing holds Claude dispatch)
excluded from automatic rotation: seat-max-gmail seat-max2 (switch <name> still reaches them)
auto-switch watch: not armed
new Claude dispatch: allowed
  no extra-usage policy is configured, so no quota is read and nothing holds

live workers keep the seat they launched with:
  (no task records)

local secondmate homes declining inherited seats:
  (none - every local home takes this seat)
[exit 0]

## lead-restart destination with every other seat excluded
$ fm-seat.sh lead-restart --check
seat seat-max-gmail: skipped, excluded from automatic rotation (fm-seat.sh auto-include seat-max-gmail puts it back; switch seat-max-gmail still reaches it)
seat seat-max2: skipped, excluded from automatic rotation (fm-seat.sh auto-include seat-max2 puts it back; switch seat-max2 still reaches it)
error: no seat under the seats root qualifies as a destination for firstmate itself (each skipped seat and its reason is printed above); add and log into another seat, put an excluded seat back with 'fm-seat.sh auto-include <name>', or lower 'fm-seat.sh destination-min' (docs/claude-seats.md)
[exit 1]

## one watch pass (the armed watch's body) with every other seat excluded
$ fm-seat.sh auto
claude-seat: seat-max is at 0% left and no seat has enough headroom to switch to; no extra-usage policy is set, so nothing is held.
claude-seat: firstmate itself is at 0% left on seat-max and no seat qualifies as a destination, so it stays where it is
[exit 0]

--- active seat after watch pass:
seat-max

## include seat-max2 and re-ask the lead-restart destination
$ fm-seat.sh auto-include seat-max2
back in automatic rotation: seat-max2
[exit 0]

$ fm-seat.sh lead-restart --check
seat seat-max-gmail: skipped, excluded from automatic rotation (fm-seat.sh auto-include seat-max-gmail puts it back; switch seat-max-gmail still reaches it)
seat seat-max2: skipped, its login state could not be confirmed
error: no seat under the seats root qualifies as a destination for firstmate itself (each skipped seat and its reason is printed above); add and log into another seat, put an excluded seat back with 'fm-seat.sh auto-include <name>', or lower 'fm-seat.sh destination-min' (docs/claude-seats.md)
[exit 1]
Evidence: targeted auto-exclude test run

Source: targeted auto-exclude test run

ok - an unset seat setting is the ambient default and configures no automatic switching
ok - a switch to a logged-in seat records the seat and nothing else
ok - a switch to a profile that is not logged in is refused and changes nothing
ok - --force does not override a seat proven to be logged out
ok - a rate-limited signed-in seat is undecided, and --force switches onto it
ok - an unreadable credential store reads as undecided and --force may cross it
ok - a forced switch refuses a seat whose profile directory does not exist
ok - switching to the default seat clears the setting and restores ambient behaviour
ok - a seat switch reaches running local secondmate homes and reports each one
ok - a failed secondmate push is reported and never undoes the primary switch
ok - a local home that declines keeps its own three seat settings through a switch
ok - one home's decline leaves every other local home taking the switch
ok - status names every local home that declined and the seat it is really on
ok - a decline flag of any type declines and shows in status
ok - seat settings reach local secondmate homes only and never cross to a remote route
ok - a seat switch pushes only local secondmate homes and never waits on a remote route
ok - fm-config-push reaches remote routes by default and skips them only with --local-only
ok - the auto-switch threshold is configurable, validated, clearable, and unset by default
ok - the threshold condition turns true exactly at the configured percent
ok - an unreadable quota never trips an automatic switch
ok - only account-level quota windows count toward the auto-switch threshold
ok - the default seat's probe and threshold read the ambient profile new workers launch with
ok - a home that configures none of the automatic settings behaves exactly as before they existed
ok - the dispatch gate reads no quota at all until an extra-usage policy is configured
ok - the destination minimum is settable by command, validated, clearable, and unset by default
ok - a switch skips a logged-in seat below the destination minimum and lands on one above it
ok - no switch happens when every candidate is below the destination minimum
ok - a candidate whose quota gives no verdict is skipped, never guessed at as headroom
ok - the extra-usage policy is settable by command, validated, clearable, and unset by default
ok - the stop policy holds new dispatch only once the active seat's plan quota is gone
ok - the allow policy dispatches under its dollar cap and holds once the spend reaches it
ok - an unreadable quota holds dispatch instead of guessing, and the hold lifts once it reads again
ok - the watch keeps running after a switch, fires once per crossing, and catches the next seat's own
ok - with no seat qualifying the watch reports the policy consequence once and switches nothing
ok - the watch's wake line and status agree while the seat still has plan quota
ok - after a crossing with nowhere to go, the watch keeps looking and switches once a seat recovers
ok - every quota read one automatic pass makes stays inside the watcher's per-check budget
ok - the watch switches nothing when the active seat's quota gives no verdict
ok - arm registers a repeating watch the watcher can run, and retire removes it cleanly
ok - status reports all three automatic settings, every percentage counting percent left
ok - rotation chooses the next logged-in seat under the root and skips ones with no credentials
ok - a lapsed but renewable seat reads as usable instead of unknown
ok - the lapsed verdict is read from authStatus, not from the error text
ok - switching to a lapsed seat succeeds without --force
ok - rotation treats a lapsed seat as a destination when no destination minimum is set
ok - a destination minimum skips a lapsed seat for unknown headroom, not for its login state
ok - a genuinely signed-out seat is refused and --force cannot cross it
ok - rotation separates a signed-out seat from a merely lapsed one
ok - an auth_required read from a rejected request is undecided and --force may cross it
ok - rotation never targets the default profile, even when it is the only other logged-in store
ok - rotation never assumes which seats exist and picks up seats added later
ok - rotation refuses with an accurate reason per seat rather than pretending to switch
ok - auto-exclude and auto-include round trip idempotently and leave no empty record behind
ok - auto-exclude refuses a name that is not a seat and the default login that is never a target
ok - status and list both report which seats are held out of automatic rotation
ok - switch --next skips an excluded seat and reaches it again once it is included
ok - an excluded seat stays manually switchable and stays out of automatic rotation
ok - excluding the active seat withholds it as a future destination and moves nothing
ok - excluding every candidate falls through to the existing no-destination refusal
ok - the armed watch skips an excluded seat even when it has the most headroom
ok - the lead-restart destination choice skips an excluded seat like every other automatic path

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.

  • Live validation: ✅ go - 6 of 7 scenarios driven live against the product
Scenario Result Live Evidence
Excluding seat-max-gmail records it and marks it as excluded in list, status and the bare auto-exclude listing; a repeat exclude is a no-op ✅ pass live 01-exclude-list-status.txt
switch --next from seat-max skips the excluded seat-max-gmail with a stated reason and lands on seat-max2 ✅ pass live 02-rotation-explicit-arm.txt
Adversarial: with every other seat excluded, switch --next and arm refuse with the per-seat exclusion reasons, and the active seat does not move ✅ pass live 02-rotation-explicit-arm.txt
Explicit switch to the excluded seat-max-gmail still succeeds (with --force, only because its login cannot be confirmed on this machine) and it stays excluded ✅ pass live 03-include-and-explicit-switch.txt
lead-restart --check never picks an excluded seat as firstmate's destination ✅ pass live 04-lead-restart-and-watch.txt
The automatic watch pass (fm-seat.sh auto) with the threshold crossed does not switch onto an excluded seat, for workers or for the lead ✅ pass live 04-lead-restart-and-watch.txt
auto-include puts a seat back (idempotent) and rotation reaches it again ⏸️ untested no The prior payload did not establish a live result for the full scenario. The auto-include step ran live, but the real quota-axi gave no login verdict for seat-max2 on the retries (likely rate limiting…
  • fm-seat.sh list|status|auto-exclude before and after auto-exclude seat-max-gmail (real seats root, real quota-axi, throwaway FM_HOME)
  • fm-seat.sh auto-exclude seat-max-gmail twice (idempotency) and reading config/claude-seat-auto-exclude
  • fm-seat.sh switch --next from seat-max with seat-max-gmail excluded → landed on seat-max2
  • fm-seat.sh auto-exclude seat-max2 then switch --next and arm (threshold 100) → refusal; active seat unchanged
  • fm-seat.sh switch --force seat-max-gmail while excluded → switched; status shows it active and still excluded
  • fm-seat.sh auto-include seat-max2 twice (idempotency)
  • fm-seat.sh lead-restart --check with a lead recorded on seat-max and every other seat excluded → refusal naming the exclusions
  • fm-seat.sh auto (one watch pass, threshold 100) with every other seat excluded → no switch, lead stays put
  • Targeted tests in tests/fm-seat.test.sh: the 9 auto-exclude/include cases (deterministic quota fake) plus the earlier seat cases that ran with them; all passed
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

A seat can now be usable on this machine without being a candidate an
automatic switch may land on: the case is an account that belongs to a
different payer, such as a personal account alongside the team ones,
which should be reachable deliberately and never picked up by a switch
nobody was present for. The existing destination-min setting cannot
express that, because it asks whether a seat is nearly empty rather than
whose account it is.

`fm-seat.sh auto-exclude <name>` and `auto-include <name>` are the only
writers of the new local, gitignored config/claude-seat-auto-exclude,
one seat name per line. Both are idempotent; an exclusion is refused for
a name with no seat directory, since an exclusion matching nothing would
silently keep rotating onto the seat it was meant to withhold, and for
the `default` login that is never an automatic target anyway.
`auto-include` accepts any name so a stale entry can always be cleared.

Every automatic path reads the exclusion through next_seat, which was
already the one place a candidate set is built, so `switch --next`, the
armed watch's switch, the watch's instruction to move the lead, the
lead-restart destination, and the feasibility check `arm` makes all skip
an excluded seat and none of them can be the one that forgets. An
explicit `switch <name>` does not come through that function, which is
what keeps the seat manually reachable. Excluding every candidate falls
through to the existing no-destination refusal rather than any new
behaviour, and excluding the active seat withholds it as a future
destination without moving any worker off it.

`status` names every excluded seat and `list` marks each one; a home
that excludes nothing reads exactly as it did before. The file follows
the same inheritance contract as the other five seat settings: into
local secondmate homes, never to a remote route, declined by
config/claude-seat-local.
@max-metaplanet
max-metaplanet merged commit a7fb455 into main Oct 4, 2026
21 checks passed
max-metaplanet added a commit that referenced this pull request Oct 6, 2026
A seat can now be usable on this machine without being a candidate an
automatic switch may land on: the case is an account that belongs to a
different payer, such as a personal account alongside the team ones,
which should be reachable deliberately and never picked up by a switch
nobody was present for. The existing destination-min setting cannot
express that, because it asks whether a seat is nearly empty rather than
whose account it is.

`fm-seat.sh auto-exclude <name>` and `auto-include <name>` are the only
writers of the new local, gitignored config/claude-seat-auto-exclude,
one seat name per line. Both are idempotent; an exclusion is refused for
a name with no seat directory, since an exclusion matching nothing would
silently keep rotating onto the seat it was meant to withhold, and for
the `default` login that is never an automatic target anyway.
`auto-include` accepts any name so a stale entry can always be cleared.

Every automatic path reads the exclusion through next_seat, which was
already the one place a candidate set is built, so `switch --next`, the
armed watch's switch, the watch's instruction to move the lead, the
lead-restart destination, and the feasibility check `arm` makes all skip
an excluded seat and none of them can be the one that forgets. An
explicit `switch <name>` does not come through that function, which is
what keeps the seat manually reachable. Excluding every candidate falls
through to the existing no-destination refusal rather than any new
behaviour, and excluding the active seat withholds it as a future
destination without moving any worker off it.

`status` names every excluded seat and `list` marks each one; a home
that excludes nothing reads exactly as it did before. The file follows
the same inheritance contract as the other five seat settings: into
local secondmate homes, never to a remote route, declined by
config/claude-seat-local.
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.

1 participant