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.svg" alt="Measured on agentmods" 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.01825 |
| Opus 5 | $0.00018 | $0.00912 |
| Sonnet 5 | $0.00007 | $0.00365 |
| Haiku 4.5 | $0.00004 | $0.00183 |
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 2d 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 — 160 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.
Model + effort (token-aware)
| Trigger | Model | Effort |
|---|---|---|
risk: low and ≤3 owns_paths entries |
gpt-5.6-terra |
medium |
risk: medium / default |
gpt-5.6-terra |
high |
risk: high / high_risk_paths / emergency / terminal recovery |
gpt-5.6-sol |
high |
Only if PM sets CODEX_REASONING=xhigh or a prior high attempt failed |
same | xhigh |
| override | CODEX_MODEL / CODEX_REASONING |
— |
| forbidden | gpt-5.5; luna for multi-file | — |
No fast_write lane. Do not burn high/xhigh "because fast".
See docs/decisions/ADR-codex-effort.md.
# Defaults — compute from TASK_FILE unless env override
CODEX_MODEL="${CODEX_MODEL:-}"
CODEX_REASONING="${CODEX_REASONING:-}"
Inputs
PROJECT_CWD, TASK_FILE, ARTIFACT_DIR, RUN_DIR (required for multi-task),
optional RUN_SLUG, TASK_ID, MODE: start|finish|full, CODEX_MODEL, CODEX_REASONING
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
command -v codex && codex --version
# --- effort policy (skip when CODEX_* already set) ---
if [[ -z "${CODEX_MODEL:-}" || -z "${CODEX_REASONING:-}" ]]; then
RISK=$(grep -E '^risk:' "$TASK_FILE" | head -1 | awk '{print $2}' | tr -d '"' || true)
OWNS_N=$(grep -cE '^\s+-\s+' "$TASK_FILE" 2>/dev/null || echo 0)
# crude owns count: lines under owns_paths block; fallback medium/high
if grep -qE 'high_risk_paths:\s*true|risk:\s*high' "$TASK_FILE"; then
: "${CODEX_MODEL:=gpt-5.6-sol}"
: "${CODEX_REASONING:=high}"
elif [[ "${RISK:-medium}" == "low" ]]; then
: "${CODEX_MODEL:=gpt-5.6-terra}"
: "${CODEX_REASONING:=medium}"
else
: "${CODEX_MODEL:=gpt-5.6-terra}"
: "${CODEX_REASONING:=high}"
fi
fi
CODEX_MODEL="${CODEX_MODEL:-gpt-5.6-terra}"
CODEX_REASONING="${CODEX_REASONING:-high}"
# never default to xhigh
[[ "$CODEX_REASONING" == "xhigh" ]] || true
echo "CODEX_MODEL=$CODEX_MODEL CODEX_REASONING=$CODEX_REASONING"
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.
- 2d ago Changed 19fa0f0fe92c
- 8d 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 (115 stars, last pushed 6d ago), licensed MIT. It adds 37 tokens to every session and 1,825 once invoked, about $0.0002 per session on Opus 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.
Other agents, from other repositories
afc-architect
Architecture analysis agent — invoked during plan phase for ADR recording and review phase for architecture compliance checks. Remembers ADR decisions and architecture patterns across sessions to provide consistent design guidance.
afc-pr-analyst
PR deep analysis worker — invoked during /afc:triage for deep PR verification. Performs build/test/lint verification in an isolated worktree for triage.
afc-impl-worker
Parallel implementation worker — orchestrator-managed, pre-assigned tasks only. Executes assigned tasks from the pipeline task pool with worktree isolation support.
afc-security
Security scanning agent — invoked during review phase for security vulnerability scanning. Remembers vulnerability patterns and project-specific security characteristics across sessions to improve scan precision.
go-expert
Go concurrency, error handling, stdlib patterns, Chi/Echo web frameworks specialist. Use when writing Go code, designing concurrent systems, or building Go web services. Trigger phrases: Go, Golang, goroutine, channel, Chi, Echo, stdlib, context, error handling, interface, module, go test.
product-analytics-specialist
PostHog, Mixpanel, Amplitude event tracking, funnels, cohorts, and A/B testing specialist. Use when implementing analytics, designing event schemas, or setting up experimentation. Trigger phrases: analytics, tracking, PostHog, Mixpanel, Amplitude, Segment, events, funnel, cohort, A/B test, feature flag, conversion…