vibecodenow.io

Updates

The episodes show one job at a time. This page is the running record of the larger changes in how I use the Claude desktop app: what went wrong, what changed, and what you can copy. Newest first. The names and private details of my own work are left out, and the shape of each problem is kept. Resources lists what I tested along the way.

My skill listing outgrew its budget

Claude Code starts each session with a list of its skills, each with a description, and the list has a budget in characters. Past the budget, the skills used least show by name alone, and a session seldom picks a skill it cannot read about. Mine outgrew the budget twice. The second time I raised it again, and my nightly replay of the day's sessions now names any skill of mine shown without its description.

The problem

Claude Code starts every session with a list of the skills it can use, one line each: the skill's name and a description, which is how the session knows when to use it. The list has a budget in characters, and past it the skills used least lose their descriptions and show by name alone. A skill shown that way is seldom picked, so it seldom earns the uses that would bring its description back. At the default budget, 38 of my 68 skills showed by name alone, and I raised it on 17 November. By 30 November I had 75 skills and up to eight had lost their descriptions again, which I learned only when a session checked the premise of a public skill pack built to catch this.

The solution

I raised the setting skillListingBudgetFraction from 0.018 to 0.022, which gives the list 66,000 characters in a session with a 1M-token context window. The first session after the change listed all 75 of my skills with their descriptions, in 65,973 of those characters, and every session now starts with about 12,000 more characters than before. My nightly replay of the day's transcripts now also reads the full skill listing each session starts with, and the one it gets again after a compaction. Its digest, and the page a scheduled task writes from it every morning, name any skill of mine shown by name alone, with how many listings showed it that way and the newest one. On the last day before the raise it named eight skills in 30 of 38 listings, and in the hours after the raise it named none in 8 listings.

How to add it

  1. Look at the newest full skill listing in your transcripts: Claude Code records one in a session's transcript when the session starts and again after a compaction, and a skill shown by name alone has lost its description.

    Python 3, saved as listing.py and run with python listing.py

    """Find the newest full skill listing in the Claude Code sessions
    changed in the last day, and print the skills it showed by name
    alone, without the description a session reads to know when to
    use one."""
    import json
    import time
    from pathlib import Path
    
    claude = Path.home() / ".claude"
    since = time.time() - 24 * 3600
    newest = None
    for path in (claude / "projects").glob("*/*.jsonl"):
        if path.stat().st_mtime < since:
            continue
        with open(path, encoding="utf-8", errors="replace") as f:
            for line in f:
                if '"skill_listing"' not in line:
                    continue  # most lines are tool output: not parsed
                try:
                    d = json.loads(line)
                except ValueError:
                    continue
                a = d.get("attachment")
                if not (isinstance(a, dict) and a.get("type") == "skill_listing"
                        and a.get("isInitial")):
                    continue  # a listing that only adds a skill is partial
                when = d.get("timestamp") or ""
                if newest is None or when > newest[0]:
                    newest = (when, a.get("content") or "")
    if newest is None:
        raise SystemExit("No full skill listing in the last day.")
    when, content = newest
    shown = [s[2:] for s in content.split("\n") if s.startswith("- ")]
    alone = [s for s in shown if ": " not in s]
    yours = {p.parent.name for p in (claude / "skills").glob("*/SKILL.md")}
    print(f"Newest full listing, {when}: {len(shown)} skills, "
          f"{len(content):,} characters, {len(alone)} by name alone")
    for name in alone:
        print(f"  {name}{'  (one of your own)' if name in yours else ''}")
  2. Work out your budget in characters: the context window in tokens, times 3 characters a token for current models, times skillListingBudgetFraction, which is 0.01 unless you set it. If your own skills show by name alone, add up the length of their descriptions and raise the fraction to cover them, with room to grow.

    In ~/.claude/settings.json (on Windows, %USERPROFILE%\.claude\settings.json), among the other settings: 0.022 gives 66,000 characters with a 1M-token window

    "skillListingBudgetFraction": 0.022
  3. Shorten descriptions only once the list fits: while it overflows it fills the whole budget, so a shorter description saves no tokens and only hands its room to the next skill in line.
  4. Check again whenever you add a skill: a script that reads each day's listings at night and names any skill of yours shown by name alone tells you the first day it happens, as long as it leaves out projects that set a smaller budget in their own settings.
Detailed notes: My skill listing outgrew its budget

What happened

On 30 November I asked a session to read a public skill pack for safety before I installed anything from it: an audit script and a weekly schedule, made to catch skills that Claude Code lists without their descriptions. I did not install it. As shipped it fails on Windows, and its schedule would have given an unattended run broad permissions. Its premise did hold here: in the session doing the reading, which ran on Opus 5.5, seven of my own skills were listed by name alone, and sessions on Fable 5.2 showed an eighth that way.

How the listing is built

That session read how the list is built in Claude Code's own code, version 2.1.267, and a later session read it again in 2.1.330, the version my desktop app runs. Both say the same:

  • The budget is in characters: the context window in tokens, times 3 characters a token for current models (4 for older ones), times the setting skillListingBudgetFraction, which is 0.01 unless set. A session with a 1M-token window gets 30,000 characters at that default.
  • When every description fits, every skill gets one. Past the budget, Claude Code's own bundled skills keep theirs, and the rest are ranked by a usage score: how many times the skill has been used, halved for every 7 days since its last use, and never below a tenth of the count. Descriptions go in, in that order, wherever they still fit, and the skills left over show by name alone.
  • A skill that has never been used ranks below every skill that has, and ties keep the order of the list, my own skills before plugins. A skill shown by name alone is seldom picked, so it seldom earns the uses that would bring its description back.
  • While the list overflows, it fills the whole budget. Shortening a description then saves no tokens; it only gives the room to the next skill in line.

Twice past the budget

At the 1% default, 38 of my 68 skills showed by name alone. On 17 November I raised the fraction to 0.018, and the next sessions listed all 70 skills I had by then with their descriptions. By 30 November there were 75, and eight showed by name alone in sessions on Fable 5.2 (seven on Opus 5.5).

That day I raised the fraction to 0.022, which gives 66,000 characters at a 1M-token window and puts about 12,000 more characters, a few thousand tokens, at the start of every session. Sessions on Fable 5.2 had needed 4,754 more characters to describe all eight, so 0.022 leaves about 7,200 to spare, room for about 13 more skills at my average description of 552 characters. The first session after the change listed all 75 with their descriptions, in 65,973 of the 66,000 characters. The list still fills its budget, so the spare room goes to plugin skills I have never used, and a new skill of my own will take it from them, since my skills come first in a tie.

One project keeps a smaller budget of its own on purpose, 0.005, set in its own settings for the batch sessions it runs, and its sessions list most skills by name alone.

What changed in the nightly replay

My nightly replay of the day's transcripts now reads each full skill listing of the day: the one a session starts with and the one it gets again after a compaction. A listing that only adds a skill is not counted. Its digest gained a section that names each skill of mine shown by name alone, with how many listings showed it that way and the newest one, and the page the morning task writes from the digest carries it as a section of its own.

A project with a budget of its own is left out of the count and named. Whether a listing had one is read from the nearest settings file: going up from the session's folder, the first .claude folder that holds a settings file decides, and the walk stops below my home folder, whose .claude holds my user settings.

How it was checked

The replay's selftest has 38 cases, 6 of them new. Fourteen pieces of the change were reverted one at a time, and each time the selftest failed on that piece's own check. Over the real day before the raise, the new section named eight of my skills in 30 of 38 listings. In the hours after the raise it named none, across 8 listings.

What to copy

Add up the length of your skills' descriptions and compare it with your budget before you trust that every session can see them. Raise the budget first and trim descriptions after, since trimming saves nothing while the list overflows. A check in code that reads each night's listings tells you the first day a new skill pushes an older one out. The script in the steps prints the skills that the newest full listing of the last day showed by name alone, and marks the ones from your own skills folder.

Back to top

Before a sign-out, my check now names the sessions set to wake later

The check I run before a sign-out or a restart said go with no job running, and the app still warned that one session had unfinished work. That session had set a cron to start a fix at 08:57 the next morning, and Claude Code keeps such a wake-up only in the session's own process, which a sign-out ends. The check now names each session that holds a wake-up, with its time and what it is for, and still says go, since the wake-up is all that is lost.

The problem

Before I sign out of the app or restart the machine, I run a check that lists what the step would cut and says go or what to wait for. At 23:49 on 27 November it found no job running and said go, but the app still warned that one session had unfinished work. That session had set a cron at 19:45 to start a fix at 08:57 the next morning. Claude Code keeps a cron, and a loop wake-up too, only in the session's own process, so a sign-out or a restart ends it, and the app counts a session that holds one as working.

The solution

The check now reads the transcript each open session has written since its process began and lists every wake-up still ahead, with the session, the time it is due and what it is for. A cron counts until the session takes it back or, for one set to run once, until its time comes, and only the last loop wake-up counts, unless it ended the loop. The wake-up is all such a session loses, so the check names those sessions and still says go. Finding that session also showed that its process had resumed under an id the session left nine seconds later, so the check now places a process by any id its session has had.

How to add it

  1. Before a sign-out, a restart or an app update, look for the sessions that have set a cron or a loop wake-up in Claude Code, since each lives only in its session's process and ends with it.

    Git Bash, macOS or Linux: the transcripts written in the last day that set a cron or a loop wake-up, each file named for its session's id

    find ~/.claude/projects -name '*.jsonl' -mtime -1 -exec grep -lE '"type":"tool_use","id":"[^"]+","name":"(CronCreate|ScheduleWakeup)"' {} +
  2. When the app warns of unfinished work and no session looks busy, check for such a wake-up first, since the app counts a session that holds one as working.
  3. If you build a check for this, read each open session's transcript from the time its process began, count a cron until it is taken back or has run its one time, and count only the last loop wake-up.
  4. Have the check name those sessions without holding up the go, and set the wake-up again after the switch if the work still needs it.
Detailed notes: Before a sign-out, my check now names the sessions set to wake later

What happened

Before I sign out of the app or restart the machine, I run a check that lists what the step would cut: the jobs running under each session, the scheduled tasks due soon and anything writing shared data. The entry on that check has the rest. At 23:49 on 27 November it found no job running and said go, but the app still warned that one session had unfinished work.

That session had set a cron at 19:45 to start a fix at 08:57 the next morning. A cron here is Claude Code's own, a prompt queued for the session at a set time, once or on a schedule, and the tool's description says the job lives only in that session, is never written to disk and is gone when the session ends. A loop wake-up, which brings a session back to its task after a delay of a minute to an hour, is held the same way. A sign-out, a restart or an app update ends the session's process, and both go with it. The app counts a session that holds either one as working, as it does a session in the middle of a turn, and the check had looked for neither.

What changed

The check now reads the transcript each open session has written since its process began. A transcript records every call a session makes and the tool's answer, so the check can follow each wake-up from the call that set it. A cron the tool accepted counts until the session takes it back, or, if it was set to run once, until its time comes. Of the loop wake-ups only the last counts, unless it ended the loop or its time has passed. A call written twice in a transcript counts once. Each wake-up is one line, soonest first: the session, the time it is due, when it was set and what it is for.

I asked for the list and nothing more, since I knew the wake-ups would be lost and wanted to see which sessions held one. The wake-up is the only thing such a session loses, so the check names those sessions and still says go.

Finding that session showed one more fault. Its process had started at 17:00 by resuming an id that the session left nine seconds later. The check placed a process only by the ids its session uses now, so a job under that process had been listed with no session, and it now also places a process by an id its session had before. The check's self-test, 53 checks on made-up processes, session records, log lines and transcripts, covers each of these cases.

What to copy

If your Claude Code sessions set crons or loop wake-ups, a sign-out or a restart ends them with the session's process. When the app warns of unfinished work and no session looks busy, look for a session that has set one: the transcripts under ~/.claude/projects record each call. Note the times before you go, and set a wake-up again afterwards if the work still needs it.

Back to top

What to check before you sign out or restart

What a sign-out, a restart or an app update cuts, what it leaves, and the check that runs before and after. Since 26 October one session per account, the first to start, asks about a scheduled task that differs between accounts, and a one-time task that has run stays off on all of them. Since 31 October the check after a switch also wakes each session that was waiting for the account just signed in. Since 26 November it leaves out a background job its own session had stopped, which it had counted as lost, and since 28 November it finds that stop in the session's transcript as well as in the job's output file. On 28 November the check before a switch also began to name each session set to wake itself later, a change with an entry of its own.

The problem

I wanted to sign out of the app and restart the machine while five sessions were waiting on me. Working out what a restart would cut took a dozen tool calls across the sessions. I did not know which sessions were mid-turn, which had background commands, or which scheduled task was due next. Guessing could have cost a long run. On 31 October a session got no answer from the browser extension, most likely because the extension was signed in to another of my accounts, and nothing would tell the session when the app was back on that account.

The solution

One command now lists the jobs running under each session, the scheduled tasks due soon, and what is writing shared data, and says go or what to wait for. A session adds what only it can see: which sessions are mid-turn or waiting. After a switch, the first session on the new account reads the app's log and reports what was cut. It also wakes each session waiting for that account, by sending it the message the session left on a waiting list. Nothing on disk is lost either way, and waiting prompts can be answered by typing a message.

Two columns: what a sign-out or restart cuts, a working turn, a background command, an app task due while the app is closed; and what it keeps, every file on disk, waiting questions, the sessions in the sidebar.
What a sign-out or a restart cuts, and what it keeps. A drawn figure with made-up labels, not a screenshot.

How to add it

  1. Before a sign-out or a restart, look at the sidebar for sessions that are busy rather than waiting.
  2. Let a landing or a long run finish, and answer waiting prompts afterwards by message.
  3. If you use more than one account, note which connectors and artifacts belong to which.
  4. When a session has to wait for another account, put it on a list with the message that should restart it, and have a startup hook tell the first session on that account to send it.
  5. If the same scheduled tasks live on more than one account, keep one list of them and treat a one-time task that has already run as off on every account.
Detailed notes: What to check before you sign out or restart

What happened

Just after midnight on 24 October I had five sessions waiting on an answer from me and wanted to sign out of the app and restart the machine. Working out whether that was safe took a dozen tool calls across the sessions: which were mid-turn, which were waiting, which had a command running in the background, which scheduled task was due in the next hour. By the end of the night the check was a skill.

What a sign-out or a restart cuts

  • A turn that is working is cut, and a command the session started in the background dies with it. Both can be run again.
  • A session waiting on a question or an approval loses nothing. Its prompt may not come back after the sign-in, so I answer by typing the answer as a message.
  • Nothing on disk is lost. Uncommitted edits stay in their folders.
  • The app's scheduled tasks fire only while the app is running. After a restart, open the app before the first one is due.
  • A connector such as Gmail belongs to the account it was set up on. A task that needs one has to run while that account is signed in.
  • Artifacts belong to the account that published them. Another account needs edit access before it can republish one.
  • With more than one account, the old account's session processes end at the next sign-in, not at the sign-out.

What changed

One command now lists the jobs running under each session, the sessions whose last turn ended in an error, anything writing to shared data, the scheduled tasks due in the next ninety minutes, and memory and uptime, then says go or what to wait for. The session adds the two things only it can see: which sessions are mid-turn or waiting on me, and how much of the account's usage is left.

The app gives no event before a sign-out, so the check cannot run on its own. After one, it can: the first session that starts on a new account reads the app's own log, finds the sign-out and the sign-in, names the sessions that were cut mid-turn and the background jobs that died with them, and lists the tasks due in the next day that need a connector. It puts that at the top of its first reply and then does what I asked.

What to copy

Before a sign-out, a restart or an app update, read the sidebar for sessions that are busy rather than waiting, let a landing or a long run finish, and answer the waiting prompts afterwards by message. If you keep more than one account, note which connectors and artifacts belong to which.

25 and 26 October: scheduled tasks after a switch

My three accounts share one list of scheduled tasks. It lives in git, and a hook writes it into the app's task store for every account except the one signed in, since the app holds that account's store in memory and writes it whole. When a session starts, the same hook compares the signed-in account's copy with the list and asks me about any difference.

On 25 October a one-time reminder ran at nine in the morning on one account, and the app switched it off there, as it does with any one-time task once it has run. From then on the accounts' copies and the list disagreed about whether it was on, and every session that started or resumed asked me the same question. Three of them did that day.

Since then the question goes to one session per account, the first to start, and is dropped once that account's copy matches the list again. A day later a one-time task that has run began counting as off everywhere: the app never runs it again whatever its switch says, so the hook writes it off into the other accounts' stores and asks nobody. On 5 November the next one-time task ran at its time on one account. By the evening it was off on all three, and no session asked me anything.

31 October: waiting for another account

A session that needed Claude in Chrome got no answer from it. The bridge between the app and the browser was running and accepted a test connection, but the extension never replied. The browser had started two days before, while the app was signed in to one of my accounts, and the app moved to another account later that day. My best guess is that the extension was still signed in to the first account. I decided to wait until the app was back on it, and asked for a trigger that would notice the switch back and pick the session up again.

A session that has ended its turn runs nothing, so it cannot notice a switch on its own. The after-switch check above already runs at every switch, in the first session that starts on the new account, so a waiting list is read there. Before it ends its turn, a session blocked on something only another account holds, such as a connector, the extension's sign-in or an artifact shared there, adds itself to the list with my agreement. Its entry holds the account, the session, the step to take then, and my reason as I gave it. When the app is next signed in to that account, the check lists each session waiting for it, oldest first, with the message to send. The session running the check sends each message word for word, which wakes the waiting session, and marks that entry sent. The message names the account the app is on now, the one it came from and when it was signed in, then gives the step and my reason, so the woken session knows what happened and what to do.

Each session has one entry per account, and a newer entry replaces the older one. A waiting session I pick up myself on that account marks its own entry. If the list cannot be read, the check and the command that adds to it both say so, and neither takes that to mean nobody is waiting.

The first session on the list is still waiting as I write this. When the app is back on that account, its retry will show whether the account was the cause. This entry gets a line when it does.

On 5 November the app went back to that account, five days after the session had started waiting. About a minute later another session on that account ran the after-switch check and sent the waiting session its message. The extension answered on the first try, and within a few minutes the session had finished the step it had stopped for. So the guess held: the extension's side panel was signed in to that account, and the app had been on my other two accounts since 29 October. The extension's own connection was only 46 minutes old at the switch, perhaps from an update, and that may have played a part too. If Claude in Chrome stops answering after you switch accounts, check the account in its side panel: the app has to be on the same one.

26 November: a job its own session had stopped

At 02:13 on 26 November the app moved from one of my accounts to another. The switch ended 28 session processes, and the check after it named 13 background jobs in five sessions as lost, though none of them was. Each had been stopped by the session that started it, between 22 November and 22:56 the night before: dev servers, two landings, a few read-only checks, a frame render and a wait loop. At 01:48 the check before the switch had found no job running.

The check had counted every job that never sent its completion notice as one the switch had ended, and a job its own session stops sends no notice either. When a background job starts, Claude Code names the file its output goes to, and the file of a job its session stopped ends in [killed]. The check now reads that file and leaves the job out when the file ends that way and was last written before the sign-out. A job the switch ends still counts: its file has no [killed], or the [killed] was written as its process ended at the sign-in, after the sign-out.

28 November: a session's wake-up

On the night of 27 November the check before a switch said go while the app still warned that one session had unfinished work: that session had set itself to wake the next morning. The check now names each session that holds a wake-up, and that change has an entry of its own: Before a sign-out, my check now names the sessions set to wake later.

28 November, later: a stop in the session's own transcript

At 00:20 on 28 November the app moved to another of my accounts. The switch ended 16 session processes, and the check after it named one background job as lost. Its session had started it at 03:10 on 26 November and stopped it three minutes later, but the job's output file had sat in a temp folder that a sweep had since cleared, so no file was left to end in [killed].

The stop is in the session's transcript too: Claude Code's TaskStop tool answers with the id of the job it stopped. The check now counts that answer as the job's end, as it counts a completion notice. It takes the answer only where it opens the tool's result, the one form that all 780 such answers in that night's transcripts took, so a stop quoted in another tool's output does not count. The output file is still read, for a stop the transcript does not hold.

Back to top

My scan gate now reads an install as each version of the tool would

My scan gate reads an install command the way the skills tool does, to know which repository and revision to scan, and it had copied that reading from one version of the tool in October. When a command names no version, npx fetches the newest, and a copy installed on the machine may be older. The newer versions read some commands differently, so the gate could scan one revision while the tool installed another. It now reads a command once for each version it may start, and scans whatever any of them would install. Where one of them would fetch something the gate cannot scan, it asks.

The problem

My setup scans a GitHub repository with NVIDIA's SkillSpector before a command that installs a skill from it may run, and to know which repository and revision to scan, the gate reads the command the way the skills tool does. It had copied that reading in October from one version of the tool, 1.7.0. When a command names no version, npx fetches npm's newest, 1.9.1 on 27 November, while a copy installed in the project or globally runs first and can be older. The newer versions read some commands differently: given owner/repo@v1.2.0, version 1.7 installs a skill named v1.2.0 from the default branch, and 1.8 and later install the tag v1.2.0. From 1.8 the tool also fetches each repository's submodules, which the scan never sees.

The solution

A session downloaded all eleven versions from 1.7.0 to 1.9.1 without running any of them, checked each against the registry's hash and compared the code that reads a command: they read it in four ways. The gate now reads a command once for each version it may start: the version the command names, or all four readings when it names none. A command that names a version nobody has read stops and asks. Where the readings disagree, the gate scans every revision any of them would install, and it asks where one of them would fetch what it cannot scan, such as a repository with submodules. The other coding agent reviewed the change at its highest reasoning effort and found one way past it, an option npm reads after the command, and that case now asks too.

How to add it

  1. Find out which versions of an install tool can run on your machine: npx fetches npm's newest when a command names no version, but a copy installed in the project or globally runs first, and a command can pin an older one.

    Git Bash, macOS or Linux, in a project's folder: the newest version on npm, then the project's copy, a global copy and the copies npx has kept

    npm view skills version
    npm ls skills
    npm ls -g skills
    find "$(npm config get cache)/_npx" -path '*node_modules/skills/package.json' -exec grep -H '"version"' {} +
  2. Download each of those versions without running it, check it against the registry's hash, and compare how each one reads a source and its options.
  3. Have your gate read a command once for each version it may start and scan every repository and revision any of them would install, and make it ask where one of them would fetch something it cannot scan.
  4. Make a command that names a version you have not read stop and ask, and check npm's newest version from time to time, since a command that names no version starts the newest and the gate reads it only as the versions you have read.
Detailed notes: My scan gate now reads an install as each version of the tool would

What happened

My scan gate stops a command that installs a skill from GitHub until NVIDIA's SkillSpector has scanned the repository, and it works out which repository and which revision from the command itself. It does that by reading the command the way the skills tool reads it, and in October it copied that reading from the tool's version 1.7.0. When a command names no version, npx fetches npm's newest, which was 1.9.1 on 27 November. A copy installed in the project or globally runs first, whatever its version, and a command can pin an older one; the copies npx had fetched on my machine before were 1.7.0 and 1.7.4. Closing the work in My scan gate now sees an installer that fetches for itself, a session read a newer version and found that it reads some commands differently, and a second session took that up the same day.

What changed

The second session downloaded every version from 1.7.0 to 1.9.1, eleven in all, each into its own empty folder, checked each against the registry's integrity hash and ran none of them. It extracted the code that reads a source, and the code that reads the options, from each version and compared them. They read a command in four ways: 1.7.0 to 1.7.4 as October's copy does, 1.7.5 and 1.7.6 with a change in how a github: source's revision and skill name are encoded, 1.8.0 and 1.8.1 with a new reading of sources and options, and 1.9.0 and 1.9.1 as 1.8 with one more option.

What 1.8 and later read differently, each now a check in the gate's own tests:

  • owner/repo@v1.2.0, or a full commit hash after the @, installs that tag or commit. Up to 1.7.6 it installs a skill named v1.2.0 from the default branch, so the gate had scanned the default branch while the newest tool installs the tag.
  • A tree link that ends in a slash, such as .../tree/main/, installs that branch, where 1.7 installed the default branch.
  • github.com and gitlab.com count only as the host at the start of a source, so owner/repo/github.com/x/y installs owner/repo, where 1.7 installed x/y.
  • The options are read by Node's own parser, so -ga is -g -a, and after -- a source may start with a dash.
  • install with no source installs whatever the project's lock file names.
  • After each clone the tool fetches the repository's submodules, which are other repositories the scan never sees.

The gate now reads a command once for each version it may start: the version the command names, or all four readings when it names none or asks for the latest. A command that names a version nobody has read, such as 2.0.0, next or a range, stops and asks. Where the readings disagree, the gate scans every repository and revision any of them would install, and where one of them would fetch something the gate cannot scan, it asks and names those versions in the question. Where a version that fetches submodules may run, the gate asks when the repository has any. To see them on a source that names no revision, it now fetches the default branch itself, where before it handed the link to the scanner. A lock-file install asks, and so does a source that starts with a dash.

Found on the way: a source with Azure's _git path segment takes the part after # as the revision in every version, which October's copy had missed, so the gate had scanned the default branch. The package under the tool's old name, add-skill, is a different program at 1.0.x that ignores the part after #: the gate had scanned that revision while the program installs the default branch. Only add-skill 2.0.0, which hands over to the skills tool, is read now, and 1.0.x asks.

The gate carries a copy of Node's parser, which gave the same answer as Node itself on 40,021 generated argument lists; the comparison also caught both of two mistakes planted in the copy to test it. The gate's tests went from 343 checks to 428, and each of the 45 pieces of the change was taken out one at a time and caught by a test of its own.

The review

A gate that scans the wrong revision lets unscanned code in, so I had Codex, the other coding agent I run, review the change at its highest reasoning effort. It found one way past it, one that an ordinary command could take. npm exec reads its own options anywhere before a --, even after the command, so a package option placed at the end could start the old add-skill while the gate read the command as the skills tool. The gate takes the safe side there: when npm exec or npm x has an option after the command and no -- before it, it asks. npx, pnpm, yarn, bun and deno stop reading their own options at the command, so they are read as before.

What to copy

