Birgitta Böckeler's harness engineering for coding agent users splits a harness in two. The vendor builds the inner harness, which is what the Claude Code and Codex pages take apart. The user builds the outer harness on top. The outer harness has two halves: guides steer the agent before it acts, and sensors check its work afterwards. Either kind can be computational (deterministic, like a linter) or inferential (a model making a judgment). This page profiles mine using those terms, plus a third category for the limits on what the agent can do.
At a glance
| Global instructions | 1 file, shared by both tools |
|---|---|
| Repos with instruction files | 52 with AGENTS.md, 30 with CLAUDE.md (5 of them one-line stubs) |
| Other shared root docs | 125 README.md, 63 ROADMAP.md, 14 DESIGN.md; 37 distinct root-doc names in all |
| Memory | 222 memory files across 67 projects (Claude Code only) |
| Custom commands, skills, agents | 6, across 5 repos |
| Hooks | 1 global (fixed 2026-09-24), 5 in three repos (2 not working, both in valet) |
| Repos with tests | 41 Python, 8 JavaScript |
| CI and pre-commit | 4 repos with CI workflows, 0 with pre-commit |
| Permission rules | 31 global allow rules, 3 deny rules, 22 repo allowlists; 3 Codex rules |
Guides: steering before the agent acts
One global instruction file for both tools
My global instructions live in one file in my shannon
repo, config/AGENTS.md. Both ~/.claude/CLAUDE.md
and ~/.codex/AGENTS.md are symlinks to it, so both tools read
identical text and there's only one file to edit. It has seven sections:
interaction, workflow, code style, tools, context hygiene, permission
prompts, and a section just for Claude Code.
Most of it is about working with me rather than about code: when to ask, when to go ahead, how often I can be interrupted, never to delete a repo, never to edit a file on a server. The code-style rules are short: simple over clever, no scaffolding, Python 3.11 or newer, ruff, pytest. It guides my attention more than it guides the code.
Repo instructions and shared root documents
52 repos have an AGENTS.md and 30 have a CLAUDE.md, 5 of them one-line stubs importing AGENTS.md. A week earlier it was the other way round, 19 and 61. Since Claude Code reads AGENTS.md itself, my rule is to keep the guidance in AGENTS.md with no stub, and I've been renaming the old files.
Next to the instruction files is a set of shared root documents,
which the agents read as guides too. README.md says what a
repo is. ROADMAP.md (in 63 repos) lists open work in a
format my global instructions define. Less common ones carry more
specific guidance: DESIGN.md, PRECEDENTS.md
for decisions already made, WANTS.md for ideas not yet
planned, STYLE.md as a sample of writing to imitate. The
census counts 37 different root-document names across the 131
checkouts. Only 5 checkouts have none.
Memory the agent writes for itself
Claude Code's auto memory is on and has written 222 memory files across 67 projects. The largest set, 29 files, is in a history research project. This is the one guide I don't write: the agent writes it for its own future sessions. Codex's memories are off, so none of this carries across to Codex.
Very few commands or skills
I've written six custom commands, skills and agents in total, across five repos. For example, one drafts a meeting agenda, one runs a weekly review, and one tells a joke. The skills installed globally come synced from my claude.ai account, not written by me. My guidance is almost all prose in instruction files, not slash commands.
A briefing for the auto-mode classifier
Auto mode's classifier reads an
autoMode.environment
block describing which repos, hosts and data it should trust. Until
2026-09-24, mine was written for one private repo but saved in user
settings, so every repo got that repo's description, including its
sensitive paths and a "primary use" that wasn't software development.
The fix couldn't just move the block into that repo. The classifier
reads autoMode only from user or managed settings, never
from a repo's own settings, because a checked-in repo could otherwise
grant itself trust. It does read a repo's CLAUDE.md. So the fix split
in two. The repo-specific confidentiality rules moved into that
repo's CLAUDE.md. The global briefing was rewritten to describe the
whole setup: my own accounts as source control, my servers as
production, and about 25 repos named as sensitive, with a rule that
their content stays in its own repo.
The rewrite was checked with claude auto-mode critique,
which has a model review the rules. Over three rounds it found real
problems. Trusting both of my GitHub accounts would have made copying
between repos look safe. Short repo names were ambiguous. A clause
letting CLAUDE.md "add rules" invited an agent to widen its own
permissions. It's the only inferential sensor I have that checks the
harness itself rather than the code.
A later critique pointed out that some of the briefing wasn't
description but rules: never display the secret files, run a deploy
or teardown only when I name the domain, change the unmanaged host
only when I name it. The docs give rules their own place,
autoMode.soft_deny,
where a rule blocks until my message clears it. So on 2026-09-24 those
three moved there, next to the built-in rules, and the environment
entries kept only the facts. The move itself was blocked at first:
the classifier treats an agent editing its own settings as
self-modification, and cleared it only once I named the change
(observed). The critique of the new rules found more to tighten, such
as make deploy missing from the deploy rule; I stopped
there.
Sensors: checking afterwards
The one automatic global sensor, and why it never ran
My settings had two hooks meant to run ruff format and
ruff check --fix on every Python file the agent wrote.
Both read the file path from $HOOK_FILE_PATH, which Claude
Code doesn't set: hooks
receive their input as JSON on stdin. With the variable empty, the
*.py test failed, and || true hid the failure.
A Python file written and edited in the session that found this was
still unformatted afterwards.
The broken hook was also hiding a conflict. My global instructions say
ruff format is a per-repo decision and must never reformat
a codebase as a side effect. Several repos say in their ruff config
that they've declined it. A working version of the old hook would have
reformatted those repos anyway.
The replacement, fixed 2026-09-24, is one script,
~/.claude/hooks/ruff.sh. Like the global instructions, it
lives in shannon (config/hooks/ruff.sh) and is symlinked
into place, so it's under version control. It reads the path from
stdin. It
lints only in repos that have a ruff config, and formats only where
that config has a [format] section, which is an explicit
opt-in that no repo has yet. Any findings --fix can't
resolve go back to the agent (exit code 2), so the agent sees them and
can fix them. It was tested on scratch repos, then live: the next
file written in the session was cleaned up.
Tests, run because a guide says so
41 repos have Python tests and 8 have JavaScript tests. Nothing runs them automatically. There's CI in only 4 repos, all of them websites, and no pre-commit hooks anywhere. They run because my global instructions say "run them before declaring done". So my main sensor is set off by a guide, and it works only as long as the agent follows it.
Checkers that audit the whole collection
Some sensors check the repos themselves rather than one agent's work.
My catalog repo has scripts that report drift between the catalog and
GitHub, uncommitted or unpushed work across checkouts, and which root
documents each repo uses. This repo's check.py reports
when the harnesses' flags or docs change. My sentry repo runs security
audits, done in sessions with Claude. That makes it my only inferential
sensor, and it runs when I start it, not automatically.
A check on the checks
This repo's census.py counts everything on this page and
reports when a count changes. It also checks every Claude Code hook
for the ways a hook can silently do nothing:
- a script that's missing, or not executable when run directly;
- a variable Claude Code doesn't set, like the old
$HOOK_FILE_PATH; - a matcher that can't match a real tool name. It follows the docs' rule that a plain list of names is compared exactly, and it suggests the right MCP server name.
Its tests include both of the broken hooks found here. On its first run it flagged valet's matcher, which I've chosen to leave, so it keeps reporting it.
Limits: what the agent may do
Claude Code
The default mode is auto, so a classifier approves most calls. Since
v2.1.284 that's also Claude Code's built-in default. My
user settings allow 31 read-only commands outright (git
status, ls, gh pr view and so on) and
deny three: sending, replying to and forwarding Gmail. 22 repos add
their own allowlists, the longest with 31 rules. The OS sandbox is not
on.
Codex
Codex runs with the default sandbox (workspace writes only, no
network) and asks before leaving it. 30 projects are marked trusted.
The three saved command rules are all curl prefixes that
the model proposed and I approved.
Repo hooks that enforce a repo's own rules
Three repos have their own hooks, and each one enforces something specific to that repo:
- dallasgolem: a day of rest
- Blocks all work on the repo from Friday sundown to Saturday sundown in Dallas. It works out sundown with the same calculation the project's code uses. An environment variable overrides it, and each override is written into the project's chronicle.
- loser: a box
- Denies any Read, Grep or Glob outside the repo. It doesn't cover Bash, so the box has a gap.
- valet: an email guard
- Meant to allow Gmail sends only to my own address. Its matcher
names the tools
mcp__Gmail__…, but the connector's tools are calledmcp__claude_ai_Gmail__…. A matcher made only of letters, underscores and|is compared as exact names, so the hook never fires. The global deny still blocks sending, but drafts aren't guarded.
What it costs in context
Claude Code's /context command shows how the context
window is spent. In one session on 2026-09-24, with a 1M-token window:
| Loaded up front | Tokens |
|---|---|
| System prompt | 3.8k |
| Built-in tool definitions | 22k |
| My global instructions (CLAUDE.md) | 1.5k |
| Skill descriptions (27 skills) | 4.6k |
| Held back until needed | Tokens |
| MCP tool definitions (connectors, the Chrome extension) | 44.6k |
| Other built-in tool definitions | 20.6k |
My own guidance is cheap. The global instructions and every skill description together take about 6k tokens, well under 1% of the window. The costly part is tools I've connected and mostly don't use. The two Expedia tools alone would take 5.6k, more than all my instructions put together. They cost nothing only because Claude Code holds their definitions back until the model asks for them.
What the profile shows
- It's almost all guides. I've written a lot of instructions and very few automatic checks. Most checking is done by me, or by the agent because an instruction tells it to.
- Hooks failed silently, and nothing told me. One had
a
|| truethat hid the failure, the other a name mismatch. A sensor needs its own check that it's running, socensus.pynow provides one (below). The first hook's fix also showed that a sensor can hide a policy conflict until it starts working. - Instructions are shared across the two tools, and nothing else is. Hooks, memory, allowlists and the classifier briefing exist only for Claude Code. Command rules and trusted projects exist only for Codex. A repo gets different limits depending on which tool opens it.
- Settings leaked between repos. A briefing written for one repo sat in settings that apply to all of them. Guides need a scope as well as content, and the harness decides which scopes are allowed to say what.
- Hooks can enforce a repo's own rules. The day of rest and the box aren't generic safety measures. They're rules that belong to one project, which instructions alone can't enforce.