Bring Your Own Harness
Bring Your Own Harness
2026-07-21
Every so often, you access some random machine: the VM hosting a silly side project,<br>the Raspberry Pi running a toy robot, a friend’s laptop.
Installing a coding agent there is certainly possible, and sometimes worthwhile. But<br>should you really spend the time to install, log in, and manage your authentication once<br>you are done with your task, just to ask Claude how to restart a system daemon? Maybe you<br>shouldn’t. Maybe you should Bring Your Own Harness.
Just two loops
Coding agents, at their core, are quite trivial to implement: roughly two nested loops.
history = []<br>while prompt := input("> "): # human → agent<br>history.append({"role": "user", "content": prompt})<br>while True: # agent ↔ tools<br>reply = model(history, tools=TOOLS)<br>history.append(reply)
if reply.text:<br>print(reply.text, end="")
if not reply.tool_call:<br>break # agent is done
result = run_tool(reply.tool_call)<br>history.append({<br>"role": "tool",<br>"tool_call_id": reply.tool_call.id,<br>"content": result,<br>})
Do you really need to install a 200 MB binary?
Casper 👻
Casper is a coding agent that fits into<br>a single file. Given an API key you already have (OpenAI, Anthropic, or Google), you can<br>run it with a single command:
curl -fsSL https://raw.githubusercontent.com/ziggy42/casper/main/casper.py | ANTHROPIC_API_KEY=... python3
Casper in action.
Or avoid leaking the key in your shell history and provide it when Casper asks for it at<br>runtime.
It does not support any “advanced” features, such as loading skills, confirming<br>destructive commands, automatically compacting context, and many more. But you get a<br>coding agent running in a couple of seconds: no installation, no nothing.
It will happily run commands, so use it only on machines where you are comfortable<br>giving it that level of power.
I’ve ended up using this little thing far more than I expected.