If a gate of yours reads a command the way some tool reads it, it has copied one version of that tool, and new versions keep coming out. Find out which versions can actually run on your machine: what npx fetches when no version is named, what is installed in the project or globally, and what your commands pin. Read each of those without running it, and have the gate read a command as every one of them would. Where they differ, scan everything any of them would fetch, and ask where one of them would fetch what the gate cannot see. A command that names a version you have not read should ask too.

Still open

A version after 1.9.1 will be read as these four readings until someone reads its code, and nothing yet warns when npm's newest moves past the last version read; npm view skills version shows it. A run of a version older than 1.7.0, installed in a project or globally with no version in the command, cannot be told from the command and is not covered.

Back to top

My scan gate now sees an installer that fetches for itself

Google Chrome's web guidance skill says to install it with one npx command, and that command went past my scan gate with nothing said: the installer runs the fetch as a program of its own, after the gate has read the command. The gate now reads that install as the fetch it makes, and the skills tool's update and sync, which fetch what a file names, stop and ask. A later fix, for the skills tool's newer versions, has an entry of its own.

The problem

My setup scans a GitHub repository with NVIDIA's SkillSpector before a command that fetches one is allowed to run, and it reads the command as typed. On 18 November I asked for Google Chrome's web guidance skill, whose page says to install it with one npx command. Read before it ran, that command turned out to start the real fetch as a program of its own, so the gate saw nothing to scan. The skills tool's own update command had the same gap, since it fetches whatever its lock file names.

The solution

A session read the installer's published code without running it and found the exact command its install starts. The gate now reads that install as the fetch it makes, however the command is typed, and scans the same repository. Its update command, and the skills tool's update, upgrade and sync, now stop and ask, since the repositories they fetch are named in files the gate does not read; the question points to the route the gate does scan, installing the skill again from its source. Any installer the gate has not read is still out of its sight, and the notes list three ways to close that whole family.

How to add it

  1. Before you run an install command a skill's page gives you, save the package as a file without installing it and search it for the commands it starts.

    Git Bash, macOS or Linux, in an empty folder: the package saved and searched, none of it run

    npm pack modern-web-guidance
    tar -xzf modern-web-guidance-*.tgz
    grep -rnoE ".{0,40}(spawnSync|execSync)[(].{0,80}" package --include=*.mjs
  2. Keep a short list in your gate of the installers you have read, each with the command its install starts at the version you read, and count every other way of starting one as unread.
  3. Make a command that installs from a lock file or a dependency list, such as an update or a sync, stop and ask, and update a skill by installing it again from its source, which the gate scans.
Detailed notes: My scan gate now sees an installer that fetches for itself

What happened

On 18 November I asked a session to install Google Chrome's modern-web-guidance skill with the command its page gives, npx modern-web-guidance@latest install. The session read the installer before running it. Its install starts npx -y skills add GoogleChrome/modern-web-guidance --skill modern-web-guidance as a program of its own, so the fetch comes after my scan gate has read the command and let it pass. Given that command, the gate said nothing at all, while the same skills add typed by hand stops for a scan. I took the skill in as a copy I had read instead, and a second session took the gate's gap. The gate is one of the pieces listed in Should I build my own harness? No, I already have one.

What changed

The second session downloaded the package without running it, checked it against the registry's integrity and read the installer's main function. Its install always adds that one repository, and any further words go after it, where they cannot change what is fetched. Its update runs the skills tool's own update and its uninstall a remove; search and retrieve fetch no repository.

  • The gate reads the installer's install as the fetch it starts, in every form it already reads for the skills tool: after npx, pnpm dlx, bunx, yarn dlx or npm exec, with their options, or as a program installed on the machine. It holds for the version that was read, 1.0.1, and @latest is read as that version until a newer one is read. Another version named outright, or an option before the command, stops and asks.
  • The skills tool's update, upgrade, sync and experimental_install install from the sources a lock file or a project's packages name, as its current version reads them. They now stop and ask, and the question points to the route the gate scans: install the skill again with skills add and its source. Its check command compares and installs nothing, so it is left alone.
  • Found on the way: the word after a runner's -p, which names the package it installs, had been read as a program of its own, so one ordinary install asked for no reason, and now does not.

Each piece of the change was taken out one at a time and caught by a test of its own, 15 pieces in all, with 51 new cases. Run on the original command, the gate now scans the repository and stops, because that scan runs past its 100 second limit. Before, it let the command through with nothing said.

What to copy

A gate that reads only the command as typed cannot see what the program does next. Read an installer's code before you trust its install command. Keep a short list of the installers you have read, each with the command it starts, and count anything else as unread. A command that installs from a file, such as an update or a sync, is a fetch the gate cannot read, so make it ask.

Still open

Any other program that starts a fetch itself is still out of the gate's sight: another installer, a project's own script, a tool run from its file. Closing that whole family would change what the gate stops on, so it waits on my choice among three ways. One is a small wrapper for npx, git and the other fetching programs, placed first on the agents' path, that runs the same check on its own arguments. Another stops on any package a runner starts that is not on a read list. The narrowest stops on a runner-started package's install, add or update command.

A week later, on 27 November, @latest named 1.0.2. It picks npx, pnpx or yarn dlx by the package manager in use and starts the same install, so the gate still scans the right repository. Reading the skills tool's current version also showed that it reads two kinds of source differently from the version the gate copies, which is a follow-up of its own.

27 November: every version of the skills tool

That follow-up, how the skills tool's versions read a command, has an entry of its own: My scan gate now reads an install as each version of the tool would.

Back to top

My rules became checks that block a command

Three house rules became a hook that stops a command before it runs. Hardened over ten reviews, it asked me 74 times in five days of bypass mode, and I clicked through every one. Now it denies in every mode, and nobody is asked. In November it learned two kinds of words that both shells read the same way, and it now refuses curly quotes, which PowerShell treats as real quote marks. The same day it started checking the side copies of a project too, since they share its branches.

The problem

My rules file tells every session what not to do: never move the main branch by hand, never write the shared data from a side copy, never run the other agent outside its route. A rule in a file is only advice. A session can forget it in the middle of a long job, and nobody notices until something is broken. I needed the rules checked before a command runs, not after.

The solution

A small script now runs before every shell command in both coding agents. It reads the command and stops any that breaks one of the rules. At first it asked me each time, and that turned into 74 prompts in five days, all of which I clicked through. Now it refuses the command outright and tells the session why, so the session takes the proper route instead. In November it learned two more kinds of plain words that both shells read alike, and it now refuses curly quotes, which PowerShell treats as quote marks.

Before: a command that breaks a rule reaches a prompt with allow once, allow always and deny, is allowed once 74 times, and runs as written.
Before: a rule that asks, and 74 reflex clicks. A drawn figure with made-up labels, not a screenshot.
After: the same command meets the gate, is denied with the reason, and the session takes the sanctioned route with nobody waiting.
After: a rule that denies with the reason, in every mode. A drawn figure with made-up labels, not a screenshot.

How to add it

  1. Write down the two or three rules you most need kept, in words a script can check.
  2. Add a PreToolUse hook in Claude Code that reads each shell command and refuses the ones that break a rule, with the reason.

    Python, saved as ~/.claude/hooks/gate.py: a gate in the same shape as mine

    """A PreToolUse hook: refuse a shell command that breaks
    one of your rules, and say why."""
    import json
    import sys
    
    # Each rule: the words that must all appear in the command,
    # and the reason the session reads. Put your own here.
    RULES = [
        (("git push", "main"),
         "Main moves only through the landing script."),
        (("codex exec",),
         "Codex runs only through the review script."),
    ]
    
    event = json.load(sys.stdin)
    command = event.get("tool_input", {}).get("command", "")
    for words, reason in RULES:
        if all(w in command for w in words):
            print(json.dumps({"hookSpecificOutput": {
                "hookEventName": "PreToolUse",
                "permissionDecision": "deny",
                "permissionDecisionReason": reason,
            }}))
            break

    ~/.claude/settings.json, with your own user folder in place of you

    "hooks": {
      "PreToolUse": [
        {
          "matcher": "Bash|PowerShell",
          "hooks": [{
            "type": "command",
            "command": "python C:/Users/you/.claude/hooks/gate.py",
            "timeout": 20
          }]
        }
      ]
    }
  3. Make the refusal a deny, not a question, so nobody clicks through it by reflex.
  4. Test it on real commands from your own history before you turn it on.

    Git Bash: a command it should refuse, which prints the deny

    echo '{"tool_input": {"command": "git push origin main"}}' | python ~/.claude/hooks/gate.py
  5. Before your gate learns a new kind of word, check what each shell really passes on, and teach it only the forms that come out the same.

    Run in Git Bash and in PowerShell, then compare: each item is one argument the program received

    python -c "import sys; print(sys.argv[1:])" --format='%h %s' +"%H:%M" 'a’ b ‘c'
Detailed notes: My rules became checks that block a command

16 October: three rules become a check

My house rules live in one file that every session reads. Three of them keep sessions out of each other's way. The main branch is moved only by the landing skill, never by hand in the primary checkout. A session working in a worktree may read the primary checkout's data but never writes it; a writer runs in the primary, after a handoff. And the other agent is never run by hand, so that I pick its effort each time and every call is recorded. On 16 October a security read of a popular agent bundle left me with one idea worth keeping: a rule a session can forget is an instruction, and a rule the harness checks before every command is a lock. So the three rules became a hook, a Python script that Claude Code and Codex both run before any shell command. It reads the command word for word as each shell would hand it on and stops the ones that break a rule. Where it cannot read a command to the end, it stops that too.

In Claude Code a stop was an "ask": the command paused, a prompt came to me with the rule it broke, and I decided. Codex cannot pause, so there a stop was a "deny": the command was refused and the agent was told why. At the time the difference looked harmless.

24 and 25 October: the reader is hardened

Codex reviewed the hook ten times in two days, and each round found a way for a command to carry a rule's words past the reader: a variable where the program should be, a nested shell, a heredoc, a quote the two shells read apart, an alias made on the way. Each hole was closed with a test, and wherever the reader could not be sure it now stopped the command, the right side for a lock to fail on. It also meant the hook stopped more often, and in Claude Code a stop was a prompt to me.

26 October: 74 prompts, eight hours, every one clicked

I run every session with the app's bypass-permissions mode on, and I had told the sessions in writing to go ahead without asking. Prompts kept coming anyway, so I asked a session why. The answer was in the app's own log and in the sessions' transcripts. Bypass mode turns off Claude Code's own permission checks, but hooks run in every mode, and a hook's "ask" is a prompt in every mode, bypass included. Every prompt those sessions had raised was the house gate's. Across five sessions over five days it had asked 74 times. Forty-four were commands it could not read to the end, written with a variable, a process substitution, a heredoc into a temp folder or a PowerShell block, with a store path or a git word past the point where the reading stopped. Thirty were worktree sessions handing a data file of the primary checkout to a Python one-liner, nearly all of them reads, which the hook cannot tell from writes inside Python code. I had answered every one with "allow once", and the sessions had waited about eight hours in all for those clicks, the longest nearly two.

Each "allow once" had overridden the gate and let the command run as written, the reads and the few real writes alike. A rule that asks a person to judge 74 commands gets reflex clicks from anyone, and a reflex click decides nothing.

What changed

  • The gate answers "deny" in both tools and in every permission mode. A refused command never runs. The session gets the whole reason, down to the word where the reading stopped, and takes the sanctioned route: a plain copy of the store into its own worktree (a plain read was always allowed), the landing skill for the main branch, the review skill for Codex, or the same command written plainly so the gate can read it, and nobody is asked.
  • A crash inside the gate is a deny as well, so a broken gate fails closed in both tools, and that path has a test now.
  • The one click lost is the one that archived a session I had starred or pinned. Those I archive from the sidebar myself.
  • A standing preference, written into the house rules: a prompt that keeps coming is fixed in code, with an exact rule or a refusal that explains itself, never answered by hand. Bypass mode does not reach everything, and by design: explicit ask rules in the settings, the model's own questions and a few safeguards prompt in every mode.
  • Later on 26 October the preference had its first case. A session working in a worktree had notes to append to a private file of one of my sites, and the only runner for that file lived in the private folder itself, so the gate refused the command and the session asked me to run each append from my own terminal tab, one prompt per note. The fix is a small script in the shared skills folder that resolves the file's path inside its own code, so the command line names no store path and the gate has nothing to stop. It appends and nothing else, with the file's own line endings, and it writes only while the session holds the marker the writer handoff leaves for that store. Before it landed, its tests ran against a throwaway copy, and the gate itself was fed both command shapes from a worktree: the new one passed and the old one was refused.
  • Also on 26 October, the ask rules in my settings got the same treatment. There were 46 of them, written five days earlier in a security pass, on edits to skills, task prompts and project scripts and on sending mail, sharing a file or deleting a database, and an ask rule prompts in every mode as a hook's ask does. Twenty-eight were removed: the ones on routine files, and the ones on sending and sharing, where my word in chat is already the decision. Eight, the deletes of a database, a key store or a storage bucket, became deny rules, since a session never deletes a store. Ten stay, on the settings and hook files themselves, as a tripwire against a session rewriting its own permissions. Two prompts no rule reaches, and both are the app's own: removing the folder a session stands in or a registered worktree folder, which is why a worktree is now retired with git's own worktree remove, and a command typed into my terminal panel, which asks me by design.

What to copy

If you run with permissions bypassed and still get prompts, read the app's log before you touch the mode again. The prompts may be your own hooks, and bypass does not silence a hook's ask. Then count them. Let the hook decide, and make its refusal carry enough for the agent to recover on its own.

Still open

A read hidden inside interpreter code still costs a session one detour, because the gate reads the command text and not what the code does. A narrow allowance for one exact read shape is possible, measured first. And the prompts had been an accidental brake on my weekly usage, about eight idle hours across five sessions. That brake is gone, and a deliberate stop near the limit would have to be built on purpose.

17 and 18 November: two kinds of words both shells read alike

Since the gate began denying instead of asking, a command it cannot read to the end costs the session one retry, and nothing waits on me. My nightly replay of the day's sessions (Replaying a day of sessions from their transcripts) lists those refusals, and over eight days it counted 80. I asked what the reader could safely learn from them.

The obvious candidate was variables: 30 of the 80 began by setting one, usually to a long path, and used it after. I had tried reading variables in October, and two review rounds found sixteen serious ways past the reader, most of them through the variables, so I had dropped them. Doing it safely now would mean reading each command the way one particular shell does, and here Codex's shell tool, which its hook calls Bash, runs Windows PowerShell. The 80 were 75 different commands, and reading variables would have let 26 of them through instead of 8. I left them out.

That left two kinds of words that Bash and PowerShell hand to a program in exactly the same way, which the reader refused only because it had never learned them: a percent sign inside a word, as in date +%H:%M, and an option glued to one quoted value, as in --format='%h %s'. Each form went through both shells into a one-line program that prints the arguments it receives, and the reader learned only the forms that came out the same. A word that starts with a percent sign is still refused, because PowerShell reads a leading percent sign as a short name for ForEach-Object. So is --%, after which PowerShell passes the rest of the line on untouched.

The same test turned up a hole. PowerShell treats curly quotes (‘ ’ “ ”) as real quote marks, and Bash does not. So a line the reader took as one quoted word could, in PowerShell, close the quote early and run a command hidden inside it, and the gate let such a line through. Now a quoted word that holds a curly quote stops the reading, which costs nothing unless one of the rules' words comes after it.

Codex built the change and a Claude session reviewed it before it landed. Of the 80 refusals, 8 are now read and go through, each decided exactly as the same command written without the new words. A replay of the week's 17,934 shell commands through the old gate and the new one changed nothing else. If the new reading ever fails, it refuses that word as before instead of crashing, because a crashed hook would deny every command in every session.

Variables stay unread on purpose. A session that keeps a path in a variable in front of a git command or a data path is refused, and the refusal tells it to write the path out in full.

18 November, later: a side copy could still move the main branch

The review of that change noted one more gap, and I asked for it to be closed the same day. The gate's first rule only looked at a project's main checkout. But a worktree, the side copy a session works in, shares the main checkout's branches, so a git command run there can move the main branch too. In a scratch repository, with the main branch checked out in the main checkout, git still let a worktree point the main branch at another commit through its plumbing commands, delete it, rename it, reset it, and push over the remote's main branch. A few other forms git refused on its own.

The gate now reads a worktree's own git files to see which project it belongs to and which branch it has checked out. From a worktree of one of my projects, a command that names the main branch in any of those forms is refused, with the reason and the landing skill as the way through. A worktree's merge, rebase or reset of its own branch still goes through, and so does a push of its own branch. Codex reviewed the change and found one more form, a pull that names the main branch as its destination, which git also allowed; that is refused now too. Replayed over the week's commands, the change touched one: a session's fetch of the main branch into itself from a worktree, which git would have refused anyway.

Back to top

A map of my projects and the steps between them

A change to a scoring rubric needed a revision-log entry, and I was the one who remembered it. I now have a map of the first three repositories, a check before a branch joins the main code, and a local dashboard of what is owed. Most of the duties recorded so far are still reminders or events the map does not watch. Three more repositories were mapped on 18 November, so six of the fourteen have a record.

The problem

I wanted one place to see how all my projects fit together. A change to a scoring rubric needed an entry in its revision log, and it got one only because I remembered the log. A change in one repository can also leave a step to do in another. Each site's admin page shows its own project, so I had no dashboard across the whole set.

The solution

In one evening, Claude and Codex built a map from a small record in each of the first three repositories. The record names the parts, the stores they read and write, and the duties a change carries. Before a branch joins the main code, the landing step runs the checks for the duties its changed files touch and names the missing step if one fails. Both agents can ask the same reader what a file carries, and Claude gets a reminder when editing. A local dashboard opens on what is owed and what waits for me, with eight repositories still marked as not mapped.

How to add it

  1. Start with a change whose follow-up is easy to forget, and record the parts and stores involved in each repository.
  2. Write when its duty applies, what must follow, which side is the source of truth, and the check or the word none.

    Made-up duty, written as a planning note for your own record

    Duty: Rebuild the sample catalogue after an item changes.
    When: A file under catalogue-source/ changes.
    Must follow: Regenerate catalogue.html.
    Source of truth: catalogue-source/; catalogue.html is generated.
    Check: none.
    Status: reminder.
  3. Make the command that merges a branch run the affected checks, and test it with a change that deliberately omits its follow-up.
  4. Give both agents a way to look up a file's duties, and generate the project pages and overview from the same records.
  5. Put unmet checks and decisions waiting for you first on the dashboard, and label reminders and unwatched events separately.
Detailed notes: A map of my projects and the steps between them

What happened

I wanted an organized map of all my projects, with each project's parts and their connections clear in one place. A change to a scoring rubric had needed an entry in its revision log, and the log was brought up to date only because I remembered it. I wanted a session that changes a file to find the steps that change carries, including a step in another repository, without relying on my memory.

I also wanted one dashboard across the projects. Each site's admin page gives me a view of that site, but none covers the whole set.

Two designs before the build

Claude and Codex each proposed a design before seeing the other's. They arrived at the same shape: a small record per repository, a generated overview, a reader that returns what a task needs, and checks where work is completed, with a local dashboard first and a private hosted copy later.

The design asks each duty to say when it applies, what must follow, which side is the source of truth, and what check proves it. Where there is no check, it says so.

What was built that evening

The first records name each repository's parts and the stores each part reads and writes. They attach duties to the files and events that make them apply. A generated page shows each mapped project, and one page lists all fourteen repositories, including those with no record yet.

Claude and Codex use the same reader. Before changing a file, a session can ask what the file carries and get its parts, duties and references. The landing step, which checks a branch before it joins the main code, runs the checks selected by the branch's changes. A failed check refuses the landing and names the duty and the next step. Claude's edit hook also gives a reminder once for a duty in a session; that reminder never blocks an edit.

The local dashboard uses the records and evidence already on disk. Its first screen shows what is owed and what waits for me. A feed that cannot be read is labelled unavailable, and the rest of the page stays usable. That happened on the first real build: the newest line of a log was a run that had done nothing, so it carried no count, and the feed came up unavailable. The reader now takes the newest line that has a count.

What the first records cover

The first evening mapped three of the fourteen repositories: 108 parts, 331 stores and 196 duties. Of those duties, 41 are checked at landing, 110 are reminders and 45 are tied to events the map does not watch yet.

So most duties have no check running at landing. The record keeps that gap beside each duty, so a listed duty does not look as though it has been proved.

What the checks prove

The other coding agent reviewed each of the first three records against the code. It found duties marked as checked whose test proved less than the duty's title claimed. Each was narrowed to what its test proves, split in two with the unproven half left as a reminder, or given the test that does prove it. The dashboard's own duty is split the same way: a test checks its saved data, and keeping the page in step with that data stays a reminder, because that test does not prove the page reads every field. A check that only finds a command named in a test chain is labelled a text check, since finding the name does not prove the command runs.

A session tried the original failure on a scratch branch: it changed the rubric's version without adding the log entry. Landing was refused in seven seconds, naming the duty and the entry to add. With the entry present, the check passed.

What to copy

Start with one change that has already caused a forgotten follow-up in your own repositories. Write down the duty and test the failure before expanding the map. The made-up catalogue duty in the steps above is a planning note, with no check attached; it is a reminder until a test exists and the landing command runs it.

Still open

Eleven repositories still have no record. The map does not yet watch events such as a publish, a deploy or a key rotation, so their follow-ups still depend on the existing procedures and reminders.

The dashboard is a local file. A private hosted copy is the next step.

18 November: the rules file, and the other agent's seat

The next day I added the map's three steps to the rules file that every session reads at its start: ask what a file carries before changing it, expect the landing step to run the duties the change touches, and edit the record in the same branch when a part is added, moved or retired. The edit reminder reaches one agent while it works. The rules file reaches both before they begin.

The other coding agent also ran the refusal from its own seat, on a change that left a name out of a generated file. The landing was refused in eleven seconds. Its notes on what it was shown led to fixes the same night: one failing check had been reported as two unmet duties, the reader had told it to work in the first agent's kind of checkout, a count read "1 duties", and a search reported 83 matches and listed ten.

18 November, later: three more repositories

Three more repositories got their records the same day: two of my sites and the one where my posts are made. They add 74 parts, 148 stores and 140 duties. Of those duties, 44 are checked at landing, 79 are reminders and 17 are tied to events the map does not watch yet. Six of the fourteen repositories now have a record, and eight do not.

The other coding agent reviewed each record once against the code and reported 28 errors, none of them a blocker. Most were of two kinds: a statement in the record that the code did not bear out, and a duty that was not attached to a file it depends on. One duty said a route refuses before anything is written, and a counter is written first. Another credited a test run with checking a rule, though the run swaps that rule for a copy of its own, so the real one was never tested. Three checks ran tests that open a browser or read files outside the repository. A landing check has to work offline and leave the files as it found them, so those three became reminders that name the command.

On the third record, each check was first going to run only the tests named for its duty. The test runner passes when no test has the name it is given, so a renamed test would have emptied the check, and the check would still have passed. Each check on that record now runs a whole test file. The duties also listed every file their tests load at first, and an edit to the file that holds these entries was handed duties about sign-in and the privacy page along with its own. A duty there now lists the files where its own rule lives, and one duty on every file runs the whole test suite, so a file that stops loading is still caught.

The last review also turned up numbers kept by hand in several places, such as a time limit written in the code and again in two emails and on a page. The copies agree today and no test compares them, so each is a reminder. On the last two records a session also broke every checked duty once on purpose, and each check failed.

Back to top

A shared task note for Claude and Codex

My house rules now tell Claude and Codex to use a shared task note whenever they work together. The owner keeps the decisions and the next action in one file, and an update based on an old version is refused. A short message still tells the other agent when to act.

The problem

I read a suggestion that Claude and Codex could work more efficiently through a shared Markdown file. Passing the same background between chats can leave decisions buried in old messages. Each agent also works in its own checkout, so two files with the same name can hold different versions of the task. I wanted both agents to pick up the shared note when work resumed, without needing me to remember a command.

The solution

The shared house rules tell both agents to use shared-handoff automatically for joint tasks, reviews and handoffs. The task owner keeps one note outside the code checkouts, with the current inputs, decisions, test evidence and next action. The helper locks each update and refuses it if the file has changed since the owner read it. Other agents return their results for the owner to check and add to the note. A watcher also passes future house-rule edits into running Claude sessions at a normal tool or prompt boundary, while task handoffs still use a short message.

How to add it

  1. Tell both agents in their standing instructions to use the skill automatically when working together, with one owner and a shared file outside disposable checkouts.
  2. Keep the objective, current code version, decisions, evidence and next action in the note, with links to longer records.
  3. Have the owner update it at a milestone or handoff, checking that its contents have not changed since the last read.
  4. Send a short message naming the file, its version and the requested action, and have the recipient report which inputs it used.
  5. Keep existing review and permission rules, and measure note reads and updates along with any reduction in repeated prompts.
Detailed notes: A shared task note for Claude and Codex

What prompted it

I read a tip about using a shared Markdown file when Claude and Codex work together. A brief can keep the current task visible without carrying a whole conversation into each review. The file still takes tokens to read, so I have not attached a saving to it.

One owner and one file

The new shared-handoff skill gives both agents the same template. The task owner maintains the note, while the other agent returns its findings in a response or an assigned output file. The note lives outside the code checkouts, where removing a finished checkout will not remove it.

The note names the objective, the code or input version, decisions still affecting the work, evidence for completed checks, and the next action. Longer logs stay in their own files. A test result carries the version it checked, so a pass on yesterday's code does not become a claim about today's.

When the note changes

The Python helper prints a revision and a hash when the owner reads the file. An update must supply that hash. If another update has happened, the helper leaves the file alone and asks the owner to reconcile the newer contents. An operating-system lock prevents two helper updates from running at once, and the new file replaces the old one only after it has been written.

The owner label catches an accidental update from the wrong participant. It does not authenticate the person or model running the command. The existing rules still decide who owns the task and which actions are authorized.

What still needs a message

A changed file does not wake another agent. The owner sends a short request naming the file, its revision and the next action. The recipient checks those inputs and reports which version it used. If the current request still names the same exact commit, the recipient reviews that commit and reports the newer note or branch state as well. A changed or withdrawn request goes back to the owner before work continues.

Claude reviewed a redacted copy of the skill and helper. Its review caught a problem with recording a request as sent: that edit would change the hash in the message. Delivery receipts now stay in the transport record until the next substantive update. A confirmed transfer of the task also gets a new note under the new owner, with a link back to the old one.

