Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/alphaelements/handoff-mcp/session-loop-multi-wtgit clone --depth 1 https://github.com/alphaelements/handoff-mcpWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00024 | $0.04588 |
| Opus 5 | $0.00012 | $0.02294 |
| Sonnet 5 | $0.00005 | $0.00918 |
| Haiku 4.5 | $0.00002 | $0.00459 |
Grade A, and why
session-loop-multi-wt scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 406 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Multi-WT Session Loop Extension
This file contains the multi-worktree steps referenced by session-loop.md.
Read this only when auto_assign = true in config.toml. When auto_assign
is false (default) or absent, these steps do not apply.
These steps interleave with the main session-loop procedure:
- Steps 1b–1d run between Step 1 (fetch tasks) and Step 2 (plan implementation)
- Step 5-wt replaces the conventional Step 5 (launch Workflow)
- Step 6 multi-WT replaces the conventional Step 6 (process results)
- Steps 9–10 run after Step 8 (next session), before session close
Step 1b. Functional grouping + WT assignment plan
Gate check:
handoff_get_config
Read worktree.session_loop.auto_assign. If it is absent or false, skip
Steps 1b/1c/1d and continue at Step 2 with the todo tasks fetched in Step 1.
Only proceed with the rest of this step when it is explicitly true.
Grouping logic (applied to the todo tasks fetched in Step 1):
- Dependency chains: tasks connected by
dependenciesbelong to the same group — a WT boundary must never split a dependency edge. - File scope overlap: fetch each task's
scope_pathsviahandoff_get_task. Tasks whosescope_pathsoverlap (same file/dir, or a prefix relationship) belong to the same group. Whenscope_pathsis empty for a task, estimate its file footprint fromnotes/titleinstead of leaving it ungrouped. - Functional proximity: tasks that clearly belong to the same feature or subsystem (e.g. all "auth", all "api") are grouped together even without a direct dependency or scope overlap — this is a manager (LLM) judgment call, not a mechanical rule.
- Single-group fallback: if grouping produces a single group, or the total
task count is
<= MAX_TASKS_PER_SESSION, do not use WTs — fall back to the conventional single-session flow (Step 2 onward) exactly as ifauto_assignwerefalse. Multi-WT execution only makes sense when there are genuinely independent, parallelizable groups.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 406 lines · 24 tokens per session scan A 67c55f9b2854
session-loop-multi-wt is a command published in the GitHub repository alphaelements/handoff-mcp (0 stars, last pushed 3d ago), licensed MIT. It adds 24 tokens to every session and 4,588 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
constitution
Create or update the project constitution from interactive or provided principle inputs.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.