Ekamyth Agent OS docs
Added for agents / Your rules

hero codify-policy

Sets whether Ekamyth Agent OS may turn your rules into code, and whether it sends rule templates out for that automatically. You opt out of code, never out of your rules.

What hero codify-policy does

It answers one question: may Agent OS convert my rules into code, and may it send them out to do so? It holds two settings.

Every change is recorded as a content-free entry, and the confirmation line ends (attested).

Synopsis for hero codify-policy

hero codify-policy [show]
hero codify-policy default | ask | off
hero codify-policy auto [paused | on]

Run with no argument, it behaves as show. Flags are ignored, except that --json prints a refusal as JSON. hero codify-policy --help prints the general hero help page.

Subcommands of hero codify-policy

SubcommandWhat it doesReads or changes
showPrints the codification policy. This is the default.Reads
defaultRules can be converted into code. A low-risk rule can be converted without asking, once approvals have built up trust for it. Other conversions wait for a person.Changes
askNo rule is converted without a person approving it.Changes
offNo rule is converted into code. Rules already checked as code are switched back to their fallback: checked by a model, or, for a rule whose fallback is to refuse, refused by default. The output lists them. You can restore them. Only you can set this, from your own terminal.Changes
autoWith no state, prints whether automatic sending is paused or on. With a state, sets it. Only you can set on, from your own terminal.Reads, or changes with a state

Arguments for hero codify-policy

ArgumentTypeRequiredDefaultAllowed valuesWhat it does
<state>ChoiceNoThe policy is default on a new installshow, default, ask, offThe policy to set, or show.
auto <state>ChoiceNopaused on a new installpaused, onAutomatic sending to set.

How hero codify-policy works

Agent OS can convert a rule into code, so that it's checked by code at the tool call. The codification policy decides whether that may happen, and whether it needs a person. Turning it off stops conversion and switches rules already checked as code back to their fallback, which by default is being checked by a model; their code is kept, so they can be restored. Turning it back on doesn't convert those rules again by itself: each one has to earn it again.

A rule switched back to a model is no longer checked as code at the tool call.

Automatic sending covers the sends Agent OS makes on its own to convert a rule, when a rule is added or changed, and at its daily re-read of your rules. When you run hero compile, hero promote or hero analyze --llm yourself, the template is sent if this install has an Ekamyth key, whether automatic sending is paused or on. What's sent is a rule template, with the rule's literal values kept on your machine. With automatic sending on, these sends happen only if this install has an Ekamyth key. hero privacy shows this flow as rule-compile.

Both settings are kept on your machine. Changing a setting sends nothing; like other hero commands, this one can send the daily usage beacon unless HERO_BEACON=off is set.

Get started with hero codify-policy

Before you start: Agent OS is installed. Run these in your own terminal, not through your agent. They work the same on Mac and Linux.

  1. See the codification policy.

    hero codify-policy

    You should see codification policy: default (off | ask | default) on a new install, and a second line about off.

  2. See whether automatic sending is on.

    hero codify-policy auto

    You should see automatic sending: paused (paused | on) on a new install.

  3. Require a person for every conversion.

    This command will:

    • set the codification policy to ask;
    • record the change.
    hero codify-policy ask

    You should see codification policy → ask (attested). To undo, run hero codify-policy default.

How to read hero codify-policy output

LineWhat it meansWhat to do
codification policy: <state> (off | ask | default)The policy in force, and the three choices.Nothing.
off disables code; BROKEN until current before-work evidence is availablePrinted under the policy every time.Nothing.
codification policy → <state> (attested)The policy changed, and the change was recorded.Nothing.
reverted <n> code rule(s) to the audited LLM (restorable): <ids>After off: the rules that were checked as code and are now back on their fallback, by default a model check.Check them with hero enforce.
automatic sending: <state> (paused | on)Whether automatic sending is on.Nothing.
automatic sending → <state> (attested)Automatic sending changed, and the change was recorded.Check with hero privacy.

More hero codify-policy examples

Example 1. To stop any rule being converted into code

This command will:

  • set the codification policy to off;
  • switch every rule checked as code back to its fallback, by default a model check, and list them;
  • record the change.
hero codify-policy off

It prints codification policy → off (attested), then the rules it switched back, if any. To undo, run hero codify-policy default; the switched rules don't return to code by themselves.

Example 2. To let Agent OS send rule templates automatically

This command will:

  • turn on automatic sending of rule templates to Ekamyth, if this install has an Ekamyth key;
  • record the change.
hero codify-policy auto on

It prints automatic sending → on (attested). To undo, run hero codify-policy auto paused.

Exit codes and errors for hero codify-policy

CodeMeaning for this commandCauseWhat to do
0Shown or changedThe setting printed, or the change was made.Nothing.
1The change couldn't be savedThe settings couldn't be written or read.See the error below.
2RefusedAn unknown state, or off or auto on run by your agent rather than from your own terminal.Use a state from the synopsis.
ErrorCauseFix
codify-policy has no state '<state>', with the rule hero codify-policy declares: show, ask, default, offAn unknown state. Exit 2.Use one of the states it lists.
codify-policy auto has no state '<state>', with the rule codify-policy auto declares: on, pausedAn unknown state for auto. Exit 2.Use on or paused.
codification policy update failed: <reason>The settings couldn't be saved. Exit 1. If the file holding them is damaged, the command stops with an error before this line, also with exit 1.Email support at the address in your welcome email, with the output you saw.

Files and environment for hero codify-policy

NameKindPurpose
HERO_HOMEEnvironment variableRoot of Agent OS's files on your machine, where both settings are kept. Default ~/.hero.

Limits of hero codify-policy

LimitBehaviourCan you change it?What to do
No help pagehero codify-policy isn't listed in hero help, and its help forms print the general help page.NoUse this page.
Off doesn't switch your rules offoff stops conversion to code. A rule switched back goes to its fallback: checked by a model, or refused by default for a rule whose fallback is to refuse. It's no longer checked as code.NoTo stop one rule entirely, use hero codify off <rule>.
Turning code back onRules switched back by off don't return to code when you choose default or ask. Each one has to earn it again.NoSet hero codify-policy ask or default to permit code again; that alone doesn't restore code. Then run hero promote <rule-id>, which goes through the promotion checks, and have a different person approve the result with hero codify approve <rule-id> --by <actor>. If a step refuses, follow the refusal.
Automatic sending needs a keyWith auto on, nothing is sent unless this install has an Ekamyth key.NoSee hero privacy for the flow's state.

Checked against Agent OS 0.1.36rc14 (build 599c5e120c18) on 17 Nov 2026.