The skill keeps existing code-review and shared-data handoffs in place. A reviewer restricted to one checkout receives an allowed snapshot instead of wider access to the machine. Notes stay brief, and the agents do not poll an unchanged file.

17 November: use it without a reminder

I asked for both agents to use the skill whenever they work together, so I would not have to remember its name. The shared house rules now tell them to load it before a handoff or review and when joint work resumes. The task owner reuses the existing note and updates it at a substantive milestone.

The rule is kept in the Claude instructions and copied into the Codex instructions by the existing sync. The skill description names the automatic trigger, and its Codex metadata explicitly allows automatic invocation. The rule applies when the agents are already working together; it does not ask them to start another model or turn a solo task into a joint one.

17 November: reach sessions already running

I also wanted sessions that were already open to get the new rule without interrupting their work. A one-time reminder now carries the updated section into each named session after a tool finishes or when its next prompt arrives. Idle sessions wait for normal activity. Nothing is restarted or woken just to read the reminder.

The reminder is limited to the sessions that were open when it was queued. It skips subagents and sessions that have already received its output, and it leaves existing permissions and tool results alone. I checked the reminder markers in live transcripts and confirmed that those sessions kept their original processes. The delivery record distinguishes reminders already emitted from ones still waiting; it is not evidence that every agent has acted on the rule yet.

17 November: future rule changes follow automatically

I asked for the same behaviour after future changes to the shared house-rules file. The watcher now compares the current file with the version each parent session last received. It supplies the current changed sections and names sections that have been removed. A session that has been idle through several edits gets the latest version when its work continues.

Unchanged rules produce no new context. A new fingerprint must be seen twice at least two seconds apart so a save can settle; the check never sleeps or pauses the task. New sessions record the rules they load at startup. A session without a baseline, a changed section order, or a missing old snapshot can require the full current file.

The permanent watcher replaces the earlier one-time reminder hooks. It makes no separate model call and leaves tool results and permissions alone. The local checks cover updates, removals, reversions, idle catch-up and competing events. Each of seven selected checks failed when its corresponding behaviour was removed, and the watcher then detected the real house-rule edit in running sessions.

Back to top

A baseline list for every new website

A protection I built for one site was missing from six others, and adding it afterwards took six branches and eight reviews. My rules file now lists what every new site gets from its first version, and a session says in its report which item it left out. The first item is a signal that notes when an automation or inspection tool is attached to a visitor's browser.

The problem

I worry about my sites being copied by AI tools that drive a real browser, so one site got a small signal: a page tells its own server when an automation or inspection tool is attached to the browser showing it, and the server keeps a note for me to read. Nobody is blocked by it. Six other sites had been built without it, and adding it afterwards took six branches and eight reviews by the other coding agent. Every review of the first four found something the first build had not taught. On one site the address of a download page carries the buyer's signed link, and the first version would have stored that link with a note.

The solution

My rules file now has a section that lists what every new website gets from its first version. A session that starts a site builds each item in, or says in its report which one it left out and why, and only I add an item. The first item is the signal, with what the ports settled written beside it. A note names the page by its route and never by an address that can carry a token, and the privacy notice says exactly what a note holds and for how long. Who a note names follows what each site has promised its readers, so on one site it names nobody.

How to add it

  1. Add a section to your rules file that lists what every new site gets from its first version, and start it with one thing you have already built and tested on a real site.

    The end of ~/.claude/CLAUDE.md (on Windows, %USERPROFILE%\.claude\CLAUDE.md)

    ## Every new website: the baseline
    
    A list of what every new website gets built in from its first version. When you start a new site, or give a site its first server code or its first public page, build each item in, or say in your report which one you left out and why. Add an item to this list only when I ask for it.
    
    1. <Your first item>. Say what it is in two sentences and what it must never do. Then what goes with it: a sentence in the privacy notice that says exactly what is kept and for how long, a way for me to read what it records, tests that run it, and a review before it goes live. Then the files in an existing project to copy from.
  2. Beside each item, write what putting it on a second site taught you, so the third site starts from the lessons.
  3. If an item records anything about visitors, have it name a page by its route and never by its full address, and have the server keep only what it recognizes.
  4. Let each site's own promises decide who a record names, and say in the privacy notice where a record sits outside a download or a deletion.
  5. Have a test run the script a page carries, and load the page once in a browser with a tool attached before the review.
Detailed notes: A baseline list for every new website

What happened

I worry about my sites being copied by AI tools that drive a real browser. A crawler that says who it is can be turned away before it reaches the site. A tool attached to a person's own browser, in a session that person signed in to, looks like the person. So on 9 November one of my sites got a small signal. A page tells its own server when an automation or inspection tool is attached to the browser showing it, and the server keeps a note for me to read. Nobody is blocked or slowed. A member with the browser's developer tools open looks the same as a tool, so a note is a line on a list for me.

A week later I asked for the same signal on four other sites of mine. They are built in different ways: a shop that sells one download, a members' site that is not open yet, a private beta for invited testers, and a private demonstration behind a sign-in. Each needed its own place for the script, the route that takes the report, the stored notes and the sentence in the privacy notice. One session wrote a brief for each site, and four builders worked at the same time on a cheaper model. The session read every change and reran every test, loaded each page in a browser with a tool attached, and then sent each branch to the other coding agent for its review.

All four reviews found something the first site's build had not taught.

  • On the shop, the address of a download page carries the buyer's signed link, and the first version sent a page's whole address with a note. The link would have been stored beside it.
  • On the beta, the privacy page promises testers a download and a deletion of everything kept about them. The notes there name nobody, so they sit outside both, and the page did not say so.
  • On three of the four, the privacy sentence said "your browser's name" for what is the browser's whole description of itself, with its version and system.
  • On the demonstration, the signal stays off until I create its database, and the written steps for turning it on would have broken the test suite.

The same evening I asked for two more, a public directory and this site. Their briefs carried what the first four reviews had found, and each of those two reviews came back with one small finding. When I said to turn the signal on, a review of that last step found one more thing: the shop's public page has no privacy line at all, so the signal there would have started keeping notes with nothing on the page saying so.

What changed

My rules file has a new section, a list of what every new website gets from its first version. A session that starts a site, or gives one its first server code or its first public page, builds each item in, or says in its report which one it left out and why. Only I add an item.

The list has one item so far, the signal. What the ports settled is written beside it, so the next site starts from them.

  • A note names the page by its route, never by an address that can carry a token, and the server keeps only what it recognizes.
  • Who a note names follows what the site has promised its readers. On the members' site it names the account, behind the sign-in it names the viewer, and on the beta it names nobody. No site keeps a visitor's network address.
  • The privacy notice says exactly what a note holds, how long it is kept, and where it sits outside a download or a deletion.
  • A site says what it keeps before it keeps it. Where a live page has no privacy notice, turning the signal on waits for one.
  • A test runs the script a page carries. Before, the tests only read its text.
  • Before the review, the page is loaded once in a browser that has a tool attached, and the note it leaves is read back.

The item also names the files to copy from, one set for each kind of site.

What to copy

The section is short, and the first step above has a version with no project names in it. The part to keep is two rules: a session says which item it left out, and only you add one. If sessions could add items, the list would grow with every idea they have. If they could skip one without saying so, I would not know what a new site lacks.

If your first item records anything about visitors, the first four lessons in the list above apply to it, whatever it records.

Still open

Two of the ports went live the same evening, on my word: the private beta and the private demonstration. The shop's public page waits for its privacy line, the members' site is not open yet, and the directory waits on my word. This site has the signal too, and its privacy page says what is kept. The first site's signal has been live since 10 November, and its first month is read on 10 December.

The new ports keep a note only when a tool is attached. They keep no count of ordinary page views, so there I can read how many notes there were and not what share of visits they were.

This entry says what the signal does and leaves out how it does it, because a full description would make it easier to avoid.

17 November: two more went live, each with a notice first

The directory and the shop's page now have the signal. Neither had a privacy notice, so each got one before the signal was turned on.

Writing the directory's notice meant reading what that site keeps, in its code, before writing a word. The reading found two things to fix first. A submitter's email would have been shown on a public page the first time a submission was approved, and the sign-in page said the site stored only an email address when it stored more. No submission had been approved yet, so no address had been shown. The other agent's review then found two more places where the notice said less than the code keeps.

Two drafts also carried a sweeping sentence that turned out to be untrue. The shop's page was going to say the site asks for nothing, and the page has two sign-up boxes. This site's privacy page said nothing else about a visit was kept, and its host keeps a log of requests. Both sentences are gone. The item in my rules file now says to write a notice from a reading of what the site keeps, and to check a "nothing else" claim the same way as any other.

Back to top

A review after each session, checked before I installed it

A small public skill runs the US Army's after-action review on a finished AI session and writes down what to change. I had every file read and scanned at a pinned commit before it went in, with one section added. It has not run on a real session yet.

The problem

I wanted to try a small public skill that runs an after-action review on a finished AI session. It asks the US Army's four questions, writes down concrete lessons, and proposes fixes to the rule and skill files the agent reads next time. It came from a repository I did not write, and its instructions let the agent edit those files once I say "apply". I wanted every file checked before it came onto my machine.

The solution

A session read all five files at a pinned commit and ran a static scanner over them. The one script is 125 lines of standard Python that makes no network call and reads and writes a single lessons file. The skill went in as a house copy with one added section: its edits to my rules and skills go through the same checked routes as any other change, and a scheduled run only proposes. A house file records the source commit and that section. The skill has not run on a real session yet.

How to add it

  1. Fetch the repository at the commit I read, and read all five files before anything is installed.

    Git Bash, macOS or Linux: the repository at the commit I read

    git clone https://github.com/coopersimson96/aar-loop aar-loop-read
    git -C aar-loop-read checkout a7172d610760ba403af4cf3cb18dc0d895431b2e
  2. Copy the instructions, the scripts folder and the licence into a folder named aar-loop under your skills folder.
  3. Decide where its fixes may go. If your rules or skills have a checked route for changes, add a short section to the skill that sends its edits through that route and has unattended runs propose only.
  4. Write down the commit you copied and your changes next to the skill.
Detailed notes: A review after each session, checked before I installed it

What happened

On 15 November I asked a session to check a small public repository, coopersimson96/aar-loop, and to install it if it was safe. It is a skill for Claude Code and similar agents that runs an after-action review on the session that just ended. The method is the US Army's, four questions asked in order: what was supposed to happen, what actually happened, why there was a difference, and what to do the same or differently next time. From the answers the agent writes one to three lessons that are specific enough to check later. It proposes edits to the rule or skill files it will load next time, and it appends each lesson to a file named LESSONS.md.

The repository is five files: the skill's instructions, one Python script, a README, an MIT licence and an ignore file. The session read every one at the latest commit, the repository's third, from 26 July. The script is 125 lines and uses only the standard library. It reads and writes one file, the lessons file it is pointed at. It makes no network call, starts no other program and reads no credentials. The instructions are plain text with no hidden characters.

The session then ran SkillSpector over the same files, without its model pass. My setup already runs that scanner on a repository before a command fetches it. It scored the skill 47 out of 100, medium, and found nothing of the kinds that stop a fetch here: prompt injection, supply chain, or a known malware signature. Its one high finding was the line .env in the ignore file, which only tells Git to leave such a file out of a commit. The medium findings were a path to a skill file in one of the examples, no declared list of tools, a file that persists between sessions (which is what the skill is for), and the rule that lets the agent apply its fixes when I say "apply".

What changed

The README suggests pasting a one-line prompt that asks the agent to install the skill globally. I had it installed as a house copy pinned to the commit that was read, through the checked flow every skill change here takes. The script and the licence are the repository's files, unchanged.

The one change is a short section at the end of the instructions. Upstream says that once I approve a fix plan, or when I ask for the review with "apply" or "fix it", the agent edits the target files the way it makes any other edit. Here a change to a skill goes through a scratch copy with its own checks, a change to a repository goes through that task's worktree, and my global rules and settings change only when I approve the exact edit. The added section says that "apply" skips the question about the plan and never those routes. It also gives the script's full path, has a lessons file inside a repository written in the task's worktree, and has a scheduled run propose fixes without applying them. A house file beside the skill records the source commit, what the read found and this section, so a later sync with upstream can put it back.

The read found two limits that I left as they are. The script rewrites the whole lessons file on each append and takes no lock, so two sessions appending in the same moment can lose an entry. Its tag filter matches part of a word, so a search for api also finds rapid.

Before the skill went in, the session ran the script on a scratch file. It added two lessons and listed them by tag as the instructions describe.

What to copy

Read a skill's whole repository at a pinned commit before you install it, and install the files you read. When a skill is allowed to edit your rules or your other skills, check what "apply" would let it touch, and send those edits through whatever route your other changes take. Keep the commit and your changes written down next to the skill.

Still open

The skill has not run on a real session yet, so I cannot say whether its lessons are worth keeping. My sessions already keep notes in Claude Code's memory folder, and I have not decided which of the two a lesson about how I work should go to.

Back to top

What a clean worktree can still hold

A finished checkout still held a second Python environment. Another held test results I wanted to keep. My close-out now counts the files Git leaves out of its status report.

The problem

One session had merged its branch, and Git reported a clean checkout. Its Python environment still occupied nearly half a gigabyte. In another clean checkout I found scratch files whose contents I could not find in the main project data.

The solution

Before I archive a session, it now counts the files in its worktree, including the ones Git ignores. If it finds what looks like a copy, it checks the contents against a file I will still have after cleanup. Codex sends Claude the list for a decision before removing anything. When I give Claude the cleanup, Claude checks the files and does the removal itself.

How to add it

  1. From the task worktree, check both groups of files that Git does not track.

    Untracked files that appear in Git status

    git ls-files --others --exclude-standard

    Files hidden by the ignore rules

    git ls-files --others --ignored --exclude-standard
  2. Compare suspected duplicates by content with the originals. Give unique test results a permanent home before removing their checkout.
  3. Check who holds the worktree just before removing it. A desktop app can hand the same folder to another session.
Detailed notes: What a clean worktree can still hold

The environment and the experiment

I went looking for files left by finished sessions. In one checkout, every file in the Python environment matched the one in the main checkout. In another, I could account for the input files, but the results of the experiment existed only in the trial folder as far as I could tell. Both checkouts looked clean in Git.

Before I archive a session

The session now reports how much space its worktree takes and which folders hold files outside Git. If it encounters a link or another checkout inside the first one, it names that path for a separate look. I want the close-out to tell me which folder I can remove and where I will find anything worth keeping afterward.

The daily cleanup for copied project data still has its own job. It can clear a copy after a session has archived. The new check also catches the environment and scratch results while the session still knows what they were for.

Who does the removal

I wanted Claude to review the list while the files were still in place. Codex now gives Claude the list and waits for its reply. If I ask Claude to do the cleanup, Codex hands it over. A folder that has changed since the check goes back for another look.

Back to top

Replaying a day of sessions from their transcripts

Anthropic's post on agent memory describes dreaming, an offline pass over past transcripts that corrects the notes later sessions trust. As a first step here, a script with no model and no network reads a day of my Claude Code transcripts in about 4 seconds and writes my messages and each session's questions to me, with their answers, to a dated folder outside every repository. Building it showed that a message I type while a session works is kept as an attachment, where a reader of ordinary messages never looks, and the other coding agent's review found that questions I had answered still read as open. From 11 November a scheduled task runs the replay every morning and writes a page of proposals beside its digest. On 30 November that page gained a section on my skills shown without their descriptions, a change with an entry of its own.

The problem

My sessions and I both make forecasts that are sealed when they are made and graded later against what happened. Grading needs what each session said and asked me and what I answered, and all of that sat in the transcripts, so the session doing the grading had it only when I passed it on. A day here writes about 770 MB of transcripts, most of it tool output, which is too much to hand a model whole. Anthropic's engineering post of 6 November, "The components of agent memory", describes dreaming: an offline pass over past transcripts that corrects wrong notes and keeps the context every session starts with small. The research preview of dreaming, Dreams, works on sessions of Anthropic's Managed Agents service and cannot read the transcripts Claude Code keeps on my machine.

The solution

A script now reads a day of my Claude Code transcripts, with no model and no network, and writes two files to a dated folder outside every repository, since they hold my words. The first lists each event with the file and line it came from: what I said, what each session asked me and my answer, the new sessions proposed or started, the tool calls refused, and Claude's sentences that read as a forecast or a recommendation, found by pattern and never judged. The second is a digest of the same for a reader: my words by session, the questions still waiting for my answer, the candidate sentences, the new sessions and the refusals grouped by reason. Most of a transcript is tool output, so the script parses only the lines that hold one of five markers, and a day's 770 MB takes about 4 seconds. From 11 November a scheduled task runs it every morning and writes one page of proposals beside the digest, and it changes nothing else.

Four rows, one for each kind of line in a Claude Code transcript: a message I sent, the one kind a reader of messages finds; tool output and request records, most of the bytes, skipped unless a line holds one of five markers; an attachment of type queued_command, the only record of 74 of the 79 messages I typed while a session worked; and a tool result linked by the call's id, which holds my answer in a question's dialog, and before the fix 24 of a week's 112 questions read as open. Beneath: a moved session can leave an older copy of the file, so the newest copy is read first.
Where my words sit in a transcript, and the two kinds a reader of ordinary messages misses. A drawn figure, not a screenshot.

How to add it

  1. Find your transcripts: Claude Code writes one JSONL file per session, with the session's id as its name, in a folder under ~/.claude/projects (on Windows, %USERPROFILE%\.claude\projects) named for the directory the session ran in.
  2. Before you trust a reader of ordinary messages, count the ones you typed while a session was working, which a transcript keeps as queued_command attachments.

    Python 3, saved as queued.py and run with python queued.py

    """For each Claude Code session changed in the last day, count
    the messages you sent it and the ones you typed while it was
    working, which its transcript keeps as queued_command attachments."""
    import json
    import time
    from pathlib import Path
    
    
    def human(d):
        origin = d.get("origin")
        return isinstance(origin, dict) and origin.get("kind") == "human"
    
    
    since = time.time() - 24 * 3600
    projects = Path.home() / ".claude" / "projects"
    for path in sorted(projects.glob("*/*.jsonl")):
        if path.stat().st_mtime < since:
            continue
        sent = queued = 0
        with open(path, encoding="utf-8", errors="replace") as f:
            for line in f:
                if '"kind":"human"' not in line:
                    continue  # most lines are tool output: not parsed
                try:
                    d = json.loads(line)
                except ValueError:
                    continue
                if d.get("isSidechain") or d.get("isMeta"):
                    continue
                a = d.get("attachment")
                if d.get("type") == "user" and human(d):
                    sent += 1
                elif (isinstance(a, dict) and human(a)
                      and a.get("type") == "queued_command"):
                    queued += 1
        if sent or queued:
            print(f"{path.stem}: sent {sent}, typed while it worked {queued}")
  3. Write the replay in code, with no model: parse only the lines that hold a marker of what you want, give each event its transcript's file and line so it can be checked, and write the output outside every repository, since it holds your own words.
  4. Link a question to its answer by the id of the tool call that asked it, since an answer picked in the question's own dialog comes back as that call's result.
  5. Count the same words sent twice as two messages, and when a moved session leaves an older copy of its transcript, read the newest copy first and count each event once.
Detailed notes: Replaying a day of sessions from their transcripts

What happened

On 10 November I asked whether the reports that AI benefits from "sleep" had anything to do with my own work. My sessions and I both make forecasts that are sealed when they are made and graded later, and grading needs what each session said and asked me and what I answered. All of that sat in the transcripts Claude Code writes, and the session doing the grading had it only when I passed it on.

The main report was Anthropic's engineering post of 6 November, The components of agent memory. It describes an agent's memory in four layers: the transcripts, notes, structured pages, and the context injected into every session. Dreaming, in its terms, is offline reflection over the transcripts that corrects wrong notes, merges duplicates, adds index pages and keeps the injected layer small. The risks it names apply to my memory folder too: wrong notes that later sessions trust, notes that go stale, bloat, long instruction files that sessions follow less closely (a session in my main folder starts with about 60 KB of injected rules and notes), and two writers overwriting one page.

Anthropic's research preview of dreaming, Dreams, takes a memory store and up to 100 sessions of its Managed Agents service and writes a new store without changing the input. It cannot read the transcripts Claude Code keeps on my machine, and those are large: in one day 89 of them changed, about 770 MB, most of it tool output and request records. So the first step was a replay in code, with no model and nothing that changes a note.

What changed

The script, night.py in my hooks repository, takes a window of time, the last 24 hours unless told otherwise, and reads each transcript under ~/.claude/projects that changed in it. It writes a folder named for the window under ~/.claude/night and refuses an output folder inside a git repository, because what it writes holds my words. It sends nothing over the network, and the only thing it writes is that folder, with two files in it:

  • events.jsonl, one event a line, each with its transcript's path and line number, so any event can be checked against the line it came from. The events are what I said; each end-of-turn box, with its recap, its question and the button it put first; each question a session asked me, with the answer its dialog returned; each new session proposed or started; and each tool call refused, or prompt I answered by hand. Claude's sentences that read as a forecast or a recommendation are listed too, as candidates found by pattern and never judged.
  • digest.md, the same for a reader: my words by session, the questions still waiting for my answer, the candidate sentences, the new sessions, and the refusals grouped by tool and reason.

Every text taken from a message, a tool's input or a tool's result goes through a redaction first, which covers the key formats my setup knows and the secret values in its environment. The identifiers beside it, such as the transcript's path, the session's id and a tool's name, are written as the transcript has them. A subagent's own turns, compaction summaries and messages from other sessions are not my words, and the replay leaves them out.

What the transcripts showed

  • The transcript keeps a message I type while a session is working as an attachment of type queued_command. In the 80 newest transcripts, 74 of the 79 messages I typed that way were kept only there, so a reader of ordinary messages alone would miss them. Each one counts on its own. None was found stored a second time as an ordinary message, since no pair with the same words came within two minutes of each other in 1,462 transcripts, and the 15 pairs of the same words that did turn up, 6 to 63 minutes apart, were me sending them twice.
  • The replay also takes out the system reminders injected into a message, which 1,154 of my 5,957 typed messages held.
  • A transcript moves with its session's folder, and a move can leave an older copy behind: 14 of 1,461 transcripts had one. The replay reads the newest copy first, and an event that a copy holds again counts once. After a move an event's path can go stale, but the session's id, which is the file's name, finds the transcript again.
  • Most of the bytes are tool output and request records, so a line is parsed only when it holds one of five markers. The last 24 hours, 89 transcripts and 770 MB, took 4 seconds, and a week, 852 transcripts and 4.6 GB, took 24.

How it was checked

Its selftest runs 21 cases on made-up transcripts in a temporary folder. Before the review, the session that built it broke eight pieces of the script one at a time in a copy, and the selftest failed each time on that piece's own check.

The other coding agent then reviewed it in one round and raised seven findings, none of them a blocker. The session sorted them by how they can happen, as my rule for review findings asks:

  • Two happened on real transcripts, and both were fixed. A question I had answered in its own dialog read as open until I next said something, which was true of 24 of a week's 112 questions. Its answer is now linked to it by the id of the call that asked it, and with that link the count fell to none. The other was a rule that merged a queued message and a typed one with the same words within 30 minutes. It erased messages I had really sent twice, and no message in 1,462 transcripts was stored twice that way, so the rule is gone.
  • Three could happen in an ordinary run and went on record: a moved transcript's copy holding a new session or a question without its result, a new session's outcome read from after the window closed, and a rerun of the same minute's window failing between its two writes.
  • Two needed an input nothing produces and went on record: identifiers written without redaction, which cannot hold a secret, and a link planted under the output folder.

The selftest gained the four cases the round showed missing. Seven pieces, the two fixes among them, were then taken out one at a time, and each time their check failed. On the real transcripts of the last day, 14 sampled events of every kind matched the lines they cite, and parsing every line found the same 293 events that the markers found.

What to copy

If you want your sessions to learn from earlier days, the transcripts are already on your disk, and a script can pull out what matters in seconds before any model reads it. Look first at how your tool stores a message typed while a session works, since that decides whether a count of your own words is right. Link an answer to its question by the call's id: taking the next message as the answer is what made answered questions look open here. Keep a repeated message as two until you have found a real duplicate. The script in the steps counts, for each session of the last day, the messages you sent and the ones typed while it worked.

Still open

Nothing runs the replay on a schedule yet. A nightly step that reads the digest and writes proposals beside it, such as fixes to my notes, rows for the graded record and the questions still open, may follow, and this entry will get a dated section if it lands. That step would write proposals and change no note itself. Trimming the memory index that every session reads is a separate step.

10 November, evening: the nightly step

The nightly step in "Still open" above came the same evening. It is a scheduled task in the desktop app, set for 04:30 every day, and the app's fixed offset for it starts it at 04:37. The session that made it ran in bypass mode, so the task was saved in bypass, and I switched it to the default mode in the app's task editor, so it runs on three exact allow rules.

Each morning it runs the replay, reads the digest and writes one page beside it, in five sections: what waits on me, the prompts and refusals to fix in code, Claude's calls and what followed each (taken, declined, or no word from me yet), possible memory notes, and the night's numbers. The calls are candidates for the graded record. Each possible note is checked first against my memory index files. It only proposes: it changes no note, row or file of mine.

Three runs started by hand each found something the one before could not:

  • The first could not read the digest. The script that checks a task's prompt against its allow rules had taken a path with a placeholder in it, the folder the replay names when it runs, as inside the task's own folder, where a read needs no rule. It now reports such a path as unknown.
  • The second, with exact rules for both, read the digest but had its write of the page refused. Claude Code 2.1.321 checks a write into a .claude folder before it reads any allow rule, and only a person can approve one. The same goes for .git and .vscode folders and some sensitive file names, and the checker now reports those as a gap no rule covers. So the replay's default output moved out of the .claude folder to one inside the task's own working folder, which is no repository. That run had also marked itself done in its run record in the same step as the refused write, so the prompt now waits for the write's result before it closes the record.
  • The third wrote the page, 43 lines, with nothing refused.

My scheduled tasks are also kept in git, in a registry that writes them into the app. It refused the new task at first: the app had stored a field on it that the registry does not carry, useWorktree set to false. The app reads that value the same as no setting, and now the registry does too. The other coding agent reviewed that change and found no defect, and one older limit went on record: if the field later turned to true, nothing would notice.

