How Huginn Works
Huginn runs a continuous agentic loop. You write a prompt, the agent reasons, calls tools (read files, search code, run commands, write files), and repeats until the task is done. You stay in control through per-write approval — you see every diff before it lands on disk.
The agentic loop
You type a request. Huginn:
- Reads relevant files and searches your codebase
- Reasons about what to change and how
- Calls
write_fileoredit_filetools to apply changes - Pauses before each write and shows you the diff
- Continues after your approval — running tests, fixing issues, iterating
No separate planning phase. No explicit “plan then implement” gate. One continuous loop.
Per-write approval
Before any file is written, Huginn interrupts the loop and shows you the diff:
┌─ internal/payment/gateway.go ──────────────────┐
│ + func NewGateway(cfg Config) (*Gateway, error) │
│ + if cfg.APIKey == "" { │
│ + return nil, errors.New("missing api key") │
│ + } │
└────────────────────────────────────────────────┘
[y] approve [n] reject [A] approve all [R] reject all
yapprove — write this file, continue the loopnreject — skip this write, agent sees the rejection and can try againAapprove all — approve this and all subsequent writes in the current taskRreject all — reject remaining writes and stop
Controlling how writes are reviewed
Set diff_review_mode in your config:
| Value | Behavior |
|---|---|
always | Pause and show diff before every write (default) |
auto | Pause only for writes that look risky |
never | Apply all writes without prompting |
Permissions mode
For longer autonomous tasks you can grant broader permissions up front:
huginn --permissions=auto
This is equivalent to diff_review_mode: never — the agent runs to completion without per-write prompts. Use when you trust the task scope and want hands-off execution.
Web UI: artifact review
In the Web UI (huginn tray → localhost:8421), write approval happens through artifact cards. When an agent produces a file change, it appears as a card with Accept, Reject, and Download actions — same approval model, browser-based.