@FlorinIluta Agreed, but let's design for failure, too. When something breaks, the user needs a clear signal of what went wrong, enough to debug it or decide to retry, not just a dead end.
Got asked a sharp question about a pattern I used in my AI harness: git-committed files (feature_list.json, progress logs) as a single source of truth for agent state. "What happens when session B reads it mid-write, is there a lock, or do you just commit fast and hope?"
What actually works: sequential ownership (one writer per feature, sync point = the commit) or atomic writes (temp file + rename). For concurrent sessions, skip shared-live-file entirely: use separate worktrees, sync via commit + rebase, so a collision surfaces as a merge conflict, not silent corruption.
No lock since git commits are atomic, but the working-tree write isn't; a naive read mid-write can catch a torn file. In practice, you avoid this with sequential ownership (one writer per feature, sync point = the commit) or atomic writes (write to temp, rename).
For two live sessions, I'd skip shared-live-file entirely: separate worktrees, sync via explicit commit + rebase, so a collision surfaces as a merge conflict, not silent corruption, but that's far ahead of this PoC.
I built a harness from scratch for an AI coding agent — then split one task across two sessions that shared zero chat context.
Zero drift. Zero redefinitions. Here's what it took to get there. 🧵
@ConnorTalksAI Hey! Building AI tooling — just wrote a case study on running Claude as a coding agent inside a governed harness (ledger-cli, a TS CLI project). Always good to connect with people shipping in AI right now 👋
@LocalAiCherry Hey! Building AI tooling too — just wrote a case study on running Claude as a coding agent inside a governed harness (ledger-cli, a TS CLI project). Different corner of the "local AI" space than on-device models, but always good to connect with people shipping in AI right now 👋
@omarsar0 I think that knowing how to build a harness is important, whether you do it from scratch, manually or AI-assisted, or if you tune an implementation from others. The important part is to be able to adapt the tool to your specific domain so the agents can work with more precision.
Buen artículo! El archivo de progreso ayuda, pero solo si ya no queda nada por redefinir; si la sesión 2 arranca con las shapes/contratos todavía abiertos, el handoff tapa el vacío de contexto, pero no evita que decida algo distinto a su manera. El archivo alcanza cuando lo que faltaba resolver ya estaba congelado antes, no después.
@alvarombt Mientras más capas de abstracción agreguemos en el proceso, más relevantes se vuelven el discovery previo, las herramientas, constraints y guidelines que armemos alrededor de los agentes para que implementen correctamente.
@49agents A file both sessions read: git-committed, not a memory layer. Session B's instructions were to treat it as the only source of truth for session A's state, assuming nothing beyond it.
Three things, outside any chat: a sprint contract written before either session touched code; it froze the exact shape of the error classes so there was nothing left to redesign when session B picked it up.
A handoff file scoped to exactly what session A did/left undone. Session B's instructions were to start from that file only, no other assumptions.
A feature list as the single status source of truth, so neither session could unilaterally decide something was "done." The evaluator later diffed both sessions' commits and confirmed the error classes were created once and never touched again.
@MannaCodeAI Different failure mode, though: you're keeping continuity alive within one session's memory. This was zero shared chat between two separate sessions, so the handoff file had to carry everything, not just fill gaps left by compaction.
@FlorinIluta Yeah, but the handoff file wasn't carrying it alone. It only had to hold the delta because the contract had already frozen the data shapes upfront. Without that contract behind it, I don't think the handoff file alone would've been enough.
Full breakdown — real prompts, real commits, real code — 🔗 [https://t.co/1FV4rnm3IA]
If you're building anything with coding agents, worth the 10 min read.
Next problem: tests passed, but "tests pass" ≠ "repo left in a consistent state." Added a clean-state checklist the evaluator has to run before closing any session — build, tests, and an accurate progress log, checked in that order (commit hash depends on the file describing it).
The whole exercise in one line: a harness is the answer to "what does the next session need to know so it doesn't repeat or contradict what's already decided?" Not trusting declared state without checking evidence yourself is the habit that holds everything else up.