The first page held a few questions still waiting on me and 13 refusals by my house gate for one reason, and it counted by tool the prompts I had answered by hand. It listed four of Claude's calls, two taken and two with no word from me yet, and one possible memory note beside two more that my notes already held.

If you schedule a model over such a digest, have it propose and change nothing, and start it by hand a few times before you trust the schedule. Keep its output out of any .claude folder, since Claude Code asks a person before any write there, whatever the allow rules say.

30 November: the skill listing

On 30 November the replay began reading the full skill listing each session gets, and the morning page gained a section that names any skill of mine a session saw by name alone, without its description. That change, and the budget behind it, has an entry of its own.

Back to top

A review finding counts where it can happen

One of my branches went through nine review rounds by the other coding agent, and only the first three changed anything real. A rule in my rules file now has the session sort each finding by whether it happens today, could happen in an ordinary run, or needs an input nothing produces, and fix it by that class. A branch gets three rounds at most, and a fourth is my decision.

The problem

Before some branches land here, the other coding agent reviews them, and my rule sent a branch back for another round after every blocker it found. One branch went nine rounds, every one of them a blocker. The fixes from the first three changed real results: 20 records stopped showing data borrowed from the wrong source. Rounds four to eight raised 14 more blockers on inputs that nothing had ever produced, a measurement after each fix showed that nothing real had changed, and the ninth round's one real finding was a crash that the eighth round's fix had put in. Across all my repositories, 209 of 681 recorded rounds were a third round or later, and their share rose from 8% of the rounds in the week of 5 October to 50% in the week of 2 November.

The solution

A section in my rules file now has the session sort each finding before it fixes anything: observed if a query or a run shows it happening on what exists today, reachable if an ordinary run could produce it or no evidence settles it either way, and constructed if it needs an input or an actor that nothing produces. Where a wrong answer reaches a reader or moves money, observed and reachable findings are fixed before the branch lands, and everywhere else only the observed ones are. A constructed finding is never patched by itself: a serious family of them gets one default that refuses what it does not recognize, and a check that reports the shape the first time it appears. Another round follows only an observed finding whose fix was substantial, and it reads the fix alone. A branch gets three rounds at most, and a fourth is my decision.

Three boxes in a column: a review round reads the whole branch again, a blocker is rated by the harm if it landed, and the fix sends the branch to another round. Beneath: one branch went nine rounds, the fixes from the first three changed real results, and the next five changed nothing real.
Before: every blocker sent the branch back for another round on all of it. A drawn figure, not a screenshot.
Three boxes, one for each class of finding: observed, fixed with a test; reachable, fixed where a wrong answer reaches a reader or moves money; constructed, never patched alone. Beneath: a finding with no evidence counts as reachable, and a branch gets three rounds at most.
After: each finding is sorted by how it can happen before anything is fixed. A drawn figure, not a screenshot.

How to add it

  1. Add a section to your rules file that has the session sort every review finding by how it can happen before it fixes one.

    The end of ~/.claude/CLAUDE.md (on Windows, %USERPROFILE%\.claude\CLAUDE.md)

    ## A review finding counts where it can happen
    
    Before fixing anything from a review, sort each finding and write its evidence in one line of the round's record:
    
    - Observed: it happens on what exists today (a row in the data, a caller in the code, a command that reproduces it), shown by a query or a run, never by argument.
    - Reachable: nothing today, but an ordinary run could produce it with nobody doing anything unusual. A finding with no evidence either way counts here.
    - Constructed: it needs an input no source has produced and no code produces, or an actor who is not there.
    
    The reviewer's severity says how bad a finding would be, not whether it can happen. Where a wrong answer reaches a reader or moves money, fix observed and reachable findings before the branch lands, each with a test. Everywhere else, fix the observed ones and note the rest in the record. Never patch a constructed finding by itself: where the harm would be serious, give its whole family one answer (refuse what is not recognized, and add a check that reports the shape the first time it appears). The same family back a second time is a design question, never a third patch.
    
    Ask for another round only after an observed finding whose fix changed more than the finding's own lines, and have that round read the fix alone. Three rounds at most on a branch. A fourth is my decision: bring me the last round's findings by class, what each fix changed on real data, and a recommendation.
  2. In the review request itself, ask the reviewer how each finding can happen: on what exists today, in an ordinary run, or only with an input someone would have to construct.
  3. Record each round with the count of findings in each class and the evidence for each one, and refuse a record that has findings and no counts.
  4. After a blocker, send the reviewer the fix alone with its earlier reply attached, and ask whether each finding is fixed and whether the fix broke a caller.
  5. Stop a branch at three rounds, and make a fourth your own decision, asked with the findings by class and what each fix changed on real data.
Detailed notes: A review finding counts where it can happen

What happened

Before a branch that could cost money or reach a reader lands in my repositories, the other coding agent reviews it. A script drafts the request, sends it and records the reply, the same script that keeps private files out of a review. Until 6 November my rule was that a blocker meant a fix and then another round.

One branch went nine rounds, and every round came back with a blocker. The fixes from the first three changed real results: 20 records stopped showing data borrowed from the wrong source. Rounds four to eight raised 14 more blockers, each on an input that nothing had ever produced. After each of those fixes the session measured the real data again, and nothing had changed. The ninth round had one real finding, a crash that the eighth round's fix had put in. One of the fixes took about a minute to write, and the round around it took three hours.

Long runs of rounds had become common on other branches as well. Across every repository, 209 of the 681 rounds on record were a third round or later. Such rounds were 8% of the rounds in the week of 5 October and 50% in the week of 2 November.

A session read the nine rounds back and found four things that had kept the loop going. The review request called a finding a blocker by the harm "if it landed" and said nothing about whether it could happen. Every round read the whole branch again with the same standing question, what no test covers. My rule sent another round after every blocker. And each fix added code for the next round to attack.

What changed

A section in my rules file now says that a reviewer's rating tells how bad a finding would be, and that whether it can happen is a separate question the session answers before it fixes anything. It sorts each finding into one of three classes and writes the evidence in a line of the round's record.

  • An observed finding happens on what exists today, and a query or a run shows it.
  • Nothing shows a reachable finding today, but an ordinary run could produce it. A finding with no evidence either way counts as reachable.
  • A constructed finding needs an input or an actor that nothing produces.

Where a wrong answer reaches a reader or moves money, observed and reachable findings are fixed before the branch lands. Everywhere else only the observed ones are. A constructed finding is never patched by itself. When the harm would be serious, its whole family gets one default that refuses what it does not recognize, and a check in the run reports the shape the first time it appears.

Another round follows only an observed finding whose fix was substantial, and that round reads the fix alone. A branch gets three rounds at most. A fourth is my decision, and the session asks for it with the findings sorted by class.

The script that runs the rounds now holds the session to this:

  • The review request asks the reviewer how each finding can happen.
  • Recording a round takes the count of findings in each class and is refused without them.
  • The request after a blocker is drafted on the fix alone, with the reviewer's earlier reply attached.
  • Sending a fourth round is refused unless the request carries my own words.

What to copy

If a second model reviews your code, ask it how each finding can happen as well as how bad it would be, and sort the findings yourself before you fix one. Put the evidence for each on record: the query, the caller in the code or the run that shows it. Fix what happens today. Let the place decide whether you fix what an ordinary run could produce, and give a family of constructed findings one answer, a default that refuses what it does not recognize. After a fix, have the reviewer read the fix alone. Choose the number of rounds in advance and leave the one after it to a person.

Still open

The session that built the branch sorts the findings on its own work, and the script takes the counts on its word. That is why the evidence for each finding goes on record and anything unproven counts as reachable.

Back to top

Scheduled runs no longer wait on a prompt nobody sees

One of my scheduled tasks sat for three days on a permission prompt nobody saw, after its run typed a command no rule allowed. A hook now reads the run's transcript, and when the schedule started the run and nobody has typed into it since, it denies the prompt at once with a reason the run can act on. Every other session still gets the prompt.

The problem

My scheduled tasks run in the Claude desktop app with nobody watching. One run typed a command that no allow rule covered, a PowerShell read of its own saved tool output piped into a ForEach-Object script block, although its prompt said to read files with the file tools. It sat on a permission prompt that nobody saw for three days, until a readiness check found it on 5 November. I had reworded every task's prompt on 21 October, and that had not stopped runs from improvising.

The solution

A Claude Code hook now answers the prompt when nobody is there to. It runs on the PermissionRequest event, which fires only when a prompt is about to show, so it has no rules of its own to match. It reads the session's transcript, and when the latest turn from a person or a schedule came from the schedule, it denies the call with a reason: use only the commands the task's prompt names and the file tools, and name the denied call in the run's report. A person typing into the run, and every ordinary session, still get the prompt, and an error in the hook prints nothing, so the prompt shows. In a live test with a one-time scheduled task the call was denied at once, and the run finished in 18 seconds.

How to add it

  1. Add a PermissionRequest hook in Claude Code that reads the session's transcript, and when the latest turn from a person or a schedule came from the schedule, denies the call with a reason the run can act on.

    Python, saved as ~/.claude/hooks/unattended.py: a hook in the same shape as mine

    """A PermissionRequest hook: when a scheduled run is about
    to show a prompt nobody will see, deny it with a reason."""
    import json
    import sys
    
    REASON = ("This is an unattended scheduled run, so nobody is "
              "here to answer a prompt. Use only the commands your "
              "task's prompt names, read and search files with Read "
              "and Grep, write with Write and Edit, and name this "
              "denied call in your report.")
    
    
    def unattended(path):
        # The latest turn from a person or a schedule decides.
        last = None
        with open(path, encoding="utf-8", errors="replace") as f:
            for line in f:
                if '"turnOrigin"' not in line:
                    continue
                try:
                    origin = json.loads(line).get("turnOrigin")
                except (ValueError, AttributeError):
                    continue
                if origin in ("human", "scheduled"):
                    last = origin
        return last == "scheduled"
    
    
    try:
        event = json.load(sys.stdin)
        if unattended(event["transcript_path"]):
            print(json.dumps({"hookSpecificOutput": {
                "hookEventName": "PermissionRequest",
                "decision": {"behavior": "deny", "message": REASON},
            }}))
    except Exception:
        pass  # print nothing, so the prompt shows as usual

    ~/.claude/settings.json, with your own user folder in place of you

    "hooks": {
      "PermissionRequest": [
        {
          "hooks": [{
            "type": "command",
            "command": "python C:/Users/you/.claude/hooks/unattended.py",
            "timeout": 20
          }]
        }
      ]
    }
  2. Before you turn it on, feed it a made-up transcript: a scheduled run should get the deny, and the same run after a person types into it should get nothing.

    Git Bash: a made-up scheduled run, which prints the deny, then a person typing into it, which prints nothing

    printf '%s\n' '{"type":"user","turnOrigin":"scheduled"}' > run.jsonl
    echo '{"transcript_path": "run.jsonl"}' | python ~/.claude/hooks/unattended.py
    printf '%s\n' '{"type":"user","turnOrigin":"human"}' >> run.jsonl
    echo '{"transcript_path": "run.jsonl"}' | python ~/.claude/hooks/unattended.py
  3. Test it live with a one-time scheduled task in the default permission mode. A task created from a session in bypass mode is saved in bypass and never prompts, so change its mode in the app's task editor first.
  4. Make the test command one with a script block, such as a file read piped into ForEach-Object, because Claude Code 2.1.309 runs a pipeline like Get-Item piped to Select-Object as read-only and it never reaches the hook.
Detailed notes: Scheduled runs no longer wait on a prompt nobody sees

What happened

My scheduled tasks run in the Claude desktop app with nobody watching, each from a prompt that names the commands its run may type. I reworded every task's prompt on 21 October, and that had not stopped runs from improvising. One run wanted to read its own saved tool output and typed a PowerShell command for it, a file read piped into a ForEach-Object script block, although its prompt said to read files with the file tools. No allow rule covered the command, so Claude Code put up a permission prompt, and in an unattended run nobody sees one. The run sat on it for three days, until a readiness check found it on 5 November.

What changed

Claude Code runs a hook on its PermissionRequest event only when a permission prompt is about to show. A hook there needs no rules of its own to match: whatever would have prompted reaches it, and nothing else does. Mine, unattended_gate.py in my hooks repository, reads the session's transcript, where turns carry a turnOrigin, and finds the latest one that is scheduled or human. When that turn is scheduled, the run is on its own, and the hook prints a deny:

{"hookSpecificOutput": {"hookEventName": "PermissionRequest", "decision": {"behavior": "deny", "message": "..."}}}

The message tells the run to use only the commands its prompt names and the Read, Grep, Write and Edit tools, and to name the denied call in its report. Like the house gate, it refuses with a reason the session can act on. When I type into a scheduled run, the latest turn is mine and the prompt shows as usual, and an ordinary session has no scheduled turn at all, so it always gets the prompt. On any error the hook prints nothing, which also leaves the prompt to show.

The Claude Code docs say that when a host answers permissions through a canUseTool callback, as the desktop app does, PermissionRequest hooks run alongside it and whichever decides first applies.

How it was checked

The hook's selftest has 24 cases, and each of five deliberate breaks in its code was caught. I also ran its reader over 1,185 real transcripts from ten days: every current scheduled run read as unattended and every other session did not, and the slowest read took 0.24 seconds, on a 146 MB file.

Then I tried it live, with a one-time scheduled task in the default permission mode. Its call was denied at once, and the run finished in 18 seconds. Two traps came up on the way, and both are worth knowing before you try it:

  • A scheduled task created from a session in bypass mode is saved in bypass mode. It never prompts, so it cannot test the hook. The app's task editor changes the mode.
  • Claude Code 2.1.309 reads a pipeline like Get-Item ... | Select-Object Name, Length as read-only and runs it with no prompt. Only a script block, or a cmdlet it cannot prove read-only, reaches the hook, so the test command needs one.

What to copy

If you schedule Claude Code runs that nobody watches, a run can stall on a prompt you never see, and rewording the prompt did not stop that here. The sample in the steps is a shorter version of my hook. Make its refusal say what the run should do instead, and let any error in it fall back to the prompt.

Back to top

The top model at full effort, kept for the work that needs it

Every session here runs the most capable model at its highest reasoning effort, on a folder listing as much as on a security read. A rule now names the work that something else checks and sends those pieces to a cheaper model at a lower effort. Where a whole task could run cheaper, the session says so and leaves the choice to me.

The problem

Every one of my sessions runs the most capable Claude model at its highest reasoning effort. That is the right setting for a design, a security read or a plan. It is also what a session spent on listing files and running a test suite, where a cheaper model would do. The other coding agent I run already asks me which effort each call should run at. Nothing on the Claude side ever said that a piece of work could run cheaper.

The solution

A rule in my rules file now splits the work in two. Where something other than the model's judgment checks the result, or the recipe is fixed before the work starts, the piece goes to a subagent on a cheaper model at a lower effort, and the session tells me in a line. Where the judgment has no check behind it, the top model at full effort stays. For its own settings, and for a task of its own, the session suggests the cheaper option in one line and leaves the choice to me. Whatever comes back from the cheaper model is checked at full effort before it counts as done.

The session proposes the next batch of a data pull under an Opus subagent, I agree in the same words, and the usage banner above the prompt box says I am on pace to hit the weekly limit early.
The moment, 27 October: the session proposes the next batch under an Opus subagent and I agree in the same words. Above the prompt box, the usage banner. Two phrases are blurred.

How to add it

  1. Write down which of your work something else checks, such as a test, a diff or a read-back, and which rests on the model's judgment alone.
  2. Tell the session in your rules file to send the first kind to a subagent on a cheaper model at a lower effort, and to say so in a line instead of asking.
  3. Have it suggest a cheaper model or a lower effort for its own session in one line when a whole task is of that kind, and leave the change to you.
  4. Check what the cheaper model returns before you trust it: run the test, read the diff, sample the summary against its source.
  5. Or take both from github.com/willbchou/cheaper-seat: the section to paste, and the seat-log skill, whose hook logs each cheaper delegation and whose report counts a week of them.

    Git Bash, macOS or Linux

    git clone https://github.com/willbchou/cheaper-seat
    echo >> ~/.claude/CLAUDE.md
    cat cheaper-seat/CLAUDE.md >> ~/.claude/CLAUDE.md
    mkdir -p ~/.claude/skills
    cp -r cheaper-seat/skills/seat-log ~/.claude/skills/
    cd ~/.claude/skills/seat-log && python seat_log.py selftest

    ~/.claude/settings.json, with your own user folder in place of you

    "hooks": {
      "PreToolUse": [
        {
          "matcher": "Agent|mcp__ccd_session_mgmt__set_session_model|mcp__ccd_session_mgmt__set_session_effort",
          "hooks": [{"type": "command", "command": "python C:/Users/you/.claude/skills/seat-log/seat_log.py hook", "timeout": 20}]
        }
      ],
      "Stop": [
        {"hooks": [{"type": "command", "command": "python C:/Users/you/.claude/skills/seat-log/seat_log.py hook", "timeout": 20}]}
      ]
    }
Detailed notes: The top model at full effort, kept for the work that needs it

What happened

My sessions run Claude Fable 5.1 at the highest reasoning effort the desktop app offers. A model at an effort is what I call a seat here, and this is the dearest one. For weeks it was spent on everything alike: a security read and a listing of a folder, a plan and a sweep through a transcript. The other coding agent I run beside it has had the opposite arrangement since early October: every call to it asks me which effort it runs at, so that I manage what each call spends. On the Claude side nobody asked, and nobody said when a cheaper seat would have done.

On 27 October I asked for a rule: a session working on the top model at maximum effort should suggest handing work to a lower effort or to Opus, the model one tier down, where that fits.

What changed

A section in my rules file, which every session reads when it starts. It sorts work by whether something other than the model's judgment checks the result. The pieces that pass go to a subagent on Opus at a lower effort, with a line to me and no question. My own session's seat stays mine to lower, on a suggestion the session makes once. Every result from the cheaper seat is checked at the top one before it counts. The section follows, in the form to paste into your own CLAUDE.md.

The section, to paste at the end of your own CLAUDE.md

The top model at maximum effort suggests the cheaper seat where the work allows it

A session on the most capable model at maximum reasoning effort (a seat being a model at an effort) spends that seat on everything alike unless told otherwise. So, in every session that finds itself on that seat:

  1. Two kinds of work. The cheaper seat fits where something other than the model's judgment checks the result, or the recipe is fixed before the work starts: a search or a read that ends in a summary, log and transcript triage, a test suite or a build run and reported, a bulk edit to a pattern already decided, transcription and scraping to a schema, a data pull whose checker is in code. The top seat stays where the judgment has no checker behind it: a design, a plan, a security read, anything in the review class (where a bug costs money or reaches users), debugging without a reproduction, copy for a reader, another agent's findings read against the code, and the decision of what to delegate.
  2. A bounded piece of the cheaper kind inside a task goes to a subagent on Opus (the model one tier down), said in a line and not asked: a fresh agent with a complete brief (a fork keeps this seat), at medium effort for a read, a triage or a report and at high for a change a test checks; the top effort is no cheaper seat. This rule is the explicit instruction the Agent tool asks for before an effort is set on delegated work. A typed judgment over many items goes to a small typed model first, where one is installed.
  3. The session's own seat, and a task of its own, are the user's to move. When a task, or a long stretch of one, is of the cheaper kind, the session says so in one line, in its first reply or in the question at the end of its turn: the piece, the seat proposed (Opus, or this session at a lower effort), and what will check the result. It works on at the top seat until the user answers, never lowers its own model or effort unasked, and names the model in the brief of a side session it starts for cheaper work. A suggestion declined is not made again for the same piece; one accepted applies to that piece only, and the seat comes back up for the next judgment.
  4. What comes back from the cheaper seat is checked at the top seat before it counts as done, as a side session's note is: the diff read, the test run here, a summary sampled against its source. A result that fails its check is redone at the top seat, and that kind of work is read again before it is sent cheaper.
  5. In an unattended run (a scheduled task) nobody answers: the session carries on at the seat it was given and puts the suggestion in its report.

Why it is a rule in the file

A session's model and effort are mine to set, and I can change them while it runs. A subagent's are set by the session for each call. Claude Code's agent tool takes an effort for a subagent only when the user or a rules file has asked for one, never on the session's own judgment, so the sorting of work and the efforts it allows have to be written where every session reads them. A skill would stay unloaded in the turn that matters, the one in which a session is about to spend the top seat on a listing.

What to copy

Decide which of your work has a check outside the model, such as a test, a diff or a read-back, and which rests on the model's judgment. Write both lists into your CLAUDE.md with the model and the effort you want for the first kind, and have the session say in a line when it uses them. Keep your own session's model and effort yours to change, and have the session put its suggestion in one line where you will read it. Then check what comes back from the cheaper model as you would a colleague's work.

Still open

How much it saves. No count yet says how often the suggestion is made, taken or declined, or what the checks at the top seat catch. The first task under the rule was writing the rule and this entry, and both stayed at the top seat: a rule is a judgment, and an entry is copy for a reader. This entry gets a line when a week of it has run.

28 October: the seat log

The rule had no count behind it. I asked whether a change of model or effort could be logged, and whether I could be told when one happened, so that I would know the rule was working. The transcripts already held the answer: every assistant entry carries the model and the effort it ran at, and every subagent call carries the model and effort it was given. A hook now reads them. At each subagent call it logs the session's seat against the subagent's. At each turn's end it logs a change in the session's own seat since the previous turn, and any sentence in the turn's text or its end-of-turn question that suggests a cheaper seat, found by its wording and logged once per session. It also logs a session moving another session's seat by tool, which the rule forbids unasked. The cheaper events show a notification. A report tallies a window: turns by seat with their tokens, delegations by direction, seat moves, suggestions, and the sessions that ran on more than one seat.

The hook was the first piece of work built under the rule. Its design stayed at the top seat. A subagent on the model one tier down did the build at high effort, said in a line, from a brief that fixed the file, the events, the paths and the tests. Read back at the top seat, it kept all of it and gained one thing: a cap on how much of a transcript the hook reads at a turn's end, since it runs at the end of every turn of every session and some transcripts run to hundreds of megabytes. Its first dry run, read from this session's own transcript, logged that delegation as cheaper. The day's transcripts showed 21 subagent calls, 17 with a model named and 3 with an effort set; in the two days before the rule, none had an effort set.

The section and the hook are on GitHub as github.com/willbchou/cheaper-seat: the section to paste at the end of your CLAUDE.md, and seat-log to copy under your skills folder, with the two hook lines for settings.json in its README.

5 November: nine days of the log

This is the count the entry promised. In nine days my sessions made 49 subagent calls. Of those, 25 named a model and 25 named an effort; in the two days before the rule, none named an effort. The hook was wired on the first of those days and logged 46 of the calls. It read 20 as going to a cheaper seat than the session's own, from 7 sessions: 19 to the model one tier down at medium effort and 1 at high. Of the rest, 25 kept the session's seat and 1 went to a dearer one.

The log also recorded the moves the rule leaves to me. A session's own seat changed 12 times between turns: twice to a cheaper seat, 7 times to a dearer one and 3 times between versions of one model. A session set another session's model or effort by tool 7 times, 6 of them to the top model or the top effort. The log cannot say whether I had asked for those.

The wording match is the weakest part. It logged 28 sentences from 7 sessions. Of those, 8 were end-of-turn questions or their buttons that named the cheaper model, which is the suggestion the rule asks for. Most of the other 20 were a session saying in a line that it had delegated, or reporting that it had, and 2 were this entry's own session describing the hook. I left the patterns as they are, because the log keeps each sentence and marks where it was found, and that tells the kinds apart.

The saving is still open. Responses at the cheaper seat the rule names came to about one in twenty of all responses in those nine days, and the log does not price them or record what the checks at the top seat caught. It also showed a gap in the rule: about two in three responses ran one tier down at the top effort, a seat the rule does not speak to.

Back to top

Keeping private files out of reviews by the other agent

One of my projects keeps files that must never leave my machine, and the other coding agent's review rounds read them anyway: the project's instructions for that agent told it to follow the usual reading order, and that order opens a status page full of private details. A repository now lists those paths once. A review request from it says they are out of bounds and runs in a throwaway copy of the branch that does not hold them, and afterwards a script reads every command the reviewer ran for any that mentioned one.

The problem

Before some branches land, a script sends them to a second coding agent for review in a read-only sandbox, which keeps the agent from writing but lets it read any file. In a project whose files carry private details, three rounds in a row opened its status page and its session note in their second command, because the instructions file the agent loads on start told it to follow the project's reading order. The session had moved the data folder out first and searched the agent's log afterwards for the data folders alone, so it called all three rounds clean. Later sessions walled the folder off by hand with scripts of their own, and one of those was cut off before its cleanup ran and left the documents in a holding folder. A week later private names and their figures reached the agent from the branch itself, through a commit message the request quoted, comments in the changed code and a notes file in the diff.

The solution

A repository now lists its private paths once, in its own git config, and every worktree reads the same list. Each review request from it opens on a paragraph that puts those paths, every commit message and every other checkout out of bounds, lists the commits by id alone, and describes the change only in the session's own words. A branch whose diff changes a listed file is refused, since a folder can be emptied but its history cannot. The script runs the agent in a throwaway worktree of the branch with the listed files taken out and removes it whatever the run's exit, so no file in a real checkout ever moves. When the reply is back, the script reads every command the agent ran from the agent's own log and names any that mentioned a listed path or another checkout.

How to add it

  1. List the paths in your repository that must never reach another model: data folders, status pages, notes, and configuration that names private details.
  2. Name them once in the repository's own git config, so every worktree reads the same list.

    In the repository: the setting, with your own paths in place of these

    git config --add review-round.out-of-bounds "data/ STATUS.md notes/ config/"
  3. Start every review request with a paragraph that says what is out of bounds, quote no commit message in it, and refuse a branch whose diff changes a listed file.
  4. Run the reviewer in a throwaway worktree of the commit, with the listed files deleted and marked skip-worktree so that git status there reads clean, and remove it whatever the run's exit.
  5. After each reply, read the reviewer's own log of the commands it ran and flag any that mentioned a listed path or another checkout, then take each piece of the change out in turn to watch its test fail.
