---
title: "Hobgoblin"
description: "Hobgoblin is a coding-agent harness Peter Cappetto is writing in Rust."
canonical_url: "https://www.petercappetto.com/projects/hobgoblin"
source_url: "https://www.petercappetto.com/projects/hobgoblin"
---
# Hobgoblin

Hobgoblin is a growing coding-agent harness I’m writing in Rust. It started as my solution to CodeCrafters’ [Build Your Own Claude Code](https://codecrafters.io/challenges/claude-code) challenge and is growing into an agent that runs inside editors such as Zed over the [Agent Client Protocol (ACP)](https://agentclientprotocol.com/).

I’m implementing ACP directly with Tokio and Serde instead of using an SDK to get more hands-on experience and wrestle with the protocol directly. This has been a challenge, but a lot of fun.

## What it does today

- One-shot prompts and interactive, multi-turn conversations in the terminal
- Model-directed tools for reading files, writing files and running shell commands
- An ACP server that creates sessions and runs prompt turns, tested in Zed
- Deterministic tests that run against a scripted model

Next up is cancelling a prompt while it’s running. I am currently working on the 7th of 9 milestones. After that, the sky is the limit. I plan to add streaming and evals afterwards. Have any ideas? Let [me know](mailto:peter@petercappetto.com)!

The code is on GitHub at [pcapp/hobgoblin](https://github.com/pcapp/hobgoblin).
