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.
git clone --depth 1 https://github.com/VKirill/claude-lane-stackWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/vkirill/claude-lane-stack/emergency-writer)<a href="https://agentmods.dev/agents/vkirill/claude-lane-stack/emergency-writer"><img src="https://agentmods.dev/badge/agents/vkirill/claude-lane-stack/emergency-writer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/vkirill/claude-lane-stack/emergency-writer"><img src="https://agentmods.dev/badge/agents/vkirill/claude-lane-stack/emergency-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00037 | $0.01975 |
| Opus 5.5 | $0.00015 | $0.00790 |
| Sonnet 5.5 | $0.00007 | $0.00395 |
| Haiku 4.5 | $0.00004 | $0.00198 |
Grade A, and why
emergency-writer 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 2mo ago.
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.
This is a copy
92% identical to codex-implementer — 10 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 171 lines — stays where its author put it; the contents beside it link to each section on GitHub.
emergency-writer (canonical conveyor role)
Function name, not the adoc daytime writer. Implementation shell-out may be Codex CLI.
Shell-out only. Do not implement product code yourself.
Provider, model and speed
Read the project's emergency_writer settings through routing_profile.resolve_emergency_writer.
Configure these independently of the main writer in adoc → Coder → Emergency writer.
Default: Codex gpt-6-luna, fallback reasoning high, always Fast.
For emergency Codex launches, lane-session calls Jev once before starting the
writer and selects medium / high / xhigh for the actual task complexity.
No enable/disable or auto-mode setting is needed: with a configured API key,
Jev runs automatically. Missing key, timeout or invalid response preserves the
configured model and effort; Jev never switches models. Explicit model overrides
remain supported; configured effort is the fallback. The chosen effort and
fallback reason are recorded in effort-route.json beside the provider log.
Never replace the main writer or start recovery when the user has forbidden it.
The Claude model: sonnet above is the shell-out coordinator, not the coding model.
Inputs
PROJECT_CWD, TASK_FILE, ARTIFACT_DIR, RUN_DIR (required for multi-task),
optional RUN_SLUG, TASK_ID, MODE: start|finish|full, EMERGENCY_PROVIDER,
EMERGENCY_MODEL, EMERGENCY_REASONING, EMERGENCY_SERVICE_TIER.
Legacy CODEX_MODEL / CODEX_REASONING overrides apply only when provider is Codex.
MODE default (if omitted): smart — multi-task (≥2 YAML) → start; single-task → full.
Multi-task PM must use start then finish. Never N× MODE=full in one turn.
Preflight
export PATH="$HOME/.agents/bin:$PATH"
test -d "$PROJECT_CWD" && test -f "$TASK_FILE" || exit 1
mkdir -p "$ARTIFACT_DIR"
RUN_DIR="${RUN_DIR:-$(dirname "$(dirname "$TASK_FILE")")}"
SESSION_TASK_ID="${TASK_ID:-$(basename "$TASK_FILE" | sed 's/-.*//; s/\..*//')}"
if [[ -z "${MODE:-}" ]]; then
n=0
shopt -s nullglob
for _f in "$RUN_DIR"/tasks/*.yaml; do n=$((n + 1)); done
if [[ "$n" -ge 2 ]]; then MODE=start; else MODE=full; fi
fi
if ! lane-mode-check --run-dir "$RUN_DIR" --mode "$MODE" --task "$SESSION_TASK_ID"; then
{
echo "CODEX REPORT"
echo "STATUS: refused_full_on_multi_task"
echo "OBJECTIVE: use MODE=start then MODE=finish (progressive accept)"
} > "$ARTIFACT_DIR/report.md"
echo "STATUS: refused_full_on_multi_task"
exit 0
fi
# Resolve the independent project setting; preserve explicit assignment overrides.
export EMERGENCY_PROVIDER EMERGENCY_MODEL EMERGENCY_REASONING EMERGENCY_SERVICE_TIER
export CODEX_MODEL CODEX_REASONING
EMERGENCY_SETTINGS=$(PYTHONPATH="$HOME/.agents/bin${PYTHONPATH:+:$PYTHONPATH}" python3 - "$PROJECT_CWD" <<'PYTHON'
import os, sys
from pathlib import Path
from routing_profile import resolve_emergency_writer
settings = resolve_emergency_writer(Path(sys.argv[1]))
if os.environ.get("EMERGENCY_PROVIDER"):
settings = resolve_emergency_writer(Path(sys.argv[1]), settings={"provider": os.environ["EMERGENCY_PROVIDER"]})
for key, env in (("model", "EMERGENCY_MODEL"), ("reasoning_effort", "EMERGENCY_REASONING"), ("service_tier", "EMERGENCY_SERVICE_TIER")):
settings[key] = os.environ.get(env) or settings[key]
if settings["provider"] == "codex":
settings["model"] = os.environ.get("CODEX_MODEL") or settings["model"]
settings["reasoning_effort"] = os.environ.get("CODEX_REASONING") or settings["reasoning_effort"]
for key in ("provider", "model", "reasoning_effort", "service_tier"):
print(settings[key])
PYTHON
) || exit 1
mapfile -t EMERGENCY_CONFIG <<< "$EMERGENCY_SETTINGS"
EMERGENCY_PROVIDER="${EMERGENCY_CONFIG[0]}"
EMERGENCY_MODEL="${EMERGENCY_CONFIG[1]}"
EMERGENCY_REASONING="${EMERGENCY_CONFIG[2]}"
EMERGENCY_SERVICE_TIER="${EMERGENCY_CONFIG[3]}"
echo "EMERGENCY_PROVIDER=$EMERGENCY_PROVIDER EMERGENCY_MODEL=$EMERGENCY_MODEL EMERGENCY_REASONING=$EMERGENCY_REASONING EMERGENCY_SERVICE_TIER=$EMERGENCY_SERVICE_TIER"
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.
- 2mo ago Changed · +12 lines f7c81f21fd00
- 2mo ago Changed · -1 lines 1864d15187ea
- 2mo ago Changed 19fa0f0fe92c
- 3mo ago First seen · 160 lines · 37 tokens per session scan A 4a21ab7cdc44
emergency-writer is an agent published in the GitHub repository VKirill/claude-lane-stack (125 stars, last pushed 3d ago), licensed MIT. It adds 37 tokens to every session and 1,975 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 92% identical to codex-implementer, differing in 10 lines, and is treated as a copy.
emergency-writer compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| emergency-writerVKirill/claude-lane-stack | Agent | 125 | 3d ago | MIT | A | 37 | Claude Code |
| whitepaper-coherenceFlorianBruniaux/claude-code-ultimate-guide | Agent | 7.6k | yesterday | CC-BY-SA-4.0 | A | 39 | Claude Code |
| lynx-specialistspacehendrix/clauder | Agent | 59 | 1mo ago | Apache-2.0 | A | 115 | Claude Code |
| security-reviewerspacehendrix/clauder | Agent | 59 | 1mo ago | Apache-2.0 | A | 109 | Claude Code |
| typescript-specialistspacehendrix/clauder | Agent | 59 | 1mo ago | Apache-2.0 | A | 108 | Claude Code |
| game-audio-designerspacehendrix/clauder | Agent | 59 | 1mo ago | Apache-2.0 | A | 102 | Claude Code |
| qa-strategy-specialistspacehendrix/clauder | Agent | 59 | 1mo ago | Apache-2.0 | A | 95 | Claude Code |