LHT long-horizon tasks
LHT (long-horizon task) helps Code mode run multi-step engineering work across many turns without losing the plot.
What you get
- Checklist sidebar when the model uses
checklist_write - Long-horizon panel with macro/micro progress and cycle handoffs
- Optional early cycle bands when context pressure rises
Think of LHT as structured pacing for refactors, test sweeps, or audit fixes — not for one-shot questions.
When to use LHT
| Good fit | Poor fit |
|---|---|
| Multi-file refactor with verification | Single-file typo fix |
| CRAFT-style review loops | Office DOCX delivery |
| Hours-long guided implementation | Quick web search |
Settings
Settings → LHT settings mirrors the panel’s four sections: harness presets, long-horizon harness, completion gate, macro review loop — full field reference in LHT settings (composer overrides, defaults, disabled states, config.toml map).
Click the LHT chip above the composer to cycle LHT → LHT·strict → LHT·off (per-turn override; with an active session this writes the thread overlay — no sidecar restart).
Since v0.8.6:
- Presets
long-refactor/long-fixwrite product verify gates in enforce mode (code-default/craft-auditstay observe). - Completion-gate toolchain verify emits a live running status so the UI does not sit on “generating” forever.
- Portable gates: Gate-as-Code; unattended batches: Night queue.
UI location
Enable the audit grid for checklist, audit scratchpad, LHT graph, and sub-agents together (UI tour). Title bar Show/Hide audit grid appears in Code when harness data exists.
Related: Gate-as-Code · CRAFT · Context usage · Code mode