Release notes
Hax v0.5.0
Added
hax --json(implies-p) streams new conversation records as JSONL, followed by aresultrecord with the outcome, final text, cost, and session id. Plain-poutput is unchanged, and the session-file schema is now a supported read surface. See docs/sessions.md.- A resumed one-shot run no longer requires a prompt:
hax --resume=ID -p(or--json) continues from where the conversation stopped. - Codex
/loginnow offers a local-browser OAuth flow for organizations that block device login; the device flow remains available for ssh sessions. See docs/providers.md. - Provider blocks accept
metadata_apito select the/modelsprotocol independently of the request protocol. All user-facing providers now also honor per-providersort_modelsandcatalog_idsettings. See docs/providers.md. extra_headerscan override or remove provider defaults and interpolate the stable{session_id}for gateways that route or cache by conversation. See docs/providers.md.
Changed
- Anthropic-protocol models on OpenCode Zen/Go and
anthropic-compatibleendpoints now use prompt caching and choose adaptive or budget thinking from model metadata, as first-party Anthropic now does.thinking_modeaddsauto(the default) andprefer-adaptive. - One-shot runs stop cleanly on signals: SIGINT or SIGTERM interrupts the run with status 130,
while SIGUSR1 pauses at the next turn boundary. Completed work remains resumable,
--jsonemits a final result when possible, and a second signal still kills immediately. See docs/usage.md. max_turnsnow bounds one-shot runs as well as interactive turns. Its default isauto: unlimited interactively and 100 in one-shot mode.- Token counts and their
k/mconfig suffixes now use decimal units; byte sizes remain 1024-based. For example,context_limit: "272k"means 272000 tokens. catalog.modelsoverrides now take precedence over live provider metadata and may be scoped by runtime provider id. This allows codex context overrides without changing OpenAI metadata; the model picker shows both the served window and its reported ceiling. See docs/providers.md.- Skill discovery now searches
.agents/skillsfrom the current directory to the repository root, then~/.config/hax/skillsand~/.agents/skills; the nearest same-named skill wins. See docs/usage.md. - Provider routing and prompt-cache keys now remain stable for a conversation across restarts.
OpenRouter sends this id as
x-session-id, and/newstarts with a fresh id. - The first-party
openai,anthropic, andopenrouterproviders pin their protocol along with their endpoint:providers.<id>.apinow warns instead of switching the wire. Usemodel_apisfor per-model protocols, or a custom provider. - The
providers.openrouter.titleandproviders.openrouter.referersettings and theirHAX_OPENROUTER_*aliases are gone; override or remove the attribution headers throughproviders.openrouter.extra_headers. See docs/providers.md.
Fixed
- OpenCode Zen and Go now send the required
x-opencode-sessionheader; requests without it may fail starting 2026-09-06. - Chat Completions streams now retry upstream failures signaled through
errorornetwork_errorfinish reasons and report an error after retries, instead of returning an empty success. - Interactively resumed interrupted conversations now show the resume hint and accept empty Enter to continue.
- OpenCode Go usage-window limits now surface immediately instead of triggering futile retries.
- The retry indicator shows the active attempt after backoff instead of remaining at "retrying in 1s" while the request is in flight.