Has anyone used an open coding agent in headless mode? I have a system cobbled together with exceptions going to a centralized system where I can then have each one pulled out and `claude -p`'d but I'd rather just integrate an open coding agent into the loop because it's less janky and then I'll have it try to fix the problem and propose a PR for me to review. If anyone else has used pi.dev or opencode or aider in this mode (completely non-interactive until the PR) I'd be curious to hear.
EDIT: Thank you to both responders. I'll just try the two options out then.
Been using pi exactly for this and it's working great!
pi has an RPC mode which just sends/receives JSON lines over stdio (including progress updates, and "UI" things like asking for confirmation, if it's configured for that).
That's how the pi-coding-agent Emacs package interacts with pi; and it's how I write automated tests for my own pi extensions (along with a dummy LLM that emits canned responses).
You probably want to look into pi then - it's extremely extensible.
you can run https://block.github.io/goose/ in headless mode (I work on goose)
fast-agent lets you do this as well (and has a skill in its default skills repo to help with automation/running in container/hf job).
Aider's `--yes` flag combined with a git-based loop works honestly better than I expected for this, like it'll just commit and you review the diff. Pi I've tried headless and it's fine but you kinda have to wire up the exit conditions yourself since it's so minimal by design.
Fwiw the janky `claude -p` approach you described is actually pretty solid once you stop fighting it, the simplicity is the feature I think.