Detailed notes: Keeping private files out of reviews by the other agent

What happened

Before some branches land in my repositories, the other coding agent, Codex, reviews them first. A script drafts the request, sends it to Codex's command line in a read-only sandbox and brings the reply back. The sandbox keeps Codex from writing anything, but it can still read any file, and a reviewer opens whatever it wants to check.

One of my projects keeps files that must never leave my machine: folders of captured data, a status page a script builds from them, a note each session starts from, and notes and configuration that name the private details the project works with. Its instructions file for Codex, which Codex loads when it starts in a folder, told it to read the project's main instructions in full and follow the reading order they give, and that order opens the session note and then the status page. On 26 and 27 October three review rounds in a row read both in their second command. The session had moved the data folder out of the worktree before each send, and afterwards it searched Codex's log for the data folders alone, so it called all three rounds clean. It found the reads at the third round, with a wider search.

After that, the session moved every private document out of the folder with a script and put them back after the reply, and later sessions did the same with scripts of their own. One test run of such a script was piped into a command that stops reading after a few lines, so the script was cut off before its cleanup, and the documents sat in the holding folder until they were put back by hand. On 2 November private details reached Codex from the branch itself: the request quoted a commit message that named two of them beside their figures, comments in the changed code named them too, and Codex's first command printed the diff of a notes file.

What changed

The skill that drafts and sends the review reads a list of private paths from the repository's own git config, set once and read by every worktree. Each value is a file, or a folder ending in a slash, and a repository that lists nothing works as before. Where something is listed:

  • The request opens, below its first line, on a paragraph that puts every listed path, every commit message and everything outside the folder it runs in out of bounds, the main checkout and every other worktree included, whatever the repository's instructions or a reading order say. It names no checkout's folder and lists the commits by their ids alone. The account of the change comes only from the session's own words, which the draft now requires.
  • A branch whose diff changes a listed file is refused before anything is sent. Taking files out of a folder does not take lines out of the history, so those lines are committed after the round.
  • A review, and a question sent outside one, run Codex in a throwaway worktree made for that run in the temp folder, detached at the commit. Every tracked file under a listed path is deleted there and marked skip-worktree in that worktree's own index, so git status there reads clean, and the worktree is removed whatever the run's exit. No file in a real checkout moves, so a run that is killed leaves behind at most one throwaway checkout, and every document stays where it was.
  • When the reply is back, the script reads Codex's own log of the run, takes the strings of every command in it, and names each one that mentioned a listed path or another checkout, with the count, in the round's record.

The project's instructions file for Codex now says that a review or a question from the script reads only what the request names. On that project the throwaway checkout takes about five seconds to make, holds the code and the instructions file and nothing else, and is gone a second and a half after the run. Thirteen new checks in the skill's own test cover the change, and each of its 23 pieces was taken out in turn to watch its check fail.

What to copy

The pattern fits any setup that sends code to a second model for review. Keep a list of what must stay home and put it at the top of every request. Run the reviewer in a copy that does not hold those files, refuse a change whose diff carries them, and read the reviewer's own record of what it ran. The throwaway copy is plain git: git worktree add --detach at the commit, the listed files marked with git update-index --skip-worktree and deleted, and git worktree remove --force when the run ends.

Still open

  • A comment, a test fixture or a string in the code under review still goes with the diff, so a branch that goes to review keeps private details out of its code and uses made-up figures in its fixtures.
  • A skill run under Codex in its writable sandbox is not walled off, since its folder is the session's own choice.
  • A request pasted by hand runs wherever its thread runs, with nothing taken out, and the skill says so when it puts one on the clipboard.

Back to top

Clearing copied data out of worktrees the app reuses and deletes

The census of 31 October found most of the space it counted in copies of one project's data inside worktrees. While a session built the step that clears them, the app's own log showed that the app hands an idle worktree to the next session with every ignored file still in it, and deletes the spare ones for good with whatever was kept inside. Each copied file is now matched by hash against the main checkout before anything goes, and the daily run was allowed to clear only after six review rounds by the other coding agent, the last with no findings. On 15 November I added a close-out check for the other files Git ignores.

The problem

To test a change, my sessions copy a project's private data into their worktrees, the separate checkouts they each work in, and the first census found about 128 GB in them, nearly all of it in seven such copies. The desktop app keeps these worktrees in a pool: when a session is archived it takes its worktree back if git calls it clean, and git does not count ignored folders such as the copies. It hands an idle worktree to the next new session in the project with every ignored file still in it, and deletes the idle ones beyond the two or three it keeps, for good. On 1 November it took back 29, handed on 3 and deleted 19, and files that one session had set aside in its own worktree to keep went with one of them. Another deletion stopped partway because a file inside was open, and left a folder of about 23 GB that git no longer listed.

The solution

The census skill gained a step that clears these copies. Each copied file is matched by hash against the main checkout: what the main checkout holds goes to the Recycle Bin one folder at a time, each folder proved again right before it goes, and what it lacks moves into the main checkout inside the handoff my sessions run before they write shared data. A session clears its own copy when it closes out, and a run every morning at 05:20 clears the worktrees whose sessions are all archived. The run was allowed to clear on its own only after six review rounds by the other coding agent, with each fix and guard given a test that fails when it is taken out, 77 in all, and the sixth round found nothing. The rounds kept finding narrower races, such as a worktree swapped for a link to another folder partway through a run, or the app handing a worktree to a new session during the 22 seconds the step spends reading the app's records.

How to add it

  1. Before you leave anything you want to keep in a worktree, find out what your tool does with the worktree once its session ends. The Claude desktop app on Windows logs each worktree it takes back, hands on or deletes.

    PowerShell, with the Claude desktop app on Windows: what its pool did with each worktree

    Select-String -Path "$env:LOCALAPPDATA\Claude\Logs\main*.log" -Pattern "\[WorktreePool\] (Released|Reused|Reaping)"
  2. Before anything deletes a copy, hash each of its files and match it against the original, and move every file the original lacks to a place the tool never deletes, checking each by hash after the move.
  3. Send the rest to the Recycle Bin a folder at a time, and check each folder again right before it goes: its files unchanged, the original's copy hashed afresh, room left in the bin, and no link or junction on the way.
  4. Have another agent review the clearing code before it runs unattended, and take each fix out in turn to watch its test fail.
Detailed notes: Clearing copied data out of worktrees the app reuses and deletes

What happened

The first census of what my sessions leave on disk, on 31 October, found about 128 GB in worktrees, nearly all of it in seven copies of one project's private data. The census entry tells how those copies come to be made. The weekly census first ran on 1 November, report only, and that day I asked whether it could free the space as well, and run every day if it did. I picked three changes: a session clears its own copy when it closes out, the census clears the copies in worktrees whose sessions are all archived, and the report runs every day.

One session had cleared its own copy that day, on my word, and its close-out became the recipe. Every file was hashed against the main checkout, about 10 GB went to the Recycle Bin, and the 2,787 files whose bytes were found nowhere else moved into a folder inside the same worktree, to keep.

What the app does with a worktree

While the step was being built and reviewed, the app's own log showed that the desktop app keeps the worktrees it makes in a pool. When a session is archived, the app takes its worktree back if git calls it clean, and git does not count ignored folders, so a worktree holding gigabytes of copied data still counts as clean. An idle worktree goes to the next new session in the same project with every ignored file still in it, which is how three of the seven copies had reached sessions that never made them. Beyond the two or three idle worktrees it keeps for each project, the app deletes the rest for good, with everything inside. On 1 November it took back 29 worktrees, handed on 3 and deleted 19.

One of the 19 belonged to the session whose close-out had become the recipe. It archived itself that evening, and an hour and a quarter later the app deleted its worktree, with the 2,787 kept files and the session's scratch folder inside.

Another deletion did not finish. The app moves a worktree aside before it deletes it in the background, and that night the move failed because a file inside was open: the clearing step's first plan was reading that very worktree. The app fell back to git's forced removal, which stopped partway. By then it had deleted the folder's link to git and 2,316 of the copied files for good, and it left about 23 GB in a folder that git no longer listed. The next day, on my word, the 2,638 files in it whose bytes the main checkout lacked went into the main checkout with its scratch folder, and the rest, about 22.5 GB, went to the Recycle Bin.

What changed

The census skill gained a clearing step, and the close-out a session runs before it is archived gained an item that calls it.

  • Every file of the copy is hashed and matched against the main checkout: the same bytes at the same path, the same bytes at another path there, other bytes at that path, or bytes found nowhere. The main checkout's hashes are cached to plan a run, and the cache only plans: nothing goes on its word.
  • Files whose bytes the main checkout lacks, and files that cannot be read, are keepers. In the recipe they stayed inside the worktree, which is what the app deletes. Now they move into the main checkout, to a folder that no stage of the project reads, and each is checked by hash after the move. The move happens inside the handoff my sessions run before they write shared data (the handoff entry has how it works), so it never lands while another session is writing there.
  • Everything else goes to the Recycle Bin one folder at a time, and a folder goes only once it has been proved again right before it: every file in it hashed again and unchanged, the main checkout's matching file hashed afresh and reached with no link on the way, the folder's listing as planned, room in the bin with a gigabyte to spare, the check for other writers still clear, the app's record of who holds the worktree as it was at the start, and, last, no link or junction at the worktree or above it. The call that sends it runs in a child process that is stopped after five minutes, so a warning that nobody is there to answer cannot hold an unattended run.
  • A session clears its own copy at close-out, and only in a worktree made for that session and used by no other live session. A run every morning at 05:20 clears the copies of 100 MB or more in worktrees whose sessions are all archived and none pinned or starred, and leaves a worktree that no session record names for me to decide.
  • Anything it cannot be sure of stops it: a folder git does not list, a record it cannot read, a hold on the worktree it cannot account for, a second clearing run, a check for other writers that is not plainly clear, or a bin that would delete for good.

I chose to clear worktrees sitting idle in the app's pool as well, since clearing one first spares the next session a stale copy, and accepted the race that comes with it.

Six review rounds

The other coding agent reviewed the clearing code before the daily run was allowed to clear anything: six rounds, each at its highest effort and each on my pick. The first round found seven serious problems and five smaller ones, among them the hash cache taken as proof and a worktree that was itself a junction (the Windows link from one folder to another). Each finding was fixed with a test, and each fix was then taken out on its own to watch its test fail. The later rounds kept finding narrower cases of the same races.

  • The second round found that the check for other writers could go stale during the minutes the hashing takes. It now runs again before the keepers move and right before each folder goes.
  • In the third, a keeper's move could follow a junction, into the main checkout's own data or back into a worktree the app was about to delete. Every step at both ends of each move is now read again right before it.
  • The fourth found that the worktree itself could be swapped for a junction between two keepers' moves, since its links were checked only once, before the first. The worktree and the folders above it are now read again before every move and before every folder goes to the bin.
  • It also found that the app could hand the worktree to a new session during the 22 seconds the step spends reading the app's session records, and the step noted who held the worktree only after that read, so a handover during it would have passed as the starting state. Who holds it is now read on both sides of the read, and each holder is checked against the records.
  • In the fifth, a file in the main checkout offered as proof could be a junction back into the very folder it was proving, so its fresh hash would be that folder's own bytes. The proof now refuses a file reached through a link.

The sixth round found nothing that would make it hold the unattended run. By then the step had 82 checks, and 77 pieces of it, every fix and every guard, had each been taken out one at a time with its check failing. On 2 November the scheduled run moved to every morning at 05:20, with clearing on.

6 November: a branch now gets three review rounds at most, and a fourth is my decision. Each finding is sorted by whether it can happen before it is fixed (A review finding counts where it can happen has the rule).

What to copy

If your coding tool makes worktrees for you, find out what it does with one after its session ends, before you leave anything in it. The Claude desktop app on Windows logs each worktree it takes back, hands on or deletes, and the command in the first step lists them. Count a worktree as gone at archive, and first move anything you want to keep to a place the tool never deletes.

To clear a copy of data, prove each file before it goes. Hash every file against the original, keep whatever the original lacks, and send the rest to the Recycle Bin a folder at a time, checking each folder again right before it goes, since a run that takes minutes leaves time for things to change under it. On Windows, check for links and junctions last, because a folder swapped for a junction passes every check made of its own files. When a review keeps finding narrower cases of one race, take each fix out in turn and watch its test fail before you let the run go unattended.

Still open

  • If the app hands an archived worktree to a new session while the daily run is clearing it, that session finds the folders cleared before then gone. Only an agreement with the app's pool about which worktrees it may hand on would close that.
  • Each check is made right before its step, and a short window between the two remains. The gigabyte kept free in the bin is not reserved: if another program deletes more than that in between, Windows can drop the bin's oldest items, which need not be these copies.
  • The Recycle Bin gives the space back only when I empty it.

15 November: files outside the copied stores

A finished checkout still held a whole Python environment. I added a file check before archive to catch environments and scratch results as well.

Back to top

Checking which work an agent can reuse

A faster financial reader led to a review of repeated downloads and data lookups. I now have a skill that asks for a measured saving and the checks that make reuse safe. The first fixes are merged, and a replay of saved pages passed the capture write guard.

The problem

A previous change made my financial reader much faster by reusing work it had already checked. I wanted to know whether the same idea would help elsewhere. Some parts of the workflow already skipped unchanged inputs. Others removed duplicates only after paying to fetch them, so a tidy output hid the repeated work.

The solution

The efficiency-review skill follows one input through the workflow and counts its expensive operations. Each finding names what can be reused, when it becomes stale and how to check the result. A small offline test can prove that a request repeats, but a production speed claim still needs a measured run. The review also records where the existing workflow is already efficient. The first fixes now reuse successful downloads and skip completed work while keeping explicit refreshes and retries available.

How to add it

  1. Pick one workflow and find where it downloads, parses or sends material to a model.
  2. Use saved inputs or a simulated service to count repeated operations before adding a cache.
  3. State what makes a saved result reusable and which changes or failures require a fresh attempt.
  4. Compare the output before and after the fix, including completeness and source references, and measure the saving on the same inputs.
Detailed notes: Checking which work an agent can reuse

31 October: where the repeated work was

A previous change made my financial reader much faster by reusing work it had already checked. I asked for the same kind of review of document capture and an outside data service. Some parts already had useful caches. Others removed duplicates only after downloading them, when the network cost had already been paid.

The review used saved calls and small tests with a simulated browser. One test showed page images being downloaded again as the viewer scrolled over pages it had already seen. Another showed that running the same document harvest twice added the same job twice. These tests reproduced the repetition; they did not measure a faster production run.

The review skill

I now have an efficiency-review skill for Claude and Codex. It follows an input through the workflow and asks where the expensive work happens. It counts requests and separates the data provider's allowance from the model's tokens. A cache that saves one may leave the other unchanged.

Before recommending reuse, the reviewer has to say what makes two inputs the same and what would make a saved result stale. A changed document or parser may need a fresh read. A failed download must still be retried. Two identical slide images can be different numbered pages, so removing one can leave an incomplete document.

Use it in your own setup

  1. Ask for an efficiency review of one workflow and give the agent its entrypoint and recent logs.
  2. Have it reproduce repeated work with saved inputs or a simulated service. Keep private material and live writes out of the test.
  3. Require each finding to name the repeated operation, its cost and the conditions under which its result can be reused.
  4. For a fix, compare the old and new output on unchanged inputs, then change an input and make a request fail. The new path must still refresh or retry when needed.

What remained open on 31 October

The skill is installed. The capture changes are recommendations from the review and still need implementation and checks on the affected paths. One part of the workflow had little repetition to remove; the report says that too.

1 November: checking the fixes

The first fixes are now merged. The viewer reuses successful image downloads within one capture attempt. Identical document jobs in one batch are run once, and completed captures can be skipped with an explicit refresh for changed material. Failed or interrupted attempts stay eligible for retry.

Review found cases the first tests missed: two offers writing to one destination, an interrupted refresh, and a damaged page that still contained a valid-looking heading. Each fix gained a regression test, checked again with that fix removed. I also had the saved pages replayed through the capture write guard on an independent copy. The original files and retained evidence were checked by hash before and after that copy was removed. These checks passed; a live performance comparison is still open.

Back to top

Reading a script no longer counts as running it

A session that only hashed a script held another session's landing for 79 minutes, because the check before a shared write matched the script's name anywhere in a shell's command line. The check now reads that line command by command and sets a name aside only where a reader reads it. The other coding agent reviewed it for security three times. Most holes in the second review were in exceptions I had added for false alarms, so the version now live keeps only exceptions on plain words and counts a writer when it is unsure.

The problem

Before a session here writes shared data, or lands a branch in the project that holds it, a check looks for other writers: it reads the command line of every process on the machine for the names of the scripts that write. On Windows, Claude Code's Bash tool runs each command as bash -c with the whole command in that line, so a command that only reads a script shows its name just as one that runs it does. On 29 October a session landing its own branch printed a short hash of one of those scripts along the way, the check took its shell for a writer, and another session's landing waited 79 minutes. On 23 October a background test loop that ended with the same hash had been read the same way.

The solution

The check now reads a shell's line the way the shell does, command by command, and sets a script's name aside only where a hash, a file listing or a text reader such as grep takes it and the output reaches nothing that runs code. Anything else, and any line it cannot follow, is matched as before. The other coding agent then reviewed it for security three times on 31 October, and the second review found most of its holes in exceptions I had added to clear more false alarms. The version now live keeps only exceptions on plain words, with nothing expanded, and counts a writer whenever it is unsure. Of the 23,509 past commands the old check counted as writers, 14,784 now read as no writer.

How to add it

  1. Before you match names in process command lines, look at what your coding agent's shell puts there, since Claude Code's Bash tool on Windows carries the whole command.
  2. Parse the line the way the shell does, set a name aside only where a hash, a listing or a text reader takes it and the output goes nowhere that runs code, and match everything else whole.
  3. When a review keeps finding holes in exceptions you added for false alarms, take them out instead of patching them, and let the check count a writer when it is unsure.
  4. Rebuild your past commands as process lines and measure each version of the check against them, so you know what it clears and what it still counts.
  5. Have another agent review the check for security, reproduce each finding before you fix it, and take each piece out in turn to watch its test fail.
Detailed notes: Reading a script no longer counts as running it

What happened

Two coding agents and a dozen sessions work in the same repositories here, and a write to shared data starts only after a handoff: a check for other writers, a marker that names what the session is about to run, and a notice to the other sessions. The entry of 23 October has more on the markers. The check for other writers reads the command line of every process on the machine and looks for the names of the scripts that write, and a landing in the project that holds the data waits for the same check before it moves the main branch. For that project's store, a script's name counted anywhere in a shell's line.

That was too wide for the way Claude Code runs a shell command. On my Windows machine its Bash tool starts bash.exe with -c and a wrapper around the command, so the command shows in full in the process's line, and every subshell it forks carries the same line. A command that only reads a script carries the script's name exactly as one that runs it does. On 29 October a session landing a branch from its own worktree printed a short hash of a pipeline script along the way: md5sum in a command substitution inside an echo, in a subshell that wrote to a log. The check read that shell as a writer, and another session's landing waited 79 minutes for it. On 23 October a background test loop that ended with the same hash had been read the same way, each fork of its shell showing up in turn. Commands run through the PowerShell tool do not show this way, since its script travels in an environment variable and never appears in a process line.

What changed

The check now reads a bash or sh -c line the way the shell would. It splits the Windows command line into words as the C runtime does, takes the string after -c, and parses it: lists and pipelines, subshells and braces, if, while, until and for, quotes, command substitutions, redirections and here-documents. A string given to eval, or to another bash -c inside it, is read in its command's place. The parser keeps every word that may run a script, and the list of writers is matched against those words.

A script's name is set aside in two places only. One is where a hash or a file listing such as md5sum, wc, ls or stat takes it as an operand. The other is where a text reader takes it: cat, grep, cut, diff or echo, git commands such as status, diff, log and show, or sed when its commands only print or substitute. Even then the reader's output must reach nothing that runs code. It may pipe only into other readers, and a text reader, whose output can be the script's own code, may write to no file. A name is never set aside in a for loop's list or an assignment's value, for a reader with a variable set in front of it, or when it is handed to python, bash, source, eval, exec, xargs or a loop.

Anything else is matched whole, as before: python lines, whatever they name in their code or their arguments, apart from a few such as those of my own review and handoff tools, which name a script only in their text; a driver run with bash; cmd and PowerShell lines; and any string the parser does not follow, such as a case statement, a function, an array or an unclosed quote. Setting a name aside cannot hide a writer that runs the normal way. A pipeline writer runs as its own python process whose line names its script, or as bash running a driver, and both lines are still matched whole. A shell can start one only by naming the script where it runs, as a command, as an interpreter's operand, inside code an interpreter is given, or through a reader's output piped into one, and none of those is a place where a reader takes the name.

Three security reviews

A hole in this check would let two writers run at once, so I had Codex, the other coding agent I run, review it for security at its highest reasoning effort. It reviewed it three times on 31 October, and each review found holes to close.

The first found eleven, and a session reproduced each one in Git Bash before fixing it. Most were ways to hide a writer from the new parser: a reader's output copied onto a file through a file descriptor; readers that run a program through one of their own options, such as ripgrep's --pre or git grep's -O; printf -v, which writes into a variable; a sed program built by a substitution; an alias; $'...' strings left undecoded; a here-document line that runs on to the next. Some were older than the parser. Any line that held the handoff script's own name was skipped, which hid a shell that chained the check to the write it guarded, and 150 commands in my history had done that. A line that ran writers of two stores held only one of them.

With those fixes came the exceptions I had approved to clear more false alarms: the lines of my own tools that name a script only in their text, read-only subcommands of the pipeline's drivers, awk, sort and uniq as readers, a loop list or an assignment that waited until something used it, values tracked through the line, and any substitution that printed only digits, treated as data. The second review found thirteen more holes, most of them in those exceptions: a value tracked across a subshell, a += or a read; git's options read without knowing its subcommand; commands assumed to print only digits that can print a name; an export the waiting rule missed; an awk program kept in a variable.

So the third version took those exceptions out instead of patching them, which is what reviews of another of my skills had taught on 23 October. It no longer tracks what a variable holds or waits to see how one is used: any variable, or any substitution that prints more than digits, in the words of sed, awk, git, ripgrep, sort or uniq counts the line. What stayed were a few exceptions on plain words, such as those tools' lines and the drivers' read-only subcommands.

The third review found three real faults. One of the third version's own fixes, which read each command on its own, broke the rule that counts any script run with a writing flag when the script reached python through a pipe. A writer of a known store could still hide one whose store the check did not know. And an ordinary git process line crashed the check. The rest were lines written on purpose to fool the check, such as brace expansion, or a digit that a substitution prints landing inside a sed program. A session following my rules would not write them, but each still got a cheap catch on the safe side. The fourth version, the one now live, reads a pipeline at a time and lets those readers take only plain words, with no expansion of any kind.

What it measured

A session rebuilt every Bash command in my transcripts as the line Windows shows for it, with a wrapper the tests check byte for byte against a real one. Of the 23,509 distinct commands the old rule counted as writers, leaving out the handoff's own, 14,784 now read as no writer. Each round's fixes made the check count more: against the third version, the fourth counts 735 more commands as writers and clears none that the third counted. The cost is a short wait again behind some reads, such as a loop over script names, sed or git with a substitution in their words, or a commit message that names a script and is built with a here-document. Two searches of what the early versions cleared, for a script named where something could run it, found no writer: the hits were grep patterns, commit messages, file listings, read-only subcommands and test probes. When the first version went live, the one writer then running was found by both the old check and the new one. The skill's own tests went from 70 checks to 236, and the pieces of each version were taken out one at a time to watch a test fail, though in the last version a few overlapping catches share a test.

What to copy

If a gate of yours finds writers by matching names in process command lines, look first at what your coding agent's shell puts in that line. On Windows, Claude Code's Bash tool carries the whole command there, so a name matched anywhere catches every read of the script as well. Read the line the way the shell does, set a name aside only where it cannot run, and match whole anything you cannot follow. When a review keeps finding holes in exceptions you added for false alarms, take the exceptions out and live with the false alarms: a false hold costs a session a wait, and a missed writer can let two writes run at once. Then measure each version against your own past commands, so you know what it clears and what it still counts.

Still open

Some paths stay outside the check, and its own notes name them. A hash or a listing whose output goes to a file that a later command of the same shell runs can name a script the check does not see until that script's process starts. Git's own settings can run a program on a file, though none in that repository runs one on a script. A pipeline script that another python program imports and runs inside its own process, under no name of its file, is seen by no version of the check. The markers and notices still cover those. A python line that names a script anywhere still counts, apart from those few, because python can run a file it is given in more ways than its line shows. And a fourth review is mine to call: after three rounds that each made the check count more, what the last found beyond its three real faults were lines written to fool the check.

Back to top

What my sessions and tests leave on disk, and who it belongs to

A session tidying its own temp folders found a gigabyte that another script had left there, by chance. Every week a read-only census now goes through each place my sessions and tests leave things and names an owner for each item. Its first run found 128 GB, most of it in seven copies of one project's data, and by the end of the day most of what was making the leftovers had been fixed at the source. Since 2 November it runs every morning and clears such copies too, each file matched by hash against the main checkout first; that change has an entry of its own.

The problem

Early on 31 October a session clearing up its own temp folders found 231 more that another script had left there since September, about a gigabyte. It found them by chance, because nothing on the machine looked for leftovers. My sessions each work in a separate checkout of a repository and my tests write to the temp folder, and nobody knew how much had piled up there or whose it was. Without an owner for each item nothing could safely go, and whatever made the leftovers kept on making them.

The solution

A read-only script now goes through every place my sessions and tests leave things, from the worktrees, with their copied data and the sessions that used them, to the temp folder grouped by name, and names an owner for each item. It removes nothing: each item goes to its owner, or to me where the owner cannot answer, and a scheduled task runs it every Sunday, report only. Its first run found about 128 GB in 24 worktrees, nearly all of it in seven copies of one project's data. The same day a tracked copy tool replaced the script that made those copies, and most of the tests and renders that leaked into the temp folder were fixed at the source. The first guesses about two of the largest temp groups were wrong, and matching times and watching processes corrected both.

Four bars, one per place the first census read: the worktrees at 128 GB, nearly all of it in seven copies of one project's data; the temp folder at 12 GB; the project's scratch folder at 7 GB; the session scratchpads at 6 GB. Under each bar, where its items go.
What the first census found on 31 October, by place, and where each place's items go. A drawn figure with rounded numbers, not a screenshot.

