kohen: fallback for Claude Code when the gate is down
Every Claude Code session on the dev VM goes through bikoret.ch; when the pod is not ready the session cannot reach Anthropic (2026-10-15: Doorpost drift → 503 → the transmitter locked out, recovered by hand). An `env` entry in ~/.claude/settings.json overrides the shell environment (verified), so `env -u … claude` is not a recovery while the gate is armed there. - scripts/claude-direct: start straight to Anthropic via a --settings JSON on the command line, which outranks every settings file. - scripts/claude-bikoret: probe the gate first; if it does not answer, say so and exec claude-direct (BIKORET_STRICT=1 refuses instead). - scripts/bikoret-settings on|off|status: arm/disarm the gate for every launcher; `on` writes the key (kohen only), `off` is the recovery. - KOHEN.md: the fallback and the order of recovery. Tested 2026-10-15: dead gate armed in settings → plain claude hangs, claude-direct answers; probe at a dead host → fallback + answer; live gate → answer with the fringe. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
20cd75562c
commit
4acd56c4b6
4 files changed
+100
No files matched your search
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Start Claude Code DIRECT to Anthropic, bypassing the Bikoret gate — the
|
||||
# fallback for when bikoret.ch / the pod is down (KOHEN "Claude Code behind
|
||||
# the gate — fallback").
|
||||
#
|
||||
# Why --settings and not `env -u`: an `env` entry in ~/.claude/settings.json
|
||||
# overrides the shell environment (verified 2026-10-15), so unsetting the
|
||||
# variables in the shell does nothing while the gate is armed there. A
|
||||
# `--settings` JSON on the command line outranks every settings file, so it
|
||||
# wins without touching settings.json. OAuth login is used as normal.
|
||||
unset ANTHROPIC_BASE_URL ANTHROPIC_CUSTOM_HEADERS
|
||||
exec claude --settings '{"env":{"ANTHROPIC_BASE_URL":"https://api.anthropic.com","ANTHROPIC_CUSTOM_HEADERS":""}}' "$@"
|
||||
Reference in new issue
Block a user