Building a coding agent
8 posts, in reading order. Drafts are previews until they ship.
- 1 An agent loop is a while loop with good manners One agent turn, dissected: exits, breakers, and recovery paths are the actual engineering — in a loop whose own codebase bans the while statement.
- 2 Error messages are prompt engineering now In Efferent, tool failures correct the current turn and gate findings brief the next attempt. The placement, shape, and recovery verb matter more than the exception text.
- 3 A quality bar is a workspace artifact, not a prompt Smith profiles a repository in conversation, dry-runs the blast radius, vendors the chosen rules into the project, and locks legacy debt behind a line-sensitive ratchet.
- 4 A check that already passes cannot measure the work The spec agent's acceptance checks run the moment they're proposed — any that pass on the untouched workspace bounce the draft back, because a check that starts green would accept a no-op run.
- 5 The whole permission model is one folder Smith confines file tools to the workspace, runs Bash with the workspace as its only writable mount, protects harness state twice, and fails closed when bubblewrap is unavailable.
- 6 Pay for the index, not the book: extending an agent with markdown on disk Smith exposes skill names up front, loads bodies on demand, lets workspaces shadow bundled procedures, and graduates corroborated memory into the same mechanism.
- 7 The model role, not the model id — and why 'code' earns its own tier Smith routes refining, implementation, and one-shot helpers through three role-scoped views of one live settings store; the agent code never learns a provider name.
- 8 Retry is not a policy Efferent retries only failures that can move, refuses multi-hour Retry-After sleeps, rejects empty 200s, and stops replaying a stream the moment content escapes.