How to add it

  1. List every place your sessions and tests leave things, such as worktrees, scratch folders, the temp folder and any workspace a tool keeps.
  2. Write a read-only script that sizes each place and names its owner: the session a worktree was made for and whether it is archived, or the code that names a temp folder's prefix.
  3. Have the script remove nothing, send each item to its owner, and run it on a schedule that reports what changed since the last run.
  4. Before you trust a guess about what made a leftover, run the suspect with TEMP, TMP and TMPDIR pointed at an empty folder, or match the leftovers' times against what was running.

    Python 3.10 or later, saved as boxed_run.py: the wrapper I use

    """Run one command with TEMP, TMP and TMPDIR in a fresh folder,
    list what it left there, then remove the folder.
    Usage: python boxed_run.py <command> [args...]"""
    import os
    import subprocess
    import sys
    import tempfile
    from pathlib import Path
    
    box = tempfile.TemporaryDirectory(
        prefix="box-", ignore_cleanup_errors=True)
    env = dict(os.environ,
               TEMP=box.name, TMP=box.name, TMPDIR=box.name)
    windows = os.name == "nt"  # a .cmd such as npm needs the shell
    proc = subprocess.run(sys.argv[1:], env=env, shell=windows)
    rc = proc.returncode
    files = Path(box.name).rglob("*")
    left = sorted(str(p.relative_to(box.name)) for p in files)
    print(f"exit {rc}; left in its temp folder: {len(left)}")
    for name in left[:20]:
        print("  " + name)
    box.cleanup()
    sys.exit(rc)
  5. Fix each producer so it cleans up after itself, with a test that checks its folder is gone, and on Windows pass --disable-extensions to any headless Chrome you start yourself.

    Python: a test's temp folder, removed and then checked

    import tempfile
    from pathlib import Path
    
    box = tempfile.TemporaryDirectory(ignore_cleanup_errors=True)
    try:
        pass  # the test's work, under box.name
    finally:
        # cleanup() clears read-only bits, such as git's objects on
        # Windows, which rmtree(ignore_errors=True) skips in silence
        box.cleanup()
    assert not Path(box.name).exists(), "temp folder left behind"
Detailed notes: What my sessions and tests leave on disk, and who it belongs to

What happened

Early on 31 October a session clearing up its own temp folders found 231 others beside them, about a gigabyte in all, left there since early September by a script in the same project. The script built a full copy of the project's records at every check and every report it ran, and never removed it. A side session fixed the script that morning and moved the 231 folders to the Recycle Bin on my word. They had been found by chance, since nothing on the machine looked for leftovers, so I asked whether any others would turn up on their own or whether something should look for them.

What the census reads

By the same morning the answer was a skill of its own: one read-only script that goes through every place my sessions and tests leave things and gives, for each, its size, its file count, its newest file and an owner.

  • The project's worktrees, the separate checkouts my sessions work in, the other coding agent's among them. For each it reads the branch, whether the main line holds it, any uncommitted change and any copy of the project's data inside it, and, from the app's own records, the sessions that worked there: the one it was made for, those that only ran there, which of them are archived, and whether I pinned or starred one to keep.
  • The project's own scratch folder, by subfolder, with the session whose transcript first names each one.
  • The workspaces where my skills are edited, with the ones their own clean-up would take.
  • Every session's scratchpad.
  • The temp folder, grouped by name, with the place in code that names each group's prefix, where there is one. A match is where to look and no more, since code that only reads a name holds it too.

It removes nothing and writes nothing but its own report. Even git status can write, since it refreshes the index, so every git command the census runs carries --no-optional-locks. It counts a link or a junction and never follows one, and its selftest checks that a throwaway tree is byte for byte as it was after a run. Each item goes to its owner: a worktree whose session is still open goes to that session, and anything whose sessions are all archived, or that has no owner on record, comes to me. A worktree with a session I pinned or starred is never touched. A scheduled task runs the census every Sunday morning, report only, compares the run with the one before, and tells me only when something new could go or a place has grown by a gigabyte or more.

What the first run found

It counted about 128 GB in 24 worktrees, 12 GB in the temp folder, 7 GB in the project's scratch folder and 6 GB in the session scratchpads. Nearly all of the worktrees' share sat in seven of them, each holding its own copy of the project's private data.

The project's scripts read their data from the checkout they run in, and my rules let a worktree copy the inputs it reads but forbid linking back to the main checkout's data, so a session that tests a change in a worktree copies the data in first. An untracked script did the copying. It had started in a session's scratchpad and been carried from worktree to worktree since, and it mirrored everything but the scratch and backup folders. About 60% of each full copy was videos that no reader in the project opens. Three of the seven copies had been made by an earlier session in the same folder: the app hands an archived session's folder to the next session, ignored files and all, and by the files' dates nobody had refreshed those three since.

About 8 GB of the temp folder was Chrome's half-finished installs of Adobe Acrobat's extension, the install packages and the folders they are unpacked in. Acrobat's installer registers its extension for every Chrome profile, so each new profile fetches it. No code named those folders. The session that wrote the first report saw that some packages were locked and had been made while my own Chrome was the only one running, guessed that my browser was looping on a failed install, and told me to restart it. A second session matched the folders' times against every shell command in both coding agents' logs instead. Each staging folder's name carries the process id of the browser that made it, and in nearly every burst of folders made within seconds of each other, no two shared an id. One browser left running, like mine, would have put the same id on all of them. Headless renders had made every one, each a fresh profile that began the install and closed before it finished. The locked files the report had counted as packages were the empty file that every running Chromium process keeps in the temp folder while it lives.

About 2 GB was the unpack folders of yt-dlp, a video downloader. Its one-file Windows build, like any one-file PyInstaller program, unpacks itself into a _MEI folder in the temp folder at each start and removes the folder when it exits normally. The first report put these down to the feed fetchers in my content project, which run yt-dlp every day. A watch over every yt-dlp process and the chain of processes that started it saw the fetchers' runs clean up after themselves, and led instead to a test in the project whose worktrees the census reads. The test checks that a download growing past its size limit gets stopped, and it stopped yt-dlp with a forced kill, which left a folder behind at every run. It runs in every check before a branch of that project lands, and 63 of the 95 folders had been made while one of those checks was running.

What changed the same day

  • A session of its own built a tracked copy tool. It fills a worktree with what the project's readers open and nothing else, about 10 GB in place of about 24, with the videos left out and each rule written in the code with its reason. The reader those worktrees exist to test wrote the same output from a narrowed copy as from a full one, byte for byte, once its own read times were set aside. The tool writes a marker into each copy that names the session that made it, when, from which commit, what it left out and whether it finished. The census reads the marker, so a copy made by another session, or before the current one began, shows as inherited with its maker named. A stale record in the worktree is moved aside and never deleted, since it may be the only copy.
  • Every headless Chrome start on my content project's main line and in two rendering skills now passes --disable-extensions. With the flag none of 15 test renders left a package, against all 15 without it, and a real card came out byte for byte the same. Playwright and Remotion pass the flag on their own, so the leaks came from scripts that start Chrome themselves, and a test on the content project's main line reads every such start and names any that arrives without the flag.
  • yt-dlp now gets its fetch's work folder as its temp folder, and the code removes that folder when the fetch ends, so a forced kill leaves nothing behind; the stop test checks that nothing is left.
  • Many of the smaller groups were folders that tests had left. Eight test suites in three of my repositories now remove their folder at the end and check that it has gone, seven of them through Python's TemporaryDirectory, and the public copy of the seat log from the cheaper-seat entry has the same fix. On Windows, shutil.rmtree with ignore_errors=True cannot delete git's read-only object files and says nothing, so two selftests that built a throwaway git repository had left a folder at every run; TemporaryDirectory's clean-up clears the read-only bit first. Another test killed a child process that held a lock file and deleted the folder without waiting for the child to exit, and on Windows a killed process's open file blocks the delete until the process has gone.
  • Two groups had nothing left to fix. Their code already removed them on a normal run, and they came from runs that were stopped, or from runs of my fix-checking skill, which takes a clean-up out of the code on purpose to show that a test fails without it. So that skill, the landing skill's checks and the skill editor's selftests now give every command they run a temp folder of its own, removed when the command ends, and whatever a reverted clean-up or a stopped run leaves goes with it. All three of TEMP, TMP and TMPDIR have to be set, because Python reads TMPDIR first and the Bash shell my sessions use points it at the real temp folder.

What to copy

Write one read-only script that sizes every place your sessions and tests leave things and names an owner for each, run it on a schedule, and read what changed since the last run. Have it remove nothing and send each item to whoever owns it, since a folder that looks abandoned may hold another session's only copy of something. Count files as well as folders. Something on my machine, most likely Windows' own temp clean-up, deletes each file in the temp folder about a week after it was written and leaves the folder, so 206 of those first 231 folders were already empty when they were found.

When a temp folder leaks, find what makes it before you fix anything. Run the suspect with TEMP, TMP and TMPDIR pointed at an empty folder of its own and list what it leaves. Keep that folder's path short: two of my selftests went past Windows' 260-character path limit when it sat deep in a session's scratchpad. For a folder no code names, match its times against what was running, or watch the processes, and read a lock as naming whoever holds a file now, which may not be whoever made it. On Windows, pass --disable-extensions to any headless Chrome you start yourself, and clean up test folders with TemporaryDirectory rather than rmtree(ignore_errors=True).

Still open

  • The seven copies made before the tool are still in their worktrees. Each waits on its session's word, or on mine, and the files only that copy holds are matched by hash against the main checkout before it goes.
  • Two templates on unmerged branches of my content project still start Chrome without the flag. Whoever lands one adds it, and the test on the main line names any start that arrives without it.
  • The census named four producers that are not fixed yet: three scripts in the project whose worktrees it reads, and one that sessions copy between their scratchpads. Two of their groups have passed a thousand folders each.
  • The weekly census has not run yet. Its first run is due on Sunday 1 November, and this entry gets a dated line when a report shows something new.

Since then

The weekly census first ran on Sunday 1 November. On 2 November it moved to every morning and gained a step that clears the copies of data in worktrees: each file is matched by hash against the main checkout, the files the main checkout lacks move into it, and the rest goes to the Recycle Bin. Building that step showed that the app hands an idle worktree to the next session with every ignored file still in it, and deletes the spare ones for good with everything inside. The step, and the six review rounds it went through before it was allowed to run unattended, are in an entry of their own.

Back to top

The review gate learns which files are content and stops asking for a waiver

This site's update and resource pages are TypeScript files beside the Worker's code, so every entry I landed read as a change to the Worker, and twelve landings in two days each carried a written waiver of the other agent's review round. A repository now names its content files once in its own git config, and the two skills that read a branch's kind read them as documents.

The problem

Before a branch lands here, a script decides whether the other coding agent must review it first. Anything under the folder the Worker is built from counts as code, and so does a line that mentions sign-in, billing or an API key. This site keeps its update and resource pages as TypeScript files in that folder, with the text of each entry in an HTML fragment beside them. So every entry I wrote read as Worker code, and some read as member data because a file name or a line mentioned sessions. Twelve landings in two days each needed a waiver written by hand, and my own rule says a prompt that keeps coming is a defect to fix in code.

The solution

A repository now names its content files once, in its own git config, and every worktree reads the same value. The two scripts that decide a branch's kind read those files as documents, as they already read tests and docs, with no trigger from their paths or from the words in them. A branch that changes only those files lands on its tests, and the record says which files were read as content and that a deploy is still due. The Worker's own code beside them is still code, and a value that names the Worker's entry or its config, or a folder holding one, stops every command, so the exemption cannot swallow the Worker. The first branch under the setting was the previous entry's, which had stopped at the review gate earlier the same day.

How to add it

  1. List the files in your repository that are writing rather than code but live where the code lives, such as a registry of entries or a folder of fragments.
  2. Give your review gate one setting in the repository's own config that names them, a file or a folder with a trailing slash, so every worktree reads the same list.

    In the repository: the setting as this site has it

    git config --add review-round.content-paths "src/updates.ts src/resources.ts content/"
  3. Have the gate read those files as documents, outside the code paths and the word triggers, and print which files it read that way in each landing's record.
  4. Refuse a value that names your deploy entry or its config, or a folder that holds one, and keep the reminder that content still deploys with the code.
  5. Take each piece of the change out in turn and check that its own test fails before you trust the gate.
Detailed notes: The review gate learns which files are content and stops asking for a waiver

What happened

Before a branch lands in any of my repositories, a script reads what it changed and decides whether the other coding agent reviews it first. The review class is the work where a bug costs money or reaches a reader: a database migration, the code of a Cloudflare Worker, a paid call to a model or a search service, a scheduled write to live data, and anything that touches sign-in, billing or member data. The script reads the paths of the changed files and the changed lines for those triggers. A Worker's code is anything under the folder its wrangler config points to, and everything outside the class lands on its tests.

This site is a Worker, and its update and resource pages are TypeScript registries inside the Worker's folder, src/updates.ts and src/resources.ts, which import the entries' HTML fragments from a content folder beside it. So every branch that added an entry read as Worker code. The words in the entries did the rest: a fragment with sessions in its name, or a line that named a cookie beside a session, read as member data, and a how-to that mentioned an API key read as a paid call. On 25 and 26 October twelve landings here carried a waiver of the round, written into the landing's record by hand, and six of them had changed nothing but an entry and its registry line. The same week I had made a rule that a prompt which keeps coming in a session is a defect to fix in code, never answered by hand as routine, and a waiver written twelve times is that prompt.

What changed

A repository now names its content files once, in its own git config, beside the two settings the gate already reads there (the name of its main branch, and whether it has members at all): git config --add review-round.content-paths "src/updates.ts src/resources.ts content/". Each value is one or more paths from the repository's root, a file or a folder ending in a slash, and every worktree of the repository reads the same value, since they share its git config. The two skills that read a branch's kind, the one that lands a branch and the one that drafts the other agent's round, read those files as documents, as they already read tests, docs and lock files: out of the Worker's paths, and out of the changed lines the word triggers read. A branch that changes only them lands on its tests, and the gate's line says what it read as content, in this form: lands on its tests (no trigger in 2 files): 2 read as content, not code (review-round.content-paths): content/updates/2026-10-27-cheaper-seat.html, src/updates.ts. The landing's record carries an empty kind, and its next line still says that a deploy from main is due, as it does for Worker code, because the site serves the registries and no entry reaches a reader until the Worker is deployed again.

The setting has two limits. The Worker's entry file or its wrangler config beside the registries is still Worker code, so a branch that changes the page's own template along with an entry still reads as code and gets its round. And a value that names the wrangler config or the Worker's entry file, or a folder holding one, such as the whole source folder, stops every command of both skills and names the setting and the file. The setting is an exemption from a gate, and a careless value would take the Worker out of the review class with it.

Each piece of the change has a check that fails when the piece is reverted: the registries read as documents, the Worker's entry refused in the setting, the line naming the files, the split of several paths in one value, the folder's trailing slash, the gate's detail and the deploy line. Seven pieces were reverted one at a time, and each one's check failed; two mutations of the landing skill, its detail dropped and its deploy line turned off, failed their checks the same way. Then the branch of the previous entry, which had stopped at the review gate earlier the same day, read every gate open under the new copy. I asked the other agent for a round on it anyway. It found one wording to fix, and the branch landed on its tests.

Why the setting lives in the repository

The triggers are shared by every repository on this machine, and a path that is copy in one is code in another: a file under the source folder is a route in most of them and a list of entries in this one. Only the repository knows which of its files are writing, so the exemption is a setting of the repository rather than a pattern in the shared skill, which would have to guess for all of them. It is read from the git config so that no file in the repository has to carry it and every worktree sees the same list. And the record names the files it exempted each time, so that anyone reading a landing can see that the exemption was applied, and to what.

What to copy

If your review gate reads a repository by its paths and its words, give it one setting per repository that names the files that are content, kept in the repository's own config so that every checkout reads the same value. Have the gate read those files as documents, out of the code paths and out of the word triggers, and have it print the files it read that way in each landing's record. Refuse a value that names your deploy entry or its config, or a folder that holds one. Keep the reminder that content still ships with the code. Then take each piece of the change out in turn and watch its own test fail before you trust it.

Still open

The episodes registry, src/episodes.ts, has the same shape as the two named and is not in the setting, since the brief for the change named the two registries; one more git config command puts it in. The waiver stays for anything the setting does not name. The record's line names the files read as content each time, so a branch that slipped past as content could be found in the log.

Back to top

Every change to how I run sessions gets a dated entry here

I change how my Claude sessions work every few days, and the record of each change sat in private files written for me. A rule in my rules file now asks for a dated entry on this page once a change has landed, and the list a session walks before it closes asks whether the entry exists. Several sessions write here, so each one reads the entries before it adds one.

The problem

I change how my Claude sessions work every few days, with a new rule, a hook or a skill. Each change was written down where it was made, in files meant for me and my sessions, with private names in them. Nothing told the changes in order, and nothing was fit for another person to read. When I started this page, whether a change got its entry still depended on a session remembering to write one.

The solution

A section in my rules file now says that a change to how sessions are run, kept or checked gets a dated entry on this page once it has landed. The entry is written in the first person for a reader who does not share my setup, with no private names or figures. The list a session walks before it is archived asks whether the change it landed has its entry. Before writing one, a session reads the entries and the open branches, because several sessions write here and one change gets one entry.

How to add it

  1. Choose one place for the log: a page on your site, or a dated file beside your rules file.
  2. Add a section to your rules file that asks for an entry once a change has landed, with the place of your own log where it says my log.

    The end of ~/.claude/CLAUDE.md (on Windows, %USERPROFILE%\.claude\CLAUDE.md)

    ## A log of how I run sessions
    
    A change to how sessions are run, kept or checked (a section in this file, a hook, a skill of that kind) gets a dated entry in my log once it has landed. Write it for a reader who does not share this setup: the problem, what changed, and how to add it. Leave out private names and figures. Before writing one, read the log for an entry on the same change: one change gets one entry, and a later addition is a dated line in it.
  3. Give every entry the same short form: the problem, the solution and the steps to add it.
  4. Add a line to the list your sessions go through before they close, asking whether the change this session landed has its entry.
Detailed notes: Every change to how I run sessions gets a dated entry here

What happened

By late October I had changed how my Claude sessions work more than a dozen times that month. Each change was recorded where it was made: a dated section in my rules file, a note inside a skill, a memory file. Those records are written for me and my sessions. They carry names from my own work, and no one file tells the changes in order.

On 25 October I asked for a running record on this site, with the private parts taken out and the lesson put in general terms, the way I had already rewritten my session rules for a public repository. The page went up that evening with four entries. The same night a short section went into my rules file, so that every later session would know the page exists and what belongs on it.

That night three sessions noticed from that section alone that their own changes had no entry, and one of them asked me about it at its close. The section alone left two gaps: a session that never reread it would close without an entry, and with four sessions writing to one list, the morning overlap count got an entry of its own beside the one-task entry that already covered it.

What changed

The section in my rules file says that a change to how sessions are run, kept or checked gets a dated entry on this page once it has landed. It lists what counts: a section of that file, a hook, a skill of that kind, or a survey made for one. It asks for an entry written for a reader who does not share my setup.

Every entry has the same two layers. It opens with the problem and the solution, three to five plain sentences each, and the steps to add the change to your own setup. The longer notes sit folded underneath, and you are reading them now. The rules for the writing are fixed too: the entry is in the first person, it names nobody from my own work, and it carries no figure from a private store and no money figure. A public author is named when a public work is the subject, and a product is named where the name helps.

On 26 October the entry became an item on the list a session walks before it is archived, the same list that asks about cards nobody has started and side sessions. If the session landed a change of this kind, the list asks whether its entry is on the main branch or on a branch on its way there. A missing entry counts as unfinished work: it is written, handed to a session that has started on it, or let go in my own words. The hook that stops an archive does not count it. That hook fails closed, and a missing piece of writing should not be able to hold a session open.

The same day the notes on writing an entry gained a rule for several writers. Before writing one, a session reads the entries on the main branch and the open branches for one on the same change. One change gets one entry, and a later session adds a dated line to it. A subject that keeps moving is one log: a single entry with a dated section for each day it moved, as the house gate entry is. A test refuses two entries with the same address. It caught one on 28 October, when a session wrote an entry for a change that another session had already written up.

What to copy

Keep a dated log of the changes to your agent setup, and put the rule that asks for an entry into the file every session reads. Keep the form short, so that writing an entry is a small job: the problem, the solution, how to add it. Put the check on whatever list your sessions go through before they close, since every session ends there. If several sessions write to the log, have each one read it first, and let a test refuse a second entry with the same address.

Still open

The check is a line on a list, so it holds only when a session walks the list. The rule itself had no entry until 5 November, when the session that wrote it walked the list at its own close and found this one missing. No script compares an entry with the rule it describes either. When a rule changes later, its entry gets a dated line only if the session that changed it walks the list.

Back to top

One task, one session: who owns the work

Running a dozen sessions at once, one task ended up with two of them. Nine rules for where a task's questions and reports go, and a morning count in place of an enforcement layer.

The problem

I run a dozen or more sessions at a time. Sessions can start other sessions, offer follow-up work as cards and buttons, and wake each other with notes. One day two sessions ended up working on the same fix, and I answered a question about it in the wrong one. Nothing on the machine knew which session owned the task.

The solution

Nine rules now say who owns a task and where its questions and reports go. The session that first offered a task owns it, a session checks the state before it acts on a card or a button, and reports lead with the task and the owner. A second model read the rules and closed the holes it found. I measured the week's logs before building a lock and found no case a lock would have caught, so a daily count watches for one instead.

Before: one fix with two sessions working on it, and the answer landing in the session that was not doing the work.
Before: two sessions on one fix, and an answer in the wrong one. A drawn figure with made-up labels, not a screenshot.
After: one session owns the fix, the other checks the state first and sends its question to the owner, and the answer lands with the owner.
After: one owner, questions sent to it, the answer where the work is. A drawn figure with made-up labels, not a screenshot.

How to add it

  1. Open github.com/willbchou/one-task-one-session and paste its CLAUDE.md at the end of your own ~/.claude/CLAUDE.md (on Windows, %USERPROFILE%\.claude\CLAUDE.md). The same section is in this entry's detailed notes.

    Git Bash, macOS or Linux

    git clone https://github.com/willbchou/one-task-one-session
    echo >> ~/.claude/CLAUDE.md
    cat one-task-one-session/CLAUDE.md >> ~/.claude/CLAUDE.md
  2. On Windows, copy the repository's skills/memory-check folder into ~/.claude/skills and run python memory_check.py selftest there; it should end with 26 of 26 passed.

    Git Bash on Windows, in the folder you cloned into

    mkdir -p ~/.claude/skills
    cp -r one-task-one-session/skills/memory-check ~/.claude/skills/
    cd ~/.claude/skills/memory-check
    python memory_check.py selftest
  3. Start a new session once in a while and ask it who owns the task it is about to pick up.
  4. If you run many sessions, keep a daily count of files two sessions edited within a few hours, and build a lock only when the count says so.
Detailed notes: One task, one session: who owns the work

What happened

In the Code tab of the desktop app, a session can start side sessions, propose a new task as a card for me to start, and offer its next step as buttons at the end of a turn. When a side session ends a turn, the session that started it wakes with a note. I run a dozen or more sessions at a time, so a good deal of that goes on at once.

On 24 October one task got two sessions. A side session had found eight holes in a safety check and offered to fix them where it was. Three minutes later the session that had started it proposed a card for the same fix. I accepted both. The second session began after the first had already landed the fix, asked me how far the next fix should go while the first was in the middle of it, and my answer reached the session doing the work only through a note the second one had rewritten. The parent, told to keep an eye on its child, passed on a dozen one-paragraph progress notes along the way.

Nothing on the machine recorded which session owned the task.

What changed

Nine rules went into my personal CLAUDE.md the next day, under the heading "One task, one session". The short form:

  1. One task, one owner: the session that first offered it to me or was given it. A follow-up its work turns up stays with it unless I send it elsewhere.
  2. Check before starting or resuming, from a card or a button too, since both outlive the work they offered. Work already done is said in one line and left alone.
  3. A task's questions come from its owner. A session with a question about another session's task asks that session, not me.
  4. A report between sessions opens with the task, its source, its owner and whether anything is mine to answer, inside the first 400 characters, because a parent sees only that much at first.
  5. Relays only at milestones: when the child needs me, lands, blocks or finishes. Routine progress waits for the next one.
  6. A child is detached only when nothing is needed back from it, since detaching ends every later wake of the parent.
  7. Name and file: a new session's title names its task, and my own titles, pins and groups are never changed.
  8. An answer that lands in the wrong session is forwarded to the owner with my exact words and the question it answered. A bare "yes" is checked with me first.
  9. Nothing left behind at archive: a session is archived only when each request is done, handed to a session I have started, or let go in my own words.

A second model read the draft and found nine gaps, four of them serious: a parent and its child could both claim a task, finding a task could count as owning it, detaching could lose a wake the parent still needed, and a forwarded "yes" could carry the wrong authorization. All nine are folded in. The full section, written for anyone and with nothing from my own setup in it, is here:

The section, to paste at the end of your own CLAUDE.md

One task, one session: where questions and reports go

