agents: they never spoke, the decoder lost the disc, and both shared one state dir
Some checks failed
CI / Native — ubuntu-latest (push) Failing after 8m10s
CI / WASM — Web (push) Failing after 7m31s
CI / Formatting (push) Failing after 1m13s
CI / Native — macos-latest (push) Has been cancelled
CI / Native — windows-latest (push) Has been cancelled

Three defects, all mine, found by checking instead of assuming.

**They never exchanged a word.** SendMessage=0, ListAgents=0 across both new
sessions. PROTOCOL.md specified in detail what a message MAY and MAY NOT do and
never said how to send one or that the other agent was addressable -- they knew
that last time only because the human told them directly, and rebuilding with
fresh volumes wiped it. Policy without mechanism is prose. Now documented with
the two addresses, a worked example, and an instruction to introduce themselves
on the first iteration rather than waiting to have a question.

**The decoder lost the disc and the ISO.** They used to arrive inside the project
mount and silently stopped when /work became a clone. Silently is the word: the
disc-gated tests SELF-SKIP without SYLPHEED_DISC and report green, so a whole
test suite would have passed while measuring nothing. Both are now mounted
explicitly, the ISO at a stable path so run-canary does not depend on host
directory names.

**Both agents shared one Claude state directory.** They share the host's
~/.claude, and once both working directories became /work they resolved to the
same projects/-work/ -- two supposedly independent agents writing to one place,
which undoes the point of separate checkouts. Each now has its own volume, seeded
once from the host with credentials only, so a token refresh writes locally and
neither can corrupt the host's auth.

Also widened the pacing rule. It banned ScheduleWakeup by name; the decoder then
scheduled itself an hourly cron job -- not harmful, but the same instinct that
ended a run yesterday, through a door I had left open. Now: no self-scheduling by
any route.

Mount audit after the changes: shared and intentional are the exchange volume and
the read-only credential seed. Everything else -- repo, Claude state, cargo,
target, canary, disc, ISO -- is per agent or one-sided.
This commit is contained in:
MechaCat02
2026-08-29 13:05:41 +02:00
parent 01a3505b1e
commit 20b3c74b2c
7 changed files with 110 additions and 6 deletions

View File

@@ -124,6 +124,24 @@ fi
mkdir -p /exchange/files 2>/dev/null || true
# ── Claude Code config ───────────────────────────────────────────────────────
# ── Claude state: this agent's own, seeded once from the host ───────────────
# Isolated per agent. Both working directories are /work, and Claude Code keys
# its per-project state off the working directory -- so a SHARED ~/.claude put
# two independent agents in the same projects/-work/ directory, which undoes the
# point of giving them separate checkouts.
#
# Seeded rather than shared because credentials live in .credentials.json and a
# token refresh must be able to write. Copying once means each agent refreshes
# its own token and neither can corrupt the host's.
if [ -d "$HOME/.claude.seed" ] && [ ! -s "$HOME/.claude/.credentials.json" ]; then
mkdir -p "$HOME/.claude"
cp -a "$HOME/.claude.seed/.credentials.json" "$HOME/.claude/" 2>/dev/null || true
for f in settings.json CLAUDE.md; do
[ -e "$HOME/.claude.seed/$f" ] && cp -a "$HOME/.claude.seed/$f" "$HOME/.claude/" 2>/dev/null || true
done
echo "[entrypoint] seeded ~/.claude from the host (credentials only)"
fi
# Seed ~/.claude.json from the host's read-only copy, then stamp onboarding as
# complete. Claude Code re-runs its first-run wizard whenever
# lastOnboardingVersion differs from the installed version — so a container with

View File

@@ -104,6 +104,12 @@ docker_args() {
# and carries our instrumentation. Read-write: building probes into it is
# real work, not a side effect.
-v "${SYLPH_CANARY:-$HOME/RE Project Sylpheed/xenia-canary}:/canary"
# The disc and the ISO. These used to arrive inside the project mount and
# silently stopped when /work became a clone -- silently because the
# disc-gated tests SELF-SKIP without SYLPHEED_DISC and report green, which
# is the most expensive kind of missing mount.
-v "${SYLPH_DISC:-$PROJECT/sylph_extract}:/disc:ro"
-e "SYLPHEED_DISC=/disc"
# The shared exchange: transient files with provenance, outside git history.
-v "sylpheed-exchange:/exchange"
-e "PROJECT_DIR=/work"
@@ -115,7 +121,8 @@ docker_args() {
# The state dir is shared read-write: credentials live in
# .claude/.credentials.json, so token refresh needs to write, and this is
# also what carries the project memory across.
-v "${SYLPH_CLAUDE_HOME:-$HOME/.claude}:/sylph-home/re/.claude"
-v "sylpheed-decoder-claude:/sylph-home/re/.claude"
-v "${SYLPH_CLAUDE_HOME:-$HOME/.claude}:/sylph-home/re/.claude.seed:ro"
# ~/.claude.json sits BESIDE that directory and holds `hasCompletedOnboarding`.
# Mounted READ-ONLY at a staging path: the entrypoint copies it to
# ~/.claude.json and stamps onboarding as done. Sharing the file directly
@@ -165,7 +172,15 @@ docker_args() {
[ -n "${SYLPH_VULKAN:-}" ] && _out+=(-e "SYLPH_VULKAN=$SYLPH_VULKAN")
[ -n "${SYLPH_REMOTE:-}" ] && _out+=(-e "SYLPH_REMOTE=$SYLPH_REMOTE")
[ -n "${SYLPH_REMOTE_NAME:-}" ] && _out+=(-e "SYLPH_REMOTE_NAME=$SYLPH_REMOTE_NAME")
[ -n "${SYLPH_ISO:-}" ] && _out+=(-e "SYLPH_ISO=$SYLPH_ISO")
# The ISO Canary boots. Default resolves the retail image beside the project;
# mounted at a stable in-container path so run-canary does not depend on the
# host's directory names.
_iso="${SYLPH_ISO:-$PROJECT/Project Sylpheed - Arc of Deception (USA, Europe) (En,Ja).iso}"
if [ -f "$_iso" ]; then
_out+=(-v "$_iso:/iso/game.iso:ro" -e "SYLPH_ISO=/iso/game.iso")
else
echo "==> NOTE: no ISO at $_iso -- Canary has nothing to boot." >&2
fi
# ── GPU ──
# Three distinct cases, and conflating them is how you end up believing you