Move 37

Docs

How Move 37 works, one part at a time.

TUI harnesses.

A citizen is an agent session you have given a name and a home. Every citizen works inside a coding agent with a terminal interface (a TUI), such as Claude Code or Codex. That agent is the citizen’s harness. Move 37 starts it, passes it your messages and shows you what it does; the harness does the work with its own tools.

The harnesses Move 37 starts

Move 37 supports three harnesses: Claude Code, Codex and Pi. It runs the copy of each that is installed on your machine, signed in with your own account. This is the command it starts, and what that means for a tool call:

HarnessMove 37 startsBefore a tool call
Claude Codeclaude --dangerously-skip-permissionsRuns it without asking
Codexcodex -a never -s danger-full-accessRuns it without asking
Pipi, adding a model only when your Pi settings name noneFollows your Pi settings

Claude Code and Codex start with their permission prompts off, so a citizen keeps working while you are away instead of waiting for you to approve each step. Move 37 adds no rules of its own in their place: if you want a limit, you set it with a hook.

Limit what a citizen runs with a hook

A hook is a command the harness runs just before each tool call. It sees the call (the tool and its input) and can refuse it, with a reason the citizen reads and answers. Hooks keep working with permission prompts off.

A hook belongs to the harness, not to Move 37. One you add to a harness’s user settings applies to every citizen on that harness and to the sessions you start yourself, until you remove it. A hook in a project’s own settings applies only inside that project.

HarnessUser hook settingsEvent before a tool call
Claude Code~/.claude/settings.json, under hooksPreToolUse
Codex~/.codex/hooks.jsonPreToolUse
PiAn extension in ~/.pi/agent/extensions/The tool_call event

When it starts a citizen, Move 37 adds its own entries to ~/.codex/hooks.json and ~/.claude/settings.json, each running hooks/harness-event.sh and marked # pfc:harness-event-hook. They only report what the citizen does and never refuse a call. Leave them in place and add yours beside them.

Example: refuse a force push

A force push rewrites a branch other people may rely on, and a citizen working alone has no one to stop it. These steps add a hook that refuses a forced git push (--force, -f or a +branch) in Claude Code and Codex, and lets every other command run, --force-with-lease included, since it refuses to overwrite work it hasn’t seen. You need python3. Both harnesses call their shell tool Bash and pass the command as tool_input.command, so one script and one settings block serve both.

  1. Create a folder for the script with mkdir -p ~/.config/move37, and save this in it as no-force-push.py. The harness sends the call as JSON on standard input. Exit code 2 refuses the call, and the text on standard error is the reason the citizen gets.
    #!/usr/bin/env python3
    import json, re, sys
    
    REASON = "Force-pushing is turned off. Push to a new branch instead."
    
    call = json.load(sys.stdin)
    command = (call.get("tool_input") or {}).get("command", "")
    if re.search(r"\bgit\b[^;&|]*\bpush\b[^;&|]*\s(--force|-[a-z]*f[a-z]*|\+\S+)(\s|$)", command):
        print(REASON, file=sys.stderr)
        sys.exit(2)
    sys.exit(0)
  2. Try the script on its own. This prints the reason, then 2:
    echo '{"tool_input": {"command": "git push --force"}}' \
      | python3 ~/.config/move37/no-force-push.py; echo $?
  3. Add the hook to ~/.claude/settings.json for Claude Code, ~/.codex/hooks.json for Codex, or both; the two files take the same shape. If the file doesn’t exist, save this block as it is. If it does, keep everything in it: add a hooks object if it has none, a PreToolUse list inside that if it has none, then add the group (the object with matcher) to the end of the list.
    {
      "hooks": {
        "PreToolUse": [
          {
            "matcher": "Bash",
            "hooks": [
              {
                "type": "command",
                "command": "python3 ~/.config/move37/no-force-push.py"
              }
            ]
          }
        ]
      }
    }
  4. For Codex, approve the hook once. Codex runs a new hook only after you review it, and until then it stops at that review when it starts, for a citizen too. Run codex in your own terminal, approve the new hook when Codex asks, then quit. Codex keeps the approval in ~/.codex/config.toml, which citizens share. It approves the settings block, not the script, so you can edit the script later without approving again. Move 37 approves its own entries for you.
  5. Choose Reset at the top of the citizen’s chat. Reset starts a fresh session of the harness, which loads the hook; it also gets a Codex citizen moving again if it stopped at the review.
  6. Ask the citizen to run git push --force --dry-run, which pushes nothing even if the hook is missing. The call is refused, and the citizen replies with your reason.

A hook that fails doesn’t protect you. If the script crashes (an uncaught Python error exits with 1) or exits with any code other than 2, Claude Code runs the call. Test each change to the script on its own, as in step 2, before you rely on it.

Hooks in Pi

Pi takes code instead of a command: an extension in ~/.pi/agent/extensions/ that handles the tool_call event and can refuse the call. The script above doesn’t plug into it as it is. Pi’s link in the table above leads to its extension documentation.