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:

  1. Reads relevant files and searches your codebase
  2. Reasons about what to change and how
  3. Calls write_file or edit_file tools to apply changes
  4. Pauses before each write and shows you the diff
  5. 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
  • y approve — write this file, continue the loop
  • n reject — skip this write, agent sees the rejection and can try again
  • A approve all — approve this and all subsequent writes in the current task
  • R reject all — reject remaining writes and stop

Controlling how writes are reviewed

Set diff_review_mode in your config:

ValueBehavior
alwaysPause and show diff before every write (default)
autoPause only for writes that look risky
neverApply 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.