docs · project

Release notes#

The latest release is Hekma 0.11.0, from 17 October 2026. It adds ACP agents, cached-token metering and detached agents that stay in one run across commands, and deprecates the hermes kind. Each release below lists its highlights, anything that breaks, and what to do when you upgrade. The full commit lists are on GitHub Releases.

Unreleased#

Unreleased: after 0.11.0. Everything in this section is merged on Hekma's main branch and ships in the next release.

Highlights

  • Runs. Every supervised start is now a Run with a run id (run_ and a ULID), a Control Depth, a Run Status that follows the agent's lifecycle, and the failed and breach Anomalies. hekma run show prints one. See Runs, Control Depth, ps and top.
  • Child Runs. hekma run open --parent NAME, hekma run close and hekma run show (and /v0/runs on the Control API) let a Host open a Run for one unit of its own work. A child's usage counts on every ancestor, every ancestor's ceilings apply to it, and its own ceilings take warn. Runs nest at most 8 levels. See Child Runs.
  • Labels. hekma agent config set NAME labels.KEY VALUE binds a label on the agent's Runs. hekma label set and hekma label remove bind and unbind labels on one Run, an agent's open Run, or every open Run a --selector key=value[,…] matches, with a confirmation for several matches (--yes; refused without a terminal), --dry-run, one result per Run and --json. A label set with the verb outranks the configuration and caller labels, and a caller can never set a bound key. See Bound labels.
  • hekma ps. Lists the Runs that need attention, newest first: a Run is listed when it carries an Anomaly (an ended Run only within seven days of its end) or a held, silent or stale status. Healthy open Runs are counted in the footer, and --all, --selector, --limit and --cursor widen, filter and page the listing without duplicates. Each row carries the Control Depth, Status, Anomalies with each latched Breach Action (breach[block]), labels, subtree usage, and headroom against the resolved limits. It is a read-only read that starts no host. GET /v0/runs serves the same document, and /v0/events frames gain id: <seq>, a ?selector= filter and Last-Event-ID resume. See hekma ps.
  • Selectors on the lifecycle verbs. hekma agent stop, pause, resume and drain and hekma run close take an agent, a run id or --selector, with --dry-run, --yes and --json. On the Run that owns an agent's process the verb is the agent's own. A child Run is refused per Run, naming its depth, because its lifecycle acts on calls Hekma cannot hold or reject yet, and the others still act. A set of several Runs is confirmed on a terminal only, and every verb prints one shared per-Run results document, with the first failure's exit class. See Verbs at scale.
  • hekma budget show|set. show reads a Run's limits, each with its source, usage, headroom, the Breach Action and the latches. set writes limits on the Run itself (--tokens-per-run, --tokens-cumulative, --dollars-per-run, --dollars-cumulative, --breach-action, --clear). A limit set on a Run outranks the agent's budget.* configuration and every Policy, and belongs to the Run: it ends with the Run, and a new start opens a new Run without it. Every result says so. See Limits on a Run.
  • Policies and the warn default. hekma policy list|show|create|change|delete (and /v0/policies on the Control API) set Token Budgets, Cost Caps, a flat Rate and a Breach Action for every Run a --selector matches by bound label. Each limit resolves on its own: a malformed breach_action fails closed to pause first, then explicit limits on the Run or the agent, then the most specific matching Selector (a tie goes to the tightest value), then the stored, editable default Policy. The default Breach Action is now warn: a breach with no Breach Action configured is recorded, raises the Run's breach Anomaly and is published, and acts on nothing. See Policies and the warn default.
  • Run Keys. Every supervised launch gets its own Run Key in HEKMA_RUN_KEY (32 bytes from the OS random source, no fallback; revoked when its process exits, so each Restart Policy relaunch has a fresh key), and POST /v0/runs returns a child Run's Run Key and refresh credential once (issue_credentials: false opts out). A Run Key acts as its Run's Caller: it opens child Runs beneath its Run (at most 1000 open per parent), closes them and tightens their limits — never raises — and nothing else (403 run-out-of-scope/forbidden); a supervised agent's key is loopback-only. POST /v0/runs/refresh trades a refresh credential once, and reusing one revokes the Run's current pair and raises the credential-reuse Anomaly. hekma run revoke-keys [--no-cascade] revokes a Run's keys and, by default, every key issued under them, refused from the next request and durable across a hard kill; hekma run keys lists token ids, classes and states read-only; hekma run open --print-key prints a child's pair once (without it none is issued). Credentials are stored as SHA-256 hashes and shown once; one in a URL is refused (400 credential-in-url, and on the metering listener a typed proxy-wire v1 refusal) and revoked, and the listener strips x-hekma-run-key before forwarding. The reserved run.key/run.refresh_key config keys accept env targets only and cannot be set. See Run Keys and key custody.
  • The CLI routes every write through a local Service Host. register, remove, start, stop, pause, resume, drain, send, config set and memory attach|detach are each one call to the Service Host that owns the state directory. When none is running, the first write starts one in the background (hekma serve --autostart, logging to serve.log) and waits up to 10 seconds for it. Reads (list, show, usage, logs, config get) open state.db read-only and never start a host, so on a fresh machine hekma agent list creates nothing. See How the CLI reaches the Service Host.
  • Agents outlive the terminal. A plain hekma agent start keeps the agent running, supervised, metered and within its budget, after the command and its terminal exit, and send now reaches an agent a separate start command started. The background host ignores SIGHUP, and drains and exits once no agent is live and no command has reached it for 30 seconds, or when its state directory is deleted. --detach still means the agent also survives the host's exit; an engine-observed detached start is still refused (exit code 5).
  • hekma serve, a long-running host that adopts every agent in a state directory and supervises it until it gets SIGTERM, then stops each agent through the graceful stop sequence. A lock file refuses a second host on the same directory. Also available as a standalone hekma-host binary. Every serve binds a loopback local endpoint recorded in an owner-only control.json. See Run Hekma as a service.
  • Control API v0: a local HTTP and JSON API for the fleet, lifecycle, config, live events, Runs and labels. With --listen and --bearer-secret, hekma serve also answers on an address you choose. Newer routes cover send, memory attach and detach, the restart policy, drain, Runs (/v0/runs) and labels (/v0/runs/{id}/labels), the lifecycle verbs and limits of one Run (/v0/runs/{id}/stop, pause, resume, drain and limits), Selector sets (POST /v0/runs/select, then one call on the set) and Policies (/v0/policies). It is marked unstable. See Control API.
  • Outbox export: one durable, acknowledged journal of every event across all agents, read through the Control API. See Export.
  • Telemetry export: hekma serve --otlp-endpoint URL sends token usage, budget breaches, derived cost and lifecycle state to an OpenTelemetry collector over OTLP/HTTP+JSON. Off by default: with no endpoint, nothing leaves the machine. See Telemetry export.
  • The wire fence: budget.breach_action = block, never a default, on agents whose usage is read off the wire. On a breach, the metering listener refuses the agent's further model calls with HTTP 402 and a typed, non-retryable error, while the agent keeps running. The fence lifts when the Run ends, or when the ceiling is raised above the totals. See The wire fence.
  • New adapter declarations (adapter contract 1.1.0, additive): a readiness probe that gates starting → running, a liveness check that fails an unresponsive agent, exit-code classes (restart_requested and clean), a pause and resume command pair the agent runs itself, and a drain section. A manifest without them behaves as before.
  • hekma agent drain NAME [--timeout-ms MS] runs the agent's pause command, waits up to a bound for its idle signal, then stops it. Both outcomes exit 0: a drain that runs out of time still stops the agent and reports completed: false. See hekma agent drain.
  • Restarts count only real failures. A crash after at least 30 seconds of continuous running resets the consecutive-failure count first, and a declared restart_requested exit is relaunched without counting as a failure.
  • Governance vectors: a versioned, checksummed JSON file of worked budget and cost decisions, generated from the engine's own decision code, so a Host that enforces money itself can prove it decides the same way. They are at 1.4.0 with 69 cases: 1.3.0 added a policy case kind and 1.4.0 a rearm case kind, both appended after the unchanged earlier cases, and 1.4.0 later appended six Caller-layer policy cases, so a consumer pinned to an older version keeps its verdicts. hekma agent governance-vectors [--json] prints it. See Governance vectors.
  • The adapter gallery and agents in CI: one page per agent that runs under Hekma today, and a recipe for a budget-capped agent in GitHub Actions, which sets stop explicitly now that the default is warn. See Adapter gallery and Agents in GitHub Actions.
  • Log capture modes: hekma serve --log-capture full, metadata or off.
  • Hosted agents get a minimal environment: under an explicit hekma serve, an agent sees only the variables its adapter declares, plus PATH and HOME (and a few Windows system variables). A host the CLI starts passes on the environment of the command that started it, as the CLI always did.
  • Static Linux build: an x86_64-unknown-linux-musl archive with hekma, hkm and hekma-host, and a container recipe that runs it FROM scratch.
  • logs --follow shows the backlog: it starts with the last 200 raw lines a detached agent wrote while no command was running. Set HEKMA_LOGS_BACKLOG_LINES to change the number.
  • Wider tables: hekma agent show, usage NAME and config get no longer cut a header short, and their value columns grow with the terminal (from COLUMNS, else the terminal's width, else 80 columns, or 79 on Windows, clamped to 40 to 132). list keeps its 80-column layout; --json is unchanged.

Breaking and changed behaviour

  • The default Breach Action is now warn. An agent with no budget.breach_action no longer pauses at its ceiling; the breach is recorded, marks the Run with the breach Anomaly, and is published. Agents that relied on the old implicit pause keep it: the first open of the upgraded state directory writes budget.breach_action = "pause" into their configuration, records one breach_default_upgraded event, and shows a "kept on pause by upgrade" note until a Breach Action is set explicitly. An agent whose configuration cannot be written still pauses, and a malformed breach_action fails closed to pause. If a job should end at its cap, set stop explicitly.
  • A raised ceiling now lifts on a live Run, from every path. A ceiling raised above the totals, by hekma budget set, an agent budget.* or cost.rate.* configuration write, or a Policy change, re-arms its breach and lifts the matching block fence reason at once, reason by reason. A ceiling lowered to or below the totals breaches at once and applies the Breach Action. Before, a raised configuration ceiling waited for the Run to end.
  • hekma label --selector --dry-run refusals print on stdout. They read Run <id> would refuse (<code>): <reason>, as on every set-taking verb; they used to read Run <id> not labeled: <reason> on stderr. The --json document gains verb: "label".
  • A non-loopback --listen requires TLS. hekma serve --listen 0.0.0.0:8477 … without --tls-cert and --tls-key (PEM files) is refused with exit code 2 before anything binds; it used to serve plain HTTP with a warning. With both, the listener answers HTTPS only. hekma-host takes the same flags. See TLS.
  • Per-run budgets no longer reset when a crashed agent is relaunched. A restart policy relaunch now continues the same Run: the run id, the per-run totals, a recorded breach (a fired pause or stop is applied again) and a per-run block fence carry across the crash. Only start opens a new Run. If you relied on a crash resetting a per-run budget, raise the ceiling, or stop and start the agent.
  • Event order on a breach changes. The event stream and the export now show the usage event, then every breach it fired, then the pause or stop transition. It used to be usage, the token breach, the pause, then the dollar breach.
  • A breach fires once more when the breach action changes mid-Run. Changing budget.breach_action after a breach fires it again, once, under the new action. Switching to block after a breach therefore records a block breach, and the fence survives an engine restart.
  • Reads never write. When list or show finds a running or paused agent whose process is gone, it shows failed, with a cause naming the pid, keeps the stored state in the new recorded_state JSON field, and says so on stderr. The next write records the change.
  • A busy database fails faster. A write waits at most 1 second (it was up to 5) for the database, then fails with a typed Busy error and is not applied, so a retry is safe.
  • stop --timeout is served within 1 to 86400 seconds; 0 becomes a 1-second window, with a note.
  • start, stop and drain bodies on the Control API must be JSON objects. A bare array such as [true], [30] or [1500], which used to be read as the body's first field, is now 400 invalid_body, naming the shape it expects. No body still means each verb's default.
  • Auth on the Control API checks every credential through one resolver: the local endpoint's token and the --bearer-secret value are both operator bearers and work on both listeners, and 403 forbidden is reserved for a credential a surface does not allow.
  • Run Keys answer by class. The operator bearer is refused on POST /v0/runs/refresh; a supervised Run's key is refused on a non-loopback --listen listener; 401 now carries the code unauthorized or credential-revoked, and 403 forbidden. New error codes: run-out-of-scope (403), too-many-children (409), credential-unavailable (503) and credential-in-url (400). Unrecognised presentations produce at most one diagnostic a minute, counts only. A credential event kind (issued, rotated, revoked, reuse-detected) records every credential change, and limits-changed gains limits_layer (run or caller).

Fixes

  • hekma agent stop of a paused agent, and hekma serve's shutdown, now resume the agent before the graceful stop, so it gets a real SIGTERM instead of always being killed. Paused agents also take part in the host's shutdown drain.
  • Concurrent hekma agent config set commands no longer lose each other's keys; a per-agent lock file (config.toml.lock) serializes them.
  • A benign command such as hekma agent list no longer adopts, and later stops, an agent that a live engine elsewhere (a hekma serve, an embedding program) is still supervising.
  • When the engine lets go of a paused detached agent that has already died, the recorded cause is now honest about whose process it was: one this engine started and a signal killed reads "terminated by signal", and only an agent adopted from an earlier engine, whose exit code this engine cannot read, keeps "exit code unavailable — adopted process is not this engine's child".
  • An adopted engine-observed agent no longer loses usage after the metering listener restarts its sequence.
  • If Hekma changes an agent's state but cannot write the matching line to instance.log, it now puts the state back, so the database and the log never disagree. The error says so.

Upgrading

  • state.db migrates one way. The first open by the new release upgrades the database from schema 9 through schemas 10 (the engine process supervising each started agent), 11 (which engine re-adopted an agent whose supervisor died), 12 (transitions, breaches and the export outbox move into the database; instance.log, breaches.log and the outbox files are imported once, and the outbox files are renamed *.migrated), 13 (Runs: each running agent's live Run keeps its id, every other recorded run becomes an ended Run), 14 (each bound label records its origin), 15 (Policies), 16 (three partial indexes for the Run listing) and 17 (Run Key hashes: the tokens table and three indexes). An older Hekma refuses the upgraded directory. Stop any running hekma serve or embedding program before you upgrade: one already running does not notice the upgrade, and its transitions, breaches and export entries after it are lost, though the usage it records is counted.
  • instance.log and breaches.log are still written after each commit, as mirrors. Export sequence numbers are now global across every engine process sharing the state directory.

For embedders

  • hekma-engine moves from 0.7.0 to 0.12.0 on main, through five steps: 0.8.0 (the host's options and the export methods), 0.9.0 (governance vectors and governance::decide, additive), 0.10.0 (BreachAction gains Block), 0.11.0 (no public types change, only the storage, the event order and the outbox contract) and 0.12.0 (the Run model: EngineEvent gains Run, the governance Case gains Chain and CoverTag gains AncestorCeilings, and RunId::mint returns the ULID shape). Policies, hekma ps and hekma budget change the 0.12.0 surface further, below. See Upgrade notes.
  • New engine surface: Engine::open_read_only, Engine::drain, open_child_run, close_run, run, label_run, select_runs and instance_run, and the Run types (RunRecord, RunView, RunEvent, RunError, ControlDepth, RunStatus, Anomaly, Label, LabelOrigin, Selector). Also new: Engine::policies, policy, create_policy, change_policy and delete_policy; Engine::list_runs and subscribe_sequenced with the listing types, the cursor codec (encode_cursor, decode_cursor) and event_subject_labels; the Run verbs stop_run, pause_run, resume_run, drain_run, plan_run_verb, select_run_summaries, set_run_limits and run_limits_view; the pure governance::rearm; and, with Run Keys, Engine::authenticate (synchronous), credential_state, the Caller-acting open_child_run_as, close_run_as and set_run_limits_as, refresh_credentials, revoke_run_keys, revoke_exposed and run_keys (async, with blocking twins), the credential types (RunActor, OpenedRun, IssuedCredentials, CredentialMatch, CredentialSummary, RevokeOutcome, CredentialEvent, TokenClass, TokenHash), parse_presented, scan_url and the reserved-key constants.
  • Exhaustive enums gained arms that a match needs to handle: TransitionCause (ReadinessTimeout, Unresponsive, RestartRequested, CleanExit, PauseCooperative, ResumeCooperative, DrainStopped), EngineError (PauseCommandFailed, DrainRefused, DrainBoundInvalid), StoreError (NeedsMigration), and RegistryError (OutboxOpenRefused, ServeOptionsOpenTimeOnly). Within the unreleased 0.12.0, EngineEvent gains Policy, BreachDefaultUpgraded and Credential, Anomaly gains UnpricedModel and CredentialReuse, RunError gains PolicyNotFound, PolicyExists, PolicyDefault, ScentUnavailable, InvalidCursor, ScopeUnavailable, RaiseForbidden, VerbUnavailable, RunOutOfScope, CredentialRevoked, CredentialUnknown, CredentialUnavailable and TooManyChildren, EngineError gains CredentialUnavailable, RunEventKind gains LimitsChanged, Case gains Rearm, CoverTag gains ReArm, and LimitSource gains Caller. RunLimits gains token_cumulative and dollar_cumulative_micros, RunEvent gains limits, prior_limits and limits_layer, ChildRunRequest gains issue_credentials (struct literals need the new fields), and FleetEntry gains breach_default_upgraded (additive). SpawnSpec gains inherit_env, SpawnRecord gains owner, and ProcessBackend gains self_fingerprint and probe_alive.
  • Older readers break on new events. The run, policy, breach_default_upgraded and credential event kinds and the limits-changed Run event are new, and so are the new transition causes' wire names (readiness-timeout, unresponsive, restart-requested, clean-exit, pause-cooperative, resume-cooperative, drain-stopped), so an older build that reads a newer engine's events or --json fails on them. Update readers first.
  • hekma-adapter-api moves to 0.3.0 and the adapter contract to 1.1.0 (additive); an engine built for 1.0.0 rejects the new manifest sections by name. The conformance kit grows from 8 to 12 sections (drain, readiness, liveness, exit_classes), and its report's contract_version reads "1.1.0".

v0.11.0#

Released 17 October 2026. Release page · All changes since v0.9.0

There was no v0.10.0 release. The version was set on the main branch during development and skipped at release time, so 0.11.0 follows 0.9.0.

PlatformArchiveChecksum
macOS, Apple Siliconhekma-v0.11.0-aarch64-apple-darwin.tar.gzsha256
macOS, Intelhekma-v0.11.0-x86_64-apple-darwin.tar.gzsha256
Linux x86_64 (glibc)hekma-v0.11.0-x86_64-unknown-linux-gnu.tar.gzsha256
Windows x86_64hekma-v0.11.0-x86_64-pc-windows-msvc.zipsha256
All platformshekma-v0.11.0-checksums.txt

Highlights

  • ACP agents. hekma agent register NAME --kind acp runs any Agent Client Protocol agent: set acp.command and acp.args. Hekma does the handshake at start, turns each send into one prompt turn, sends session/cancel on stop, denies permission requests, and resumes the session at the next start when the agent supports it. Verified against OpenCode and Hermes Agent's hermes-acp. In 0.11.0, prompt turns need a program that embeds the engine; see Supervision and detached runs.
  • Cached tokens are tracked end to end: in usage lines (optional cached_tokens), in the ledger, in list, show and usage, and in cost, with a new cost.rate.cached price. Without it, cached tokens are priced at the input rate.
  • Anthropic usage is read by the metering proxy, alongside OpenAI-style usage. See Meter token usage.
  • ACP context usage: an ACP agent's context-window figure is shown in show and JSON (acp_context_usage), never billed. An ACP agent with no billed usage shows — and a note naming what Hekma tried.
  • Detached agents stay in one run across commands. Per-run totals keep adding up, and a breach already fired in the run does not fire again when the next command adopts the agent.
  • A Supervision column in list and show, and a supervision JSON field: detached, session, or — when no process is recorded.
  • Pauses across commands: an agent you paused with hekma agent pause is resumed when the command exits, so it is never left frozen with nobody watching. An agent paused by a budget breach stays paused.
  • logs --follow streams what a detached agent writes after the command starts, from its raw agent.log, with a note that those timestamps are when Hekma read the lines.

Deprecation

  • The hermes kind is deprecated in favour of --kind acp with acp.command hermes-acp. It keeps working unchanged and will not be removed before a major release. Metering and memory delivery work the same under acp. See Supported agents.

Fixes

  • Attaching or detaching memory in one terminal while starting the agent in another can no longer leave the two out of step. The losing command fails with a retryable error and changes nothing.
  • On Windows, a detached agent no longer keeps the starting command's output pipes open.
  • An ACP stop records the session/cancel it sent in the agent's log.

Upgrade notes

  • The state database is upgraded to schema 9 the first time 0.11.0 opens it. Older Hekma versions refuse to open it afterwards, so upgrade every copy that shares a state directory.
  • Agents left running by an older version are adopted as usual and get a run id at that point; Hekma prints a one-time note.
  • Nothing else changes for the CLI: JSON documents gain only optional fields and keep their schema_versions, and exit codes are unchanged.

For embedders

  • hekma-engine 0.7.0 replaces 0.4.0 on crates.io (0.5 and 0.6 were never published). It adds variants to exhaustive enums (EngineError::AcpTurnInFlight, EngineError::MemoryBackingChangedUnderStart, TransitionCause::DetachedResumed, and five StoreError variants), fields to FleetEntry, SpawnRecord and SpawnSpec, and the method read_raw_output_since. See Upgrade from 0.4.
  • The conformance kit gains run_conformance_with and TckConfig: a per-section timeout, a state directory you own, and a chosen subset of sections. Its errors now name the stage that failed.

v0.9.0#

Released 18 September 2026. Release page

Highlights

No behaviour changed. Upgrade with hekma self-update.

v0.8.1#

Released 18 September 2026. Release page

Fixes

  • hekma self-update and the update check now look for releases at github.com/Ktesio/hekma, the repository's new home after the rename. A v0.8.0 binary still finds later releases through GitHub's redirect.

v0.8.0#

Released 18 September 2026. Release page

Breaking changes

  • Ktesio is now Hekma. The commands are hekma and its short alias hkm; kt is gone. The crate is hekma (the ktesio crate stays at 0.7.0), the Homebrew formula is ktesio/tap/hekma, and the library crates continue as hekma-engine 0.4.0, hekma-adapter-api 0.2.0 and hekma-adapters-hermes 0.2.0.
  • kt self-update cannot reach this release. Re-run the installer, or use cargo install hekma --force or brew upgrade ktesio/tap/hekma. Upgrade from kt has the steps for each install method.

Highlights

  • hekma agent start --detach keeps an agent running after the command exits; the next command adopts it. Engine-observed agents refuse --detach.
  • The metering proxy works with real providers: HTTPS upstreams through a bundled TLS stack, and streaming responses, by asking the provider for a final usage frame.
  • For embedders: resync_events to catch up on events after a crash or a lag, and a DiagnosticSink to route the engine's diagnostic lines into your own writer.
  • Sturdier supervision: a dedicated error when resuming an agent whose pause is unsupported, budgets checked at once when a command adopts an agent, a process that cannot be checked repeatedly is treated as crashed, and adopted agents on Windows can now be stopped and confirmed dead.

Upgrade notes

  • Your data stays where it is: the same state directory is used and nothing is moved. KTESIO_* environment variables keep working, with new HEKMA_* names alongside. JSON output, exit codes, the KTESIO_USAGE line and the adapter contract are unchanged.
  • The state database moves to schema 6 (it records whether an agent is detached).

Older releases#

These were released as Ktesio, with the kt command. Their notes are on GitHub.

VersionDateSummary
v0.7.010 Sep 2026The engine becomes an embeddable library on crates.io, with an event stream; the adapter contract is frozen at 1.0.0 and the conformance kit ships; the native Hermes adapter.
v0.6.0Never released. Planned as the switch from skills manager to agent runner, which shipped in v0.7.0.
v0.5.01 Jul 2026New documentation site.
v0.4.03 Jun 2026Hosted installers, the update notice and self-update.
v0.3.12 Jun 2026Skills manager: fallback skill discovery.
v0.3.01 Jun 2026Skills manager: progress output for init.
v0.2.02 Jun 2026Skills manager: search, shorthand installs and polished output.
v0.1.131 May 2026First release, as a skills package manager.