When many Claude Code sessions run at once in the Claude desktop app, sessions start side sessions, propose cards and wake each other. One task can then end up with two sessions, the user can be asked about it in both, and an answer given in one can miss the session doing the work. So, in every session:

  1. One task, one owner. A task's owner is the session that first offered it to the user or was given it, by the user, by a brief or by a scheduled run (each run its own owner). Ownership survives compaction, a pause, an account switch and a usage limit; a fork, a review, a variant or a delegated subtask owns only the scope its brief names. A follow-up the owner's work turns up stays with the owner unless the user sends it elsewhere or the owner hands it to a new session with a brief. Each scope gets one offer or one card, never both: a session that proposes a card first checks that no linked session has offered or taken the work (its last wrap-up, read with list_events). The user's own choice to run a task in two sessions on purpose (a second opinion, a variant) stands.

    It prevents two sessions doing one task, with the user's answers split between them.

  2. Check before starting or resuming, from a card or a wrap-up button included, since both outlive the work they offered. Read the memory notes on the task, the linked-sessions note, the side-session notes and the branch or worktree state. A session the app does not list, such as another coding agent's, has no app record, so a memory note naming it is the record, and no record means unknown, not free. Work already done is said in one line and left; a task another session owns goes back to that owner by message; a conflicting claim or a takeover is settled with the owner, or with the user when the owner cannot answer, before the task counts as moved, and the handoff (scope, state, branch) goes in a memory note on the task. Standing down throws no finding away.

    It prevents a stale card or button from redoing finished work, and finding a task from counting as owning it.

  3. A task's questions come from its owner. A session with a question about another session's task sends it to the owner (SendMessage), not to the user. The user's own questions and answers are handled where the user puts them: a session that is not the owner names the task, the owner and the pending question, takes the user's answer, and relays it under rule 8; ownership does not move with it.

    It prevents the user being asked about one task in two sessions and answering in the one not doing the work.

  4. A report or a forwarded note starts with the task, its source, its current owner and whether anything is the user's to answer, here or in the owner's session, inside its first 400 characters, since a parent sees only those at first. The parent reads the whole report before acting on the preview and tells quoted context from a fresh request. Most say "nothing to answer".

    It prevents a parent acting on a cut-off preview, and quoted context being taken for a new request.

  5. Relays only at milestones. A parent passes on a child's note once, with the child's link, when the child needs the user, lands, blocks or finishes, and folds routine progress into the next milestone. A note that is none of these gets one line at most, no question, and never an offer to take the child's work over. Being asked to monitor a child means that.

    It prevents a stream of progress relays, and a parent offering to take over work its child is doing.

  6. "No need to report back" from the user allows detaching the child (detach_session) once its brief is self-contained and the parent needs nothing back, said once to the user: detaching stops every later wake of the parent, completion and blockers included, and ends their joint archiving. A child the parent depends on stays attached, under rule 5.

    It prevents wakes nobody needs, and the lost wake of a child whose result or blocker the parent still needed.

  7. Name and file. A new session's title names its task and scope in a few words. A title the user set, a pin and a filing the user chose are never changed. A session that starts another files it in an existing sidebar group that plainly belongs to the task (move_sessions); takeover provenance goes in the brief, not the title.

    It prevents sessions the user cannot tell apart or find, and a session undoing the user's titles, pins or groups.

  8. An answer that lands in the wrong session is forwarded to the confirmed owner with the user's exact words, the original question or button and the session it came from; an ambiguous reply ("yes", "do it here") is clarified with the user before it goes. The owner applies it to that decision only after checking the scope is still current; the forwarder says whether it was sent, acknowledged or could not be delivered; a shared note updated on the way is a record, never proof of receipt.

    It prevents a lost answer, and a bare "yes" applied to the wrong decision or to one already superseded.

  9. Nothing left behind at archive. A session is archived only when each of its requests is done and checked, handed to a session the user has started, or let go in the user's own words. A card it raised that nobody has started, and a side session the archive would take with it, are pending: the session waits, or the user starts the card, or the child is detached first.

    It prevents an archive that takes unfinished work with it: a card nobody started, or a side session not yet done.

These are the defaults for where a task's questions and reports go. They cost a few reads per check and never narrow what a session may do; the user's explicit choice of a session or of parallel work wins over them, and the user's other rules, such as those on worktrees, reviews or shared data, stand beside them.

Why rules and not a lock

The obvious next step is an enforcement layer: a hook that records which session claims a folder or a file and stops the next one. Before building it I had the week's logs read. Across seven days, 356 session lineages and 8,607 file edits, three files had been edited by two different lineages within six hours. Two were a parent handing work to its child, which is the normal flow. The third was my settings file, touched by three sessions that were each wiring a hook. The duplicate that started all this had never touched a file twice, so a claim on files or folders would not have caught it.

So the layer is not built. The same read now runs every morning as a scheduled task and reports one line: how many files two unrelated sessions, or two children of one parent, edited within six hours. One such file in a week, on a code file, gets read and explained to me. Two in a week, or any lost work, is the signal to build the layer, and the saved reports become its test data. The first morning run is tomorrow.

Rule 9 is the one with a hook behind it already. The entry on marked sessions, further down, has it.

What to copy

If you run one session at a time, almost none of this applies. A single terminal session barely has the problem. If you run several in the desktop app, paste the section into your CLAUDE.md. It costs about a thousand words of context in every session, and a skill would not do in its place: the rules have to act in turns that are about something else, such as the moment a session is about to propose a follow-up, and a skill stays unloaded until a task looks like it. Then watch for the shape of the failure: two offers for one task, a question about a task arriving in a session that is not doing it, a parent relaying every turn of its child.

Still open

Whether rules are enough. The morning count decides, and this entry gets a line when it does.

26 October: the rules and the memory check are on GitHub at github.com/willbchou/one-task-one-session, a section to paste and a skill to copy. The block above stays for anyone who wants it here.

Back to top

A daily check that two sessions did not edit one file

Rules say which session owns a task. Before building a lock to enforce them, a script reads the session transcripts of the past day for a file two sessions edited within six hours, and it now runs every morning. What it reads, what it folds away, what it cannot see, and the number that would make me build.

The problem

The session rules leave one question open: are written rules enough, or do I need a lock that stops two sessions touching one thing? One reading of the logs is not an answer. I wanted the record to decide, day by day. That meant a check that runs on its own and tells me only when something is wrong.

The solution

A script reads every session's transcript and the app's own records. It lists each file that two different sessions edited within six hours, and tells a handoff from an accident. A scheduled task runs it every morning at 6:50 and sends me a note only when the count is above zero. Two such files in a week, or any lost work, is the signal to build the lock.

A timeline of one file: session A edits at 09:10, session B at 14:40, within six hours and unrelated, so counted; a session started by A edits at 10:05, a handoff that counts for nothing; and the report line beneath.
What the morning count reads: two unrelated sessions on one file within six hours count, a handoff does not. A drawn figure with made-up labels, not a screenshot.

How to add it

  1. Find where your tool keeps its session transcripts and what each edit line looks like.
  2. Write a script that lists files edited by two sessions within a window, and leave out shared notes.
  3. Run it on a schedule, keep each day's report, and set the threshold that would make you build a lock.
Detailed notes: A daily check that two sessions did not edit one file

What happened

The entry One task, one session ends on the question the rules leave open: are rules enough, or does the machine need a lock, a hook that records which session claims a folder or a file and stops the next one? The week's logs answered it once, with three files edited by two sessions in seven days and none of them the duplicate's. A single reading could not say whether that would hold. On 25 October I asked for the read to run every day, so that the record decides when a lock gets built, and the script became a skill with a scheduled task behind it.

What it reads

Every Claude Code session keeps a transcript on disk, one line per event, under the .claude folder in the user's home, and the desktop app keeps a record of every session it shows: the title, the session that started it, and when. The script reads both. From each transcript it takes every file edit with its path and its second, and every git command that commits, merges, rebases, pushes, makes a worktree or starts a branch, placed in the folder the command names or, failing that, the transcript's project. Then it lists each file that two different sessions edited within six hours, and each folder where two sessions ran such a git command inside the window.

Two things had to be settled before the count meant anything. A session can be forked or continued, and the copy carries its parent's whole transcript, so the first seven-day count had 398 false pairs around the three real ones. Now any two transcripts that share three identical events, the same second and the same file, fold into one lineage, along with every id the app's record gives one session. And shared notes are not overlap: memory files, the notes folder that sessions leave each other, scratch folders, the calendar, the read-me and hand-over documents are left out, because two sessions writing the same notes is the setup working as meant.

Each pair is marked from the app's record of who started whom: a handoff when one session started the other, siblings when one session started both, unrelated otherwise. A handoff is the normal flow, a child landing its parent's branch, and counts for nothing. Unrelated and sibling files are the case the rules exist to prevent, and the shape the October duplicate would have taken had it reached a file. The report's first line is the signal: how many unrelated and sibling files, how many handoffs, how many folders with two sessions committing.

What changed

A scheduled task runs the scan at 6:50 every morning over the previous day with the six-hour window. It saves the day's report and one summary line, reports the first line, and sends a notification only when the count of unrelated or sibling files is above zero. It writes nothing else, reads no session's content beyond the edit paths and the commands, and judges nothing. I read the report.

The threshold, until the record says otherwise: one unrelated or sibling file in a week on a code file gets read, which two sessions and why and whether anything was lost, and said to me. Two in a week, or any that lost work, is the signal to build the lock, and the saved reports are its test data. The first one-day reading, on 25 October, found one unrelated file: my settings file, edited by three sessions in five hours, each wiring a hook. It is the one shared file to watch, and it is not code. The scheduled runs begin on 26 October.

What it cannot see

  • Two sessions offering one task before either edits a file, which is how the October duplicate began. The rules' check before a card is proposed covers that, and no file scan can.
  • Sessions of the other coding agent I run, whose transcripts live elsewhere.
  • Edits older than the transcripts the app keeps.

So a zero means no file was touched twice that day, and no more than that.

What to copy

Before you build a lock between your sessions, count. The transcripts are already on disk with every edit's path and time, and a short script answers whether two sessions touched one file in a day. Fold forks and continuations first, or every copied transcript reads as a collision, and leave shared notes out. Then write down the number that would make you build, and read the line each morning.

Still open

Whether the count ever reaches two in a week. If it does, the lock gets built, and this entry and the one above get a dated line.

Back to top

A tidy sidebar: one group per project folder

Some folders showed twice in the sidebar, once as my group and once under Sessions. A script now files each session into the group named for its folder, and a hook runs it after every unarchive. Building it turned up two traps: a move into a group unpins a session, and the sync between my accounts took every move as mine.

The problem

The app's sidebar showed some of my project folders twice: once as the group I had made, and once under Sessions for the sessions nobody had filed. Sessions that came back from the archive always came back in no group. It made the sidebar hard to read with many sessions open.

The solution

A script reads the app's own files and finds, for each unfiled session, the one group named for its folder. A session makes the move with the app's sidebar tool, after checking the live state right before it. A hook after every unarchive files the restored session the same way. Pinned sessions and scheduled runs are left alone, because the first run showed that moving a pinned session removes its pin.

Before: a sidebar with the same folder name under a group and again under the sessions in no group.
Before: one folder, two headers. A drawn figure with made-up labels, not a screenshot.
After: one group holding all four sessions of the folder, nothing left in no group, and a note that pinned sessions are never moved.
After: one group per folder, filled by a script and kept by a hook. A drawn figure with made-up labels, not a screenshot.

How to add it

  1. Name your sidebar groups after the project folders they hold.
  2. Have a session list the sessions in no group and the group each belongs to, and move them with the app's own tool.
  3. Before any move of something you arranged by hand, have the session read what the move does to it.
Detailed notes: A tidy sidebar: one group per project folder

What happened

The Code tab's sidebar shows each group I made under a header of its own, and every session in no group under Sessions, where they sit by folder. So a session left out of the group named for its folder puts that folder's name on screen twice, once as my group and once under Sessions. Two of my project folders showed twice. Some of the sessions behind it had never been filed. Others had come back from the archive, and a restored session returns in no group.

I asked a session to merge the duplicates and to make sure a session restored later lands in its group.

What changed

  • A script reads the app's own files and never writes them. For each session in no group it finds the one group named for its folder, by the folder's name or by that name with a site's ending such as .io after it. When two groups could match, it leaves the session where it is.
  • It leaves alone a session already in a group, a pinned one, a scheduled task's runs (the app files them under the task and refuses to group them), a side session (it moves with the session that started it) and an archived one.
  • A session makes the move with the app's own sidebar tool, after four checks right before it: the plan read again, the live sidebar (the session still in no group and still not pinned), the group (still named so, and still the only one named for the folder), and last the account sync below. A check that cannot be made means no move.
  • A hook after every unarchive tells the session that restored one where it belongs, with the same checks.
  • The first run filed four sessions. Of the 178 archived sessions I still have to look through, one would have come back outside its group.

Two traps

Moving a pinned session into a group unpins it. The app's tool says so in its own description, and I found out the other way: the first merge moved a session I had pinned, and the pin was gone. The session put it back that night. A pin is one of my marks (Sessions I mark stay), so no move touches a pinned session now.

The second trap was quieter. I use several Claude accounts, and a sync script keeps their sidebar groups the same. It takes any move it did not plan as my own choice and carries it to every account. A move made a few seconds late, after the sync had learned a different filing from another account, would have overwritten that filing everywhere. The moves now go through the sync: it records the filing only while it holds none for that session and counts the move as its own step, so a filing it learns afterwards still wins. The sync's own steps had the same gap with pins, and leave pinned sessions alone now too.

Codex reviewed the change six times. The first five rounds each found something that had to be fixed before it could land, the two traps among them. The sixth found two small things.

What to copy

Before a script moves anything a person arranged, read what the move does to it. Here it removed one of my marks. Read the live state right before each move, since the files on disk can lag what the app shows, and make no move when something the move depends on cannot be read. If you sync state between places, mark the changes your own tools make as theirs, so the sync never takes them for yours.

Still open

A pin set in the few seconds between the last check and the move is still undone. The app's move tool has no "only if unchanged" form, so nothing on my side can close that.

Back to top

Do I need a cockpit for many sessions? The tools out there

Whether to leave the desktop app for the terminal, what a session costs in memory, and the twenty tools people put over many agents, now a section on my directory.

The problem

My laptop was short of memory, and I had read that a session in the desktop app costs twenty times what one in the terminal costs. I did not know whether that was true. I also did not know what tools exist for running many coding agents at once. I wanted both answered before changing how I work.

The solution

A session measured it: a session costs the same memory in the app and in the terminal, because both run the same engine. What gives memory back is archiving finished sessions and restarting the app once a day. The same day a survey of the tools people put over many agents became a section on my directory, twenty tools checked live. I stayed with the desktop app, because the session rules depend on what it does.

How to add it

  1. Measure before you move: compare the memory of one session in the app and in the terminal on your own machine.
  2. Archive sessions you are done with, and restart the app once a day.
  3. Look at the directory's section if you want a board, a phone view or agents of different makes side by side.
Detailed notes: Do I need a cockpit for many sessions? The tools out there

What happened

The same day as the rules, a plainer question: should I move from the desktop app to the terminal? I had read that a session in the app costs about a gigabyte of memory against fifty megabytes in a terminal, and the machine had been short of memory for two weeks.

The measurement said otherwise. Every session I had touched since the app last started held a process of 500 to 750 megabytes, plus about 170 megabytes for the servers behind its connections, and kept it until the session was archived or the app restarted. The terminal runs the same engine and starts the same servers, so a session costs the same there. The one saving is that a closed terminal window holds nothing, and the app matches that with a restart. Archiving finished sessions and restarting the app once a day is what gives the memory back.

While that was being measured, a card from the same session built a section for findatool.ai, my directory of AI tools, on the category I had been circling without knowing its name: the tools people put over terminal coding agents. Agent cockpits & terminals lists twenty of them, each one's page fetched live on the day it went in.

What is in it

  • Session managers that run in the terminal over tmux, with a git worktree per agent, so two agents never edit the same files.
  • Desktop apps that run several agents side by side in separate workspaces, with a sidebar of sessions and an alert when one is waiting for you. Many are Mac first; some run on Windows too.
  • Boards and control planes over agents, some with a phone app, where a task is a card and the agent works it in its own branch.
  • Terminals with an agent built in, which make the command line easier on someone who came from windows and menus.

Most are open source, several with tens of thousands of stars. A few are closed and free for now. One popular board lost the company behind it in April and goes on as a community project, which its listing says.

What I did

I stayed with the desktop app, for the reason the entry above gives: it starts sessions from sessions, proposes cards and wakes a parent when a child finishes, and the rules I wrote depend on those. I have not used any tool on the list for work; the section is for the reader who wants to look. What I took from the survey is the pattern the strongest of them share: one worktree per session, a visible queue of who is waiting on you, and one place that shows every session. The desktop app's sidebar does the last two, and the worktree per task is a rule in my CLAUDE.md.

What to copy

If the sidebar is enough, keep it. If you want a board, a phone view, or agents of different makes side by side, the section has the candidates, and each listing shows how many live checks it has passed since it went in. Whichever you pick, give each session its own copy of the project to work in.

Back to top

Building websites: a design skill and a page check

Two skills from a video, one installed with house additions and one left out, and a quality floor every page clears before a deploy: seven checks at two widths, which found the same phone failure on all three sites.

The problem

I build my websites with Claude Code and I am not a designer. The look of each site lived in its CSS and in nobody's notes. There was no check that a page worked on a phone, had readable contrast, or showed keyboard focus. A video recommended two skills for this, and I wanted to know if either was worth installing.

The solution

One skill, Anthropic's own, went in as a house copy with four additions of my own. The other bundle stayed out. The checks became a script that loads a page at desktop and phone widths and reports overflow, low contrast, missing focus, missing alt text, small tap targets and animations that ignore reduced motion. Its first run found the same phone failure on all three of my sites, and the fixes followed.

How to add it

  1. Install a design skill, but write your own additions down next to it.

    Git Bash, macOS or Linux: Anthropic's frontend-design skill, the one I started from

    git clone --depth 1 https://github.com/anthropics/skills anthropic-skills
    mkdir -p ~/.claude/skills
    cp -r anthropic-skills/skills/frontend-design ~/.claude/skills/
  2. Keep one design file per site with its colours, type and layout.
  3. Put the page checks in a script and run it before every deploy; tap targets at the phone fail most often.
Detailed notes: Building websites: a design skill and a page check

What happened

On 25 October I asked for better website building skills, starting from a video that builds a site with Claude Code and two skills. One is Anthropic's own frontend-design skill. The other is a bundle of seven, with paid image APIs and tables of stock picks for fonts and colours. The review found the first worth a house copy and the second nothing my sites needed. It also found that none of my six sites had a design file or any accessibility tooling: the look lived in each site's CSS, and the checks lived in whoever happened to be looking.

What changed

The skill went in as a house copy, scanned first and its dashes rewritten, with four additions written down beside it. The brief comes first, with the brand assets, the sections and the page's job. Each site keeps its palette, type and layout in one design file, read before any change to its look. Nothing is invented on a page, so a placeholder stays visible and gets listed. And every page is checked at 1440 and 390 px before it ships. A house file records the source version and each change, so an update from upstream can be reapplied.

The check became a script the same day, because a check that lives in a skill's prose runs when someone remembers. It loads a page at desktop and phone widths, and again with reduced motion on, and reports sideways overflow, text under 4.5 to 1 contrast, links and buttons with no visible focus when tabbed to, images with no alt text, tap targets under 44 px at the phone, animations still moving under reduced motion, and where the hero meets the fold, with a full-page screenshot per width. It fails loudly and changes nothing.

Its first run, on this site's seven public pages, passed everything except tap targets at the phone, on every page: header links 25 to 36 px tall, footer links 20 to 22 px, the Copy buttons 23 px. The other two sites' public pages failed the same way, and the fixes started that afternoon. This site's landed the same day, the investing site's landed that evening, and the directory's is still to do. One more lesson came out of the run. A link-listing fetch tripped one site's own bot trap, which refuses a machine for 24 hours, and the session waited the day out rather than check those pages from a fresh local server. A check that sidesteps a site's bot rule is not a check I want.

What to copy

Install a design skill if you like, but write your own additions down next to it, and keep a design file per site so the next session changes the look on purpose. Then put the floor in a script and run it before every deploy. The seven checks above are a good start, and the phone's 44 px tap targets are the one that fails most.

Still open

None of the six sites has its design file yet. Each gets one on its first design pass under the skill.

Back to top

Posting to social media safely from Claude Code

Seven weeks from a knowledge base to skills and scheduled tasks that draft, cut, check and post: generators that refuse what must never ship, an approval record with a hash, posts that email me first, and a desk I write to.

The problem

My social media posts come from the same sessions as my code. The first carousel shipped with two real mistakes because nobody had checked the sources. Posting under my own name through an API means a bad line goes out before I see it. I needed the drafting, the checking and the posting to be safe by construction.

The solution

Each piece lives in one folder with a script that writes the slides and the caption and refuses anything that must never ship: a dash, a banned word, a machine tell. Every post goes through the humanizer. An approval record hashes what I approved, and Instagram cards are emailed to me first and post only when I reply. A desk session answers briefs I email myself, and a trial loop keeps a ledger of every render.

Six boxes in a row from a brief emailed to myself to a card emailed back for a reply, with the generator, the humanizer and the approval record in between.
From a brief to a post, with the checks in the way. A drawn figure with made-up labels, not a screenshot.

How to add it

  1. Put the things that must never ship into the generator, so a run aborts instead of a reader noticing.
  2. Keep approvals as a record with a hash of what was approved, not a status field a script can flip.
  3. Let anything that posts under your name email you first and act on your reply.
Detailed notes: Posting to social media safely from Claude Code

What happened

The content side started in early September as a knowledge base and became, in seven weeks, a set of skills and scheduled tasks that draft, cut, check and post. The first carousel set the tone: it shipped with two real defects because nobody had opened the source libraries it drew on. Everything since has been built so that a mistake of that kind cannot reach a reader.

What changed, in order

  • One folder per piece, from 8 September. A generator script writes the slides, the canvas and the caption from one copy file, so the artboards and the words can never drift apart.
  • Gates, 15 September. No dashes in anything published. The humanizer skill went in that day and runs on every caption, frame and script. The generator refuses a never-list word, a dash or a strong machine tell and aborts the run; a later layer refuses leak words and stray digits. The order is fixed: draft, check for tells, rewrite if needed, then the house checks again, because a rewrite is one more draft. In late October one more rule arrived after a quote went out reading "24, 48 hours", a transcription's comma in place of a range's hyphen: a range keeps its hyphen.
  • Delivery by mail, 18 to 20 September. I email footage to myself; a skill fetches it, cuts it to a shot list with ffmpeg and mails the finished video back. A loudness baseline followed in October, with a daily task that deletes the originals only after I reply "done".
  • First unattended runs, 26 to 28 September: a morning news desk on weekdays and a read of the feeds I follow, both writing into the project and never committing.
  • Quotes, 28 September. Short lines of my own for X, repurposed as cards for Instagram. Forty approved the first day, and a daily task posts one each morning. Its gates refuse a dash, a never-list word, a strong tell, a performance figure, a family reference and anything over 280 characters.
  • A calendar system, 5 October: a grid of slots, a register of experiments and an inbox of ideas, so that every piece tests one call from the playbook.
  • A trial loop, from 13 October. Trial reels post to my own account through the publishing API, recuts are a system with one lever changed per variant, and every render goes into a ledger. The first live batch went out on 14 October, eleven reels in a day with none refused. On the first Sunday turn 27 postings were logged, and after the app refused a session's second live batch, a scheduler sits beside the reels instead. Four review rounds that day all turned on one post sent twice.
  • Reel template skills, 13 to 22 October: a remix skill after Instagram's own Remix went away, a takes engine whose rule is that the last attempt wins, a response-reel skill and a script drafter.
  • The approval record, 21 to 24 October. A security pass showed that a status field in a file was enough to post under my name. Decisions moved to an approvals file that hashes everything a line will post, with the destination accounts bound to it; a card's photos go on record after one card drew the same three photos as the previous week's; and since 24 October every Instagram card is emailed to me first and posts only on my reply "post", read hourly through the day.
  • The content desk, 25 October. I email myself "Claude reel" or "Claude post" with the brief in the body. A small poller reads the inbox every thirty seconds with no model in it and answers "Got it"; a standing session with Remote Control on drafts the piece and replies in the same thread, and I answer there until I say done. Its review found a real blocker before it went live: a stranger's mail wearing the desk's own header would have read as the desk's.

Five tasks run unattended today, plus a few one-time reminders, each behind the run guard the harness entry describes.

What to copy

Put the things that must never ship into the generator, so a run aborts instead of a reader noticing. Treat approval as a record with a hash of what was approved, never a status field a script can flip. Let anything that posts under your name email you first and act on your reply. And keep a ledger of every render with the one lever you changed, or the trial teaches you nothing.

Still open

The newsletter is not built. A video framework installed in October has not touched a reel yet, and a chat automation flow is drafted and not live.

Back to top

One name for each shared store, and a pass reported only once it runs

One morning a session and a scheduled pass marked the same data under two names, so neither showed up in the other's check, and passes started by hand were reported as running when they had skipped. The handoff now reads one name per store and starts a pass through a command that reads whether it ran. Since 31 October its check also reads a shell's command line command by command; that change has an entry of its own.

The problem

Before a session here writes shared data, it runs a handoff: a check for other writers, a marker that says what it is about to run and for how long, and a notice to the sessions that might write the same data. A check finds a marker by the store's name. One morning a session marked a project's data under a second name while a scheduled pass held it under the first, so every check of that store found no marker. The same morning three passes started by hand never ran, because another session's tests made each one skip itself, and two of them were reported to other sessions as running.

The solution

The check now reads a store's other names as the same store, so a marker under any of them holds it. A check of one store also lists the live markers on the others, marked as not counting, so a session sees what else is being written. A pass started by hand goes through one command, which refuses while the passes are held, while a pass runs or while the pass would skip itself. Once it starts the task, it reads the pass's own run record and says running, ran, did not run or unknown.

How to add it

  1. Give each store your sessions share one name, and map every other spelling a session uses onto it in the check itself.
  2. Have a check of one store print the live markers on the others too, marked as not counting against it.
  3. Before you start a scheduled task by hand, test the conditions under which it skips itself, and refuse to start it then.
  4. Report a scheduled run from its own record, such as a lock it holds while running or a line it writes when it ends. The start command returning says only that the task was asked to start.
Detailed notes: One name for each shared store, and a pass reported only once it runs

What happened

Two coding agents and a dozen sessions work in the same repositories here, and shared data has a rule: two writers never run at once, and a write starts only after a handoff confirms the other writer has stopped. The handoff is a skill. It checks for writer processes, the scheduled passes and the markers other sessions left, writes a marker of its own that names the command and how long it should take, and prints the notices the session sends to the others. A marker is a file named for the store it covers.

At 09:04 on 23 October a session marked one project's data store under one spelling of its name, for a refresh and a publish, while a scheduled pass held the same store under another spelling until 09:21. Markers matched by name, so the session's mark was not refused, and every check of the pass's store printed no marker. Three sessions waiting for the pass's done message could have started between its steps. The same morning my sessions started a pass by hand three times, and each time it skipped itself: a pass will not start while another session's scripts are running, and another session's tests were running each time. Two of those starts were reported to other sessions as passes that were running.

