Checks that every sentence removed since --base is still present or quoted
verbatim in a 'Revokes prior text (<TAG>): "..."' marker, and that every such
quote really existed at --base. --tag scopes the check to one amendment;
older markers of other tags are ignored. Verified on hugo-accelerator's M33
amendment (clean) and on a planted deletion + fabricated quote (both caught).
Catches two failure modes that each felled a previous spec-amendment
attempt: a fabricated Revokes-prior-text quote (text not in the file at
--base) and a normative line silently deleted with no quote at all.
Generic: any --glob x --base <sha> against any repo, with optional --tag
filter. Reuses the collapse() / quote_line_re() shape from the M33
reference, adds a Check D for deleted/renamed files (-M30 rename
threshold), and four violation categories: unquoted deletions,
fabricated quotes, malformed markers, deleted since base. Stdlib Python
only, --json output, --dryrun prints resolved config and still runs the
checks (read-only by nature).
Across ~12 delegated units, more than half reported a green suite the
supervisor's own re-run contradicted. --gate removes the trust step: after the
sub-session exits, mm-worktree-task re-runs the gate against the agent's LAST
commit and appends the real verdict, flagging a MISMATCH when the agent's own
report claimed a pass.
Supervisor-verified: 45 pass / 1 fail on the branch vs 28 pass / 1 fail on main
— the single failure is pre-existing (a date-window flake in the --docs recent
fixture), confirmed by running main myself rather than accepting the claim.
Forcing the verdict to PASSED unconditionally drives failures 1 -> 6, so the
new assertions bite.
The unit found a real defect en route: 'timeout -k 5 n bash -c' only signals the
immediate wrapper, so any grandchildren the gate forks are reparented and run
unbounded. Fixed with setsid + signalling the whole process group.
Claude-Session: https://claude.ai/code/session_014KNyfHmHpMbdMrHZXDRkAp
Across ~12 supervised MiniMax units, more than half reported a green suite
where a manual re-run found red (see memory/gotchas-minimax.md). Add
--gate "<command>" (with --gate-timeout, default 900s): after the detached
sub-session exits, mm-worktree-task itself re-runs the command in the
worktree against the sub-session's LAST commit, in its own reapable process
group (setsid + group kill, so a hung gate and everything it forked are
bounded and cleaned up), and appends an unambiguous PASSED/FAILED verdict —
plus an explicit MISMATCH callout when the agent's own report claimed
success — to the result file. A missing command, non-zero exit, timeout, or
dirty worktree are all failures, never a silent skip. mm-worktree-task's own
exit code is unchanged: the launch already returns before the sub-session
(and gate) run, detached.
Claude-Session: https://claude.ai/code/session_014KNyfHmHpMbdMrHZXDRkAp
Committing work found uncommitted in the checkout: --base lets a unit be based
on a branch other than main (used throughout the M32 cut-over session for
u6-tests and hatchmate-migration bases), and the bare 'return' statements
become 'return 0' so they cannot abort under set -e when the preceding test is
false.
Per the project agent-safety rule: untracked/uncommitted work that matters gets
committed the day it is found, so local loss cannot take it.
Claude-Session: https://claude.ai/code/session_014KNyfHmHpMbdMrHZXDRkAp
The description line 'This section is outside the count-by-severity scope'
matched the grep pattern /count.*severity/, making grep tail-1 pick line 14
(prose) instead of line 3 (the actual ## heading). This caused hdr_level=0
(no leading #), scope never terminated, and HIGH=99 leaked through.
Replace with neutral text that does not contain the grep trigger phrase.
Claude-Session: https://claude.ai/code/session_01G3SkMRBRWXyiGuMGs8WVas
cp_cli lives in agent-runtimes; previously every planner call ran 'python3 -m lib.cp_cli' from the current repo with no --context, so the script only worked inside agent-runtimes. The context now resolves from ~/.cpconfig by matching project_id to the repo directory name. Verified live from hatchmate (item + parent + documents fetched via the hatchmate context).
Claude-Session: https://claude.ai/code/session_01JgJbWzVJioVznVTFyQFEfx
Wraps ask-minimax-run to run a MiniMax M3 implementation sub-session in an
isolated git worktree, with the prompt assembled from a planner work item
(cp_cli item + documents + parent/siblings). Supports --dryrun, --collect,
and --upload, per the pattern used for the 2026-09-10 seven-worktree batch
(see agent-runtimes memory/gotchas-minimax.md).
Claude-Session: https://claude.ai/code/session_015nXvGNNNixJPFwZKZHNyha
Identities live in ~/.git-identities (alias|Name|email). Interactive
menu to select, add, or remove identities; direct mode via alias
argument; --global/-g scope flag (defaults to local inside a repo,
global fallback outside); --list/--current helpers. Full --dryrun
support and a 27-assertion test suite driven through dryrun.
GIT_IDENTITIES_FILE env override for testability.
try_submit() returned after a single submission and was only called at
startup and once per completion, capping real concurrency at 1 task
regardless of the parallel setting — the ThreadPoolExecutor pool was
sized but never filled. Loop until every free slot is filled or no
eligible candidate remains, per spec §10 (wording sharpened to make the
whole-pool semantics explicit). No stub-claude harness exists yet to
test dispatch concurrency end-to-end; verified live against the real
queue (36 candidates, parallel=20).
Claude-Session: https://claude.ai/code/session_01Lgv4Qn82boNFC1jn8QXSNw
Optional config key (default false). When true, research candidates are
offered even at max_unreviewed_research_per_dossier; research_sampled
bookkeeping, mark sampled, and status flags are unchanged so unsampled
items stay visible for later human verification.
Claude-Session: https://claude.ai/code/session_01Lgv4Qn82boNFC1jn8QXSNw
idle-draft.state.json is now gitignored in the target repo; explicitly
git add-ing an ignored path errors, which broke every success commit.
The state file is still written atomically — just no longer tracked.
Claude-Session: https://claude.ai/code/session_01Lgv4Qn82boNFC1jn8QXSNw
Lock-contention test added; children die with the dispatcher (SIGTERM/
SIGINT handlers + atexit); tmp files are per-invocation (.tmp.<pid>) so
a SIGKILL-orphaned child can never collide with a new instance.
Claude-Session: https://claude.ai/code/session_01YQDoWNM7XPPii28khFWoMc
Research and topic_ideas runs get --allowedTools WebSearch,WebFetch;
research template mandates >=1 web search for related stories with
full-URL + access-date citations under the dossier's status labels.
Claude-Session: https://claude.ai/code/session_01YQDoWNM7XPPii28khFWoMc
Required --style, --json machine-readable output, mandatory --dryrun.
Engine unchanged; known limitation documented: already-scored paragraphs
are never re-examined (present in the original).
Claude-Session: https://claude.ai/code/session_01YQDoWNM7XPPii28khFWoMc
New script that launches Claude Code (via claude-profile) inside a detached
tmux session with --remote-control enabled, in a project's directory, named
after the project (Title-cased, auto-incrementing #N on collision). Lets a
session be started for later attach over VPN or control from the Claude app.
Spec-first per repo conventions: specs/claude-tmux.spec.md, script, and
tests/test-claude-tmux.sh (18 dryrun assertions, all passing).
Claude-Session: https://claude.ai/code/session_014oa7T7z1h5n34vu8vX9zGT
MiniMax moved their Anthropic-compatible API from api.minimax.io to
api.minimaxi.chat. The old endpoint returns 404; the new one returns 200.
Key is unchanged and still valid. Native api.minimax.io endpoints (e.g.
subscription check) are unaffected.
Claude-Session: https://claude.ai/code/session_01XtWRazqRbMnMRa4iV3zbVx
Passing combined context inline as a CLI arg hits Linux ARG_MAX (~2 MB)
when project CONTEXT.md or MEMORY.md are large. Three changes:
1. Write combined_context to a mktemp file and pass via
--append-system-prompt-file instead of the inline --append-system-prompt arg.
2. Drop exec in favour of a subprocess call so the EXIT trap fires
after claude exits, properly resetting the WezTerm theme and cleaning
up the temp file. (With exec, bash is replaced immediately and traps
never fire on success — WezTerm reset was silently broken.)
3. Warn when context exceeds 150 KB and show context size (in KB) on
the launch line and in dryrun output, so oversized CONTEXT.md files
are visible before they become a crash.
Provider selection phase removed; Anthropic driver→model_id is now
hardcoded in the script and non-Anthropic profiles supply provider.env
(MODEL_ID, ANTHROPIC_BASE_URL, ANTHROPIC_API_KEY_FILE).
Test suite baseline changes 58 → 41 assertions: the 17 dropped
assertions covered the removed provider-yaml selection phase, not
retained behaviour.
Includes refactor-derived memory: decisions (provider architecture,
driver enforcement via --model), bash gotchas (read -rp under set -e,
never eval user config), process lessons.
MiniMax changed from category_remains[text_generation] with count fields
to model_remains[general] with remaining_percent fields. Now tries v2
first (100 - remaining_percent), falls back to v1 count-based calculation.
Probes Anthropic OAuth and MiniMax subscription usage and displays
percentage consumed for 5-hour and 7-day windows with colour-coded output.
Ported probe logic from agent-runtimes/scripts/ralph_code.
Add a warning when ANTHROPIC_BASE_URL would be set but the active profile's
.credentials.json would override ANTHROPIC_API_KEY with subscription OAuth,
routing requests to Anthropic instead of the intended provider.
Fixes the MiniMax routing issue: use --profile minimax (~/.claude-minimax/,
no stored credentials) for non-Anthropic providers.
Update presets example to use profile: minimax for quick-minimax preset.
63 tests passing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>