What changed

The skill reads the store's three spellings as one store in every command, so a mark under any of them is held by the same check. A check of a store lists the other stores' live markers as well, shown and never counted against it. A new command starts a pass by hand. It refuses while the passes are held, while a pass is already running, or while the pass's own busy check names a running script. Then it starts the scheduled task and reads the pass's own record within ninety seconds: the lock the pass holds while it runs, and the line it writes when it ends. It says RUNNING, RAN and ended, DID NOT RUN with the skip's reason, or UNKNOWN, and exits with success only when the pass runs or ran. Fifteen checks came with it, seventy in the skill's selftest.

What to copy

If your sessions share a store, give it one name and make the check read every other spelling as that name, since a check that matches by name cannot see a marker written under another one. Show the other stores' markers too, so a session knows what else is being written without counting it against its own store. A scheduled task's start command only asks the task to run, so read the task's own record before anyone is told it ran.

Since then

On 31 October the same check changed again. It now reads a shell's command line the way the shell does, so a command that only hashes or reads a script no longer counts as a writer and holds up another session. That change, and the three security reviews that shaped it, are in an entry of their own.

Back to top

Why the app says it is low on memory, and what helps

Twenty sessions on a 16 GB laptop, and the app said it was low on memory. The notice reads what Task Manager reads, it never paused a session with Remote Control on, and the check that names which session holds what is now a skill.

The problem

My laptop has 16 GB of memory and I run twenty or more sessions at once. The app warned me about low memory every day for a week, git died twice, and every session was slow. I did not know what the warning measured or what each session cost. The app's own pause for idle sessions never fired, because every session had Remote Control on.

The solution

A session read the app's code: the warning reads Task Manager's Available and Committed figures, not In use. Each session holds about 600 MB of commit charge, so twenty idle sessions are 12 GB. The Remote Control default went off, heavy jobs run one at a time, and memory errors are read as casualties to rerun, not bugs to debug. A memory-check skill reads the same figures and names the sessions holding the most.

Two bars: the machine's 16 GB, and 12 GB held by twenty idle sessions at about 600 MB each; two lines on what the notice reads and what gives memory back.
Twenty idle sessions on a 16 GB machine, in rounded numbers. A drawn figure with made-up labels, not a screenshot.

How to add it

  1. Open Task Manager's Performance tab and watch Available and Committed, not In use.

    PowerShell: the same two figures, read in one go

    $os = Get-CimInstance Win32_OperatingSystem
    $total = $os.TotalVisibleMemorySize / 1MB   # KB to GB
    $free = $os.FreePhysicalMemory / 1MB
    $limit = $os.TotalVirtualMemorySize / 1MB
    $used = $limit - $os.FreeVirtualMemory / 1MB
    "Available {0:N1} of {1:N1} GB" -f $free, $total
    "Committed {0:N1} of a {1:N1} GB limit" -f $used, $limit
  2. Turn off the app's Remote Control default, so idle sessions can be paused.
  3. Run one heavy job at a time and archive sessions you are done with.
Detailed notes: Why the app says it is low on memory, and what helps

What happened

My laptop has 16 GB of memory and runs twenty or more Claude Code sessions at once in the desktop app. By 23 October the app had been telling me it was low on memory every day for more than a week. Git had died twice with "Out of memory, malloc failed", a Node test suite had died with a heap error, and every session was slow, whether or not it was doing anything. I asked whether the notice meant the memory Task Manager shows, and whether running so many sessions was what cost me.

A session read the app's own code for the answer. The app has a governor that polls every ten seconds and takes the lower of two ratios: available memory over total memory, and the commit charge still free over the commit limit. Under 5 percent is a warning, under 2 percent is critical. Those are the Available and Committed figures on Task Manager's Performance tab, not the In use figure and not the Memory column of the process list. Windows has a notice of its own as well, Event 2004 in the System log, which names the processes holding the most. That day the machine had 23 session processes, 52 GB committed against 16 GB of RAM, a page file that had grown to 48 GB, and a disk reading 35 to 55 MB a second of pages that should have been in memory. The day before, the governor had logged 273 critical readings.

The governor is also meant to pause sessions. It pauses only idle ones, and only while the count of live session processes is over a cap, six on 16 GB. A session with Remote Control on is never paused, and the app's default was to connect every new session to Remote Control, so every session I had was exempt. The log said so each time: zero evicted of zero idle, 23 effective. Twenty idle sessions sat untouched. Each session process holds about 600 MB of commit charge with the two helper servers beside it, about 100 MB of it resident, so twenty idle sessions are 12 GB of commit on a 16 GB machine.

What changed

  • The Remote Control default went off the same day. Sessions that already had it on keep it until I switch it off one by one.
  • Exit 134, "JavaScript heap out of memory", "malloc failed", "spawn ENOMEM" and Windows error 1455 are read as memory casualties. The job is run again with fewer sessions open, and nobody debugs the code for them. The script that lands branches classifies a failed check the same way.
  • One heavy job at a time: an encode, a transcription, a test suite, a batch. Never beside twenty live sessions.
  • The check became a skill. One pass reads Task Manager's figures (total, available, committed, the commit limit, the page file, the hard-fault rate), Windows' low-memory events of the last seven days, every live session process with what it spawned, the other process names holding the most, and the governor's pressure lines of the day from the app's log. What a session spawned is usually where the big numbers are: a dev server, a browser it drives, a batch. It saves each reading as a snapshot and compares two, so I can see what closing sessions gave back. It closes nothing.
  • Two days later it learned to name the sessions. A session's process carries an id at most, and a side session or a scheduled run carries not even that. The skill matches each process to the app's own session records: by the id, by which session started it and when, or by the record created within three minutes of the process. When no record fits, it takes the first prompt from the session's transcript. Then it prints the chart I had been assembling by hand: one row per session, with its title, the gigabytes it holds, when it was last active and a note. A starred or pinned session is listed and never touched.

What to copy

When the app says it is low on memory, open Task Manager's Performance tab and read Available and Committed, since those are the two figures behind the notice. Count your session processes. Each warm session holds its memory until it is paused, archived or the app restarts, and a session with Remote Control on is never paused for memory, so switch it off on the sessions you never open from your phone. Treat an out-of-memory death in git or Node as a casualty of the count: run it again with fewer sessions open before you debug anything. Run heavy jobs one at a time.

Still open

Two fixes are mine to make rather than a session's, and neither is done: a page file of fixed size, so it never grows in the middle of an allocation, and more memory in the laptop's two slots, which hold 8 GB each.

Back to top

Sessions I mark are never archived by a session

A bulk close archived two sessions I had starred and the app's auto-archive swept hundreds more. A star or a pin now protects a session, and nothing is archived with loose ends. The sessions the sweep took came back by a rule: the starred and recent ones two days later, the rest through a weekly review.

The problem

I keep sessions I will come back to, and I mark them with a star or a pin. One night a bulk close archived 58 sessions at once, two of them starred. The same night the app's own auto-archive swept 454 more, because it reads no mark. Two days later a session archived itself with two cards nobody had started.

The solution

A starred or pinned session is now never archived by a session, only by me. Auto-archive stays off. A session is archived only when each of its items is done, handed to a card I have started, or let go in my words. Both rules have a hook behind them on the app's archive tools. The starred and recent sessions the sweep took came back two days later, and a weekly review shows me the rest twenty at a time.

Before: four sessions, two of them starred, all archived by one sweep.
Before: a sweep that reads no mark. A drawn figure with made-up labels, not a screenshot.
After: the two starred sessions kept as mine to archive, the two finished ones archived with nothing pending.
After: a star or a pin protects a session, and nothing is archived with loose ends. A drawn figure with made-up labels, not a screenshot.

How to add it

  1. Decide what marks a session as yours to keep, and write it where every session reads it.

    For your CLAUDE.md, with the marks I use

    ## Protected sessions
    
    A session is protected when it is pinned in the sidebar or its title begins with a star (*). The pin and the star are mine: a session never pins, stars or unstars one.
    
    - A session never archives or deletes a protected session, alone or in a bulk close, unless I name that session in my own words.
    - A bulk close lists what it is about to archive before it acts, names each protected session it leaves out, and leaves out every session it did not start.
    - A session is archived only when each of its requests is done and checked, handed to a session I have started, or let go in my own words.
    - The app's own auto-archive reads neither mark, so it stays off, and a session never turns it back on.
  2. Check what the app's auto-archive does before you turn it on.
  3. Before a session archives itself, ask it what is pending: cards, side sessions, branches, promises.
  4. If an auto-archive has already swept your sessions, bring back the marked and recent ones first, and look over the rest a few at a time.
Detailed notes: Sessions I mark are never archived by a session

What happened

I mark a session I want to keep with a star at the front of its title, or with the sidebar's pin. On the night of 22 October the app's own auto-archive, switched on that evening and set to two days, swept 454 sessions that had been idle that long, thirty of them starred. It reads no mark and cannot tell a task in progress from a finished one. Minutes later a session told to close finished sessions archived 58 more, two of them starred.

Two days later, while 76 of those were being restored, a session told to tie up its loose ends handed two items to task cards, called itself done and archived itself. Nobody had started the cards, so the work sat behind an archived session until I went looking for it.

What changed

  • A pinned or starred session is never archived or deleted by a session, alone or in a bulk close, and never renamed so that its star is lost, unless I name that session myself. The marks are mine. A session never adds or removes one.
  • Auto-archive stays off, since it reads no mark.
  • A bulk close lists what it is about to archive before it acts and names each protected session it leaves out.
  • A session is archived only when each of its requests is done and checked, handed to a card I have started, or let go in my own words. A card nobody has started, and a side session the archive would take along, both count as pending.
  • Both rules have a hook behind them on the app's archive and delete tools. The first asks before a protected session goes. The second stops the call and lists what is pending, and it fails closed: when it cannot read the app's records, no session archives anything until it is fixed. Archiving from the sidebar myself is not a tool call and stays open to me.

What to copy

Decide what marks a session as yours to keep, and write it down where every session reads it. Look at what the app's auto-archive does before turning it on. Before letting a session archive itself, ask it what is pending: cards it raised, side sessions it started, branches not landed, a review not done, a promise in its last message.

24 October: the sessions the sweep took came back by a rule I gave. The starred ones and the ones used recently were restored, 76 in all. Any session I had told to archive inside its own conversation was left out, and archiving a parent counted for the side sessions it had started, so 17 stayed archived. The other 178 go through a weekly review: each Saturday a scheduled task shows me twenty of them, and the session that gets my answer brings back the ones I name and records each answer.

26 October: the first hook now denies instead of asking, as every house gate does (The house gate has why). A protected session is archived from the sidebar, by me.

Back to top

Four rules against common coding-agent mistakes

A four-principle skill from a Karpathy post, read file by file, installed as a pinned house copy with one rewording for unattended runs, and written into CLAUDE.md so it applies without being called.

The problem

Coding agents make the same mistakes: they assume instead of asking, they build more than was asked, they touch code nobody mentioned, and they call work done without a check. Andrej Karpathy wrote a post about this, and a small repository turned it into a skill. I wanted it reviewed before it went in. I also wanted it to apply in every session, not only when I remembered to call it.

The solution

The review read every file at a pinned commit and found it sound. It went in as a house copy, with one change: a session that is unsure reports instead of stalling, because many of my sessions run with nobody there to answer. The same text went into my CLAUDE.md so it applies without being called. A house file records the source and the change.

How to add it

  1. Read the repository at github.com/multica-ai/andrej-karpathy-skills and the post it draws on.
  2. Copy the four principles into your CLAUDE.md, and reword any stop-and-ask if your sessions run unattended.

    Git Bash, macOS or Linux: the text at the commit I copied

    echo >> ~/.claude/CLAUDE.md
    curl -fsSL https://raw.githubusercontent.com/multica-ai/andrej-karpathy-skills/2c606141936f1eeef17fa3043a72095b4765b9c2/CLAUDE.md >> ~/.claude/CLAUDE.md
  3. Write down the commit you copied and your changes next to it.
Detailed notes: Four rules against common coding-agent mistakes

What happened

On 18 October I asked a session to review and install a small repository, multica-ai/andrej-karpathy-skills, which turns a January 2026 post by Andrej Karpathy on the common coding-agent mistakes into a skill for Claude Code. Four principles: think before coding, simplicity first, surgical changes, goal-driven execution. Nine files, prose only, no hooks, no scripts, no servers.

The review read every file at that day's commit. The guideline text had not changed since January; the repository's commits since April change its README, a banner for the author's product, a translation and a Cursor rule. It declares the MIT licence in two files and ships no licence file. The verdict was sound and safe, with one reservation: the quotes it attributes to the post could not be verified, because the post needs a login to read.

What changed

The skill went in as a house copy under the skills folder, through the same checked flow every skill change here takes, and not through the plugin marketplace the README offers. A marketplace install brings the repository's later commits onto the machine outside that flow, and there was nothing to track, since the text is frozen. A house file beside the skill records the source commit and the one change, so an upstream sync can reapply it.

The change is to the first principle. Upstream says that when uncertain you should stop and ask. Here, sessions run on their own between my messages, and several run on a schedule with nobody to answer, so a stop is a stall. The house version names the reading it takes and proceeds, asks only where a wrong reading would be unsafe or would waste the work, and in an unattended run takes the careful reading, says so, and carries the question into its report. Confusion is still surfaced, never hidden. It no longer blocks the work.

The same day the four principles went into my CLAUDE.md as a section of their own, in the same words, because a skill loads only when a task looks like its description or I type its name, and I would not remember to call it. A change to the text is now made in both places, and the sync carries both to the other coding agent.

Why it earns its place

Most of what the principles ask for, the harness and the house rules already enforced: scope kept to what was asked, and a fix's test shown failing when the fix is reverted. The gain is a compact reminder read before any non-trivial coding, against the two habits that cost the most here: the drive-by edit to code nobody asked about, and the overbuilt answer to a small ask.

What to copy

Read the whole repository at a pinned commit before installing a skill, and write down the commit and your changes next to it. If your sessions run unattended, reword any "stop and ask" so that it reports instead of stalling. And put the text where it is always read if you will not remember to call the skill.

Still open

Nothing on this one. An upstream change to the text, should one come, is reapplied by hand with the house file as the guide.

Back to top

Should I build my own harness? No, I already have one

A reel said to wrap the models in your own software, skills and memory. I already had, in files I own, and the one layer I do not own is the one not worth rebuilding. What the harness here is made of, piece by piece. A later fix to its scan gate, for installers that fetch for themselves, has an entry of its own.

The problem

A reel told me to stop renting the models and build my own harness: my own software, skills and memory around them. It sounded right and I could not tell what it would mean for my setup. I asked a session what it thought. The last line of the reel was an app of the presenter's own.

The solution

The read back said I already own the parts that matter: skills as plain text and scripts, memory in files, rules, hooks and stores. The one layer I do not own is the loop itself, and that is the layer not worth rebuilding. Two follow-ups came of it: a test that ran five skills under the other agent, four unchanged, and a read-only server over my stores that any model can read. No harness was built.

Three nested boxes: the loop in the middle, not mine and left alone; skills, memory, rules and hooks around it, mine in plain text and scripts; my stores outermost, read through one gate.
What I own and the one layer I do not: the loop stays with the people who ship it. A drawn figure with made-up labels, not a screenshot.

How to add it

  1. Count what you already own: your rules file, your skills, your memory folder and your hooks.
  2. Keep them in plain text and small scripts, and test a few under a second agent.
  3. If you want your data readable by any model, put a read-only server with your rules in its code in front of it.
Detailed notes: Should I build my own harness? No, I already have one

What happened

On 15 October I sent a session a one-minute reel and asked what it thought about building a harness. The reel's picture: the models are the processors, the harness is the operating system, the skills are the applications, so wrap the models in your own software, your own skills and your own memory, and stop renting them. Its last line was an app of the presenter's own.

The read back came in three parts. The reel is right about three things: memory belongs in files you own, the Model Context Protocol is the seam between your data and whatever model or harness reads it, and cheap models suit narrow jobs. It glosses over where the personal data it syncs ends up, and "build your own" turned out to mean "install mine". And I already run a harness. I own the outer two rings: skills written as plain text and small scripts that two different coding agents read, and the memory, house rules, hooks and stores around them. What I do not own is the loop itself, the tool calls, the permissions, the compaction and the sandbox, and that is the one layer not worth rebuilding, since open-source loops and an agent SDK already offer it as a library.

So the verdict was not to build one, to keep the owned layers free of any one harness, and to pass on the app for personal data. Two follow-ups started as cards the same night.

What changed

The first follow-up measured the lock-in. Five read-only skills were run under the other coding agent with Claude Code out of the loop. Four ran with their scripts unchanged, and the one failure was that agent's sandbox refusing to run Python. What ties the skills to one harness is convention, a folder path and the names of a few tools, and conventions are cheap to change.

The second was a read-only server over my own stores, speaking the Model Context Protocol, so that any model or harness can read the deal registry, the experiments ledger, the public directory and the memory folder through one gate with the house's rules in its code: codenames only, nothing served from a store it is not allowed to, nothing written. It landed the next day after two review rounds and is registered for both coding agents. It reached the desktop app on 25 October, once I had learned that the app rewrites its configuration from memory and takes a new server only while it is quit.

What the harness is made of

None of it was planned as a harness. Each piece came from one incident, as a small Python script wired to a hook the app already offers, and each is live today.

  • A snapshot of the working tree before any command that can discard edits, and at the end of a turn that changed files, after a history rewrite reset an uncommitted edit in September.
  • A gate that scans any repository a command is about to fetch with NVIDIA's SkillSpector before the fetch runs, and asks on a blocking finding.
  • A one-way sync of the house rules and skills into the other coding agent after every turn, with a short list of exclusions, after that agent's own import had broken paths and model names.
  • A sync of sessions, groups and scheduled tasks between two accounts, after a junction between their folders turned out to be something the app refuses to save through.
  • A guard inside every scheduled task's prompt, so a run happens once per slot and one at a time, after an account switch fired four tasks a second time.
  • The house gates: standing rules that were advice until mid-October, turned into checks before a command runs. A merge or push in a primary checkout by hand, a worktree writing a primary's data, the other agent called by hand instead of through its review route, and an archive touching a pinned or starred session each ask first.
  • The scheduled tasks kept in git and rendered into each account's store, after "the git idea is better" won over editing them by hand.
  • The close-out gate on the archive tools, the readiness check before a sign-out or restart, a hook that files a restored session back into its group, the page check for the sites, and the morning count of sessions that touched one file. The other entries on this page have those stories.

What to copy

Count what you already own before you build a harness. Your rules file, your skills, your memory folder and your hooks are the harness. Keep them in plain text and small scripts that more than one agent can read, test that claim by running a few of them under a second agent, and leave the loop to the people who ship it. If you want your data readable by any model, a read-only server with your rules in its code is the durable seam.

Still open

The stores server has no write path by design, and the skills still assume one folder layout. Both stay as they are until a second harness is in use here.

20 November: an installer the scan gate could not see

The scan gate in the list above missed an installer that runs its fetch as a program of its own. It now reads that installer, and it stops to ask on the skills tool's update and sync, which fetch what a file names: My scan gate now sees an installer that fetches for itself.

Back to top

The checked-off task list under every message

An app update put a pinned, checked-off plan under every message and a recap with one question at the end of a turn. Where it came from, how I read sessions now, and the one trap it brought.

The problem

With many sessions open I could not tell where each one was without reading its messages. A session that found follow-up work described it in prose, and I had to type an answer. When something went wrong I found out late. The messages were the only status there was.

The solution

An app update put a pinned list of planned steps under every message, checked off as the session goes, and a small box at the end of a turn with a recap and one question on buttons. I read the list for status and the messages for substance. Buttons became the way work is offered, which brought one trap: a button outlives the work it offered. The session rules now guard that.

Before: a long message in prose, with the question at its end and the status somewhere inside it.
Before: the status sat in the prose of each message. A drawn figure with made-up labels, not a screenshot.
After: a pinned list of four steps, two checked, one in progress, and a box at the end of the turn with a recap, one question and two buttons.
After: the list under the message and the box at the end of the turn. A drawn figure with made-up labels, not a screenshot.

How to add it

  1. Ask the session to keep its plan in the list and to replace the whole plan when it changes.
  2. Answer a button when it appears or not at all; a late click is a new instruction.
  3. Expect one question per turn, with the recommendation first.
Detailed notes: The checked-off task list under every message

What happened

On 14 October an update to the desktop app changed what a session shows while it works. Under its latest message sits a pinned list of the steps it planned, in short imperative phrases, with the step it is on marked and each finished one checked off. At the end of a turn a small box holds a two-sentence recap of what is now true and, when the next move is mine, one question with one or two buttons that answer it. Nothing was installed for this and no repository was involved: the first session here to show the list ran the app build that carries Claude Code 2.1.295, and every session since has had it.

The lineage is the terminal's. Claude Code has kept a to-do list for itself since 2025, and its public changelog records the terminal's task tools being switched off for the newest models in version 2.1.233. In the desktop app, the list under the message is what a session shows instead.

What changed

I stopped reading the stream of messages to know where a session is. The list is the status, and the recap's first sentence is what the sidebar shows, so a dozen sessions can be read at a glance. The box changed how work is offered: a session that finds a follow-up asks one question and puts the choice on a button, and I answer by clicking rather than typing. That is faster, and it brought one trap, which the entry on one task, one session describes: a button outlives the work it offered. One I clicked hours after it was offered started a second session on a fix that had already landed. So the house rules now say that a session checks the state before it acts on a button, and the close-out gate counts a card nobody has started as pending.

The list also changed how a session starts. The first tool call of any task carries the whole plan, so I see the shape of the work before the first file is touched, and a plan that changes mid-task is replaced whole rather than patched, so the pinned list never shows an abandoned plan.

What to copy

If you work in the desktop app, let the list be your status and read messages for substance. Answer a button when it appears or not at all; a late click is a new instruction to a session that may have moved on. And when a turn ends with a question, it should be one question with the recommendation first. A box that asks two things is a sign the session should have split the work.

Still open

The terminal has no equivalent box, so a session there still reports in prose. The list and the box are the desktop app's own, so this entry has no repository to point at beyond the changelog above.

Back to top

A small model for yes-or-no questions, tested before it is trusted

A typed model that answers a choice, a score or a probability over hundreds of items for cents, installed on 10 October. Where it is used, where it is never used, and the test every step passes first.

The problem

Much of what my sessions do is deciding, not writing: is this search hit the tool it claims to be, does this news story belong in this lane, does this claim match its source. A session reading five hundred items itself is slow and costs what a large model costs. I wanted those narrow questions answered cheaply, and I wanted to know when to trust the answers.

The solution

A plugin brought in a small model that answers only typed questions: a choice from a set, a level on a scale, or a probability. Its first test answered 1,376 identity questions in 47 seconds for under five cents. Both coding agents now reach for it before reading a pile themselves, every step is tested on a locked set before it runs, and every call goes through one client that pins the version, caps the spend and logs the answers. It never touches anything a reader sees and never decides alone.

Five hundred search hits go to the small model with one question, which sorts them into keep, review and reject with a probability each; the session reads the kept ones first, a person reads the review band, the rejected are kept and sampled.
A narrow question over many items: keep, review, reject, and a person on the review band. A drawn figure with made-up labels, not a screenshot.

How to add it

  1. Find the steps where a session reads many items to answer one narrow question per item, and hand those to a small typed model.
  2. Write each question exactly: the condition, what does not count, and a no-match option.
  3. Test on a set the model never saw before you trust it, and keep a review band where a person reads.
  4. Put every call through one client that pins the version, caps the cost per run and per day, and logs each answer.
Detailed notes: A small model for yes-or-no questions, tested before it is trusted

What happened

Much of what my sessions do is not writing. It is deciding, over hundreds of items at a time, whether each one is the thing we are looking for: is this search hit the tool it claims to be, does this news story belong in this lane, does this claim match its source. A session reading a pile of five hundred listings itself is slow and costs what a large model costs. On 10 October I installed TypeSafe's plugin for a model called Jev, which answers typed questions and nothing else: a choice from a set, a level on a scale, or the probability that a condition holds. It writes nothing.

The first test was the directory's identity check, the question of whether a tool's page is the tool. It answered 1,376 of those questions in 47 seconds for under five cents. The same day a loosely worded question showed the other side: asked whether a story about mornings made "claims about time", it said yes with 94 percent confidence, and scored the story zero once the question said what counts.

What changed

Both coding agents reach for it before reading a pile themselves, when the question about each item is narrow and the answer is a label: filter, classify, score, match two records, check a claim against its evidence. They read what comes back in order, and the rest is kept and sampled, never dropped unseen. It is never used on anything a reader sees, never for counts, dates or arithmetic, and never in place of a code review, a security decision or a publishing control.

Every step is tested before it is trusted: tuned on one set, then confirmed on a locked set it never saw, with controls that should come out the other way, the real hard cases, text with planted instructions, and the options shuffled. The probability it returns informs a workflow that is already allowed; it never grants permission, and it alone never publishes, deletes or decides. A step keeps a review band between accept and reject, where a person reads.

Every call goes through one client. It pins the model version, caps the spend per run and per day across every process on the machine, strips invisible characters, refuses anything that looks like a secret, refuses the deal pipeline's folders outright, checks each answer before use, and logs each call without its text. A findings file records every test, what it scored, and what was adopted, so a new use starts from the record. Two steps are live so far: the directory's identity check, where a held row is read by a person, and the morning news desk's lane gate at a confidence of 0.90, which dropped none of 95 cited results and about six percent of the rest, for about a cent a morning. A question written with a line of description per label reads far better than bare labels: one story's hook came back as "story" at 0.99 with descriptions and as "contrarian" at 0.29 without.

What to copy

Find the steps in your own work where a session reads many items to answer one narrow question per item, and give those to a small typed model. Write the question exactly, with what does not count and a no-match option. Test on a locked set before you trust it, keep a review band, and put every call through one client that pins the version, caps the cost and logs the answers. Decide in advance what may be sent to a third party, and keep secrets and private records out.

Still open

Each new step still earns its place one holdout at a time. The findings file lists the candidates not yet tested.

Back to top