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.
- The codification policy:
default,askoroff. It decides whether a rule can be converted into code, and whether that can happen without a person approving it. - Automatic sending:
pausedoron. It decides whether Agent OS sends a rule's template to Ekamyth for conversion on its own. It ispausedunless you turn it on.
Every change is recorded as a content-free entry, and the confirmation line ends (attested).
- Use it when you don't want any rule converted into code, want a person to approve every conversion, or want to switch automatic sending on or off.
- Use something else when you want to turn one rule off (
hero codify off <rule>), see what each rule is doing (hero enforce), or see what may leave your machine (hero privacy). - In help:
hero helpdoesn't listhero codify-policy, and it has no help page of its own. See Limits. - Reads or changes:
show, andautowith no state, read. Setting a state changes it. Only you, from your own terminal, can setofforauto on.
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
| Subcommand | What it does | Reads or changes |
|---|---|---|
show | Prints the codification policy. This is the default. | Reads |
default | Rules 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 |
ask | No rule is converted without a person approving it. | Changes |
off | No 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 |
auto | With 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
| Argument | Type | Required | Default | Allowed values | What it does |
|---|---|---|---|---|---|
<state> | Choice | No | The policy is default on a new install | show, default, ask, off | The policy to set, or show. |
auto <state> | Choice | No | paused on a new install | paused, on | Automatic 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.
See the codification policy.
hero codify-policyYou should see
codification policy: default (off | ask | default)on a new install, and a second line aboutoff.See whether automatic sending is on.
hero codify-policy autoYou should see
automatic sending: paused (paused | on)on a new install.Require a person for every conversion.
This command will:
- set the codification policy to
ask; - record the change.
hero codify-policy askYou should see
codification policy → ask (attested). To undo, runhero codify-policy default.- set the codification policy to
How to read hero codify-policy output
| Line | What it means | What 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 available | Printed 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
| Code | Meaning for this command | Cause | What to do |
|---|---|---|---|
0 | Shown or changed | The setting printed, or the change was made. | Nothing. |
1 | The change couldn't be saved | The settings couldn't be written or read. | See the error below. |
2 | Refused | An unknown state, or off or auto on run by your agent rather than from your own terminal. | Use a state from the synopsis. |
| Error | Cause | Fix |
|---|---|---|
codify-policy has no state '<state>', with the rule hero codify-policy declares: show, ask, default, off | An 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, paused | An 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
| Name | Kind | Purpose |
|---|---|---|
HERO_HOME | Environment variable | Root of Agent OS's files on your machine, where both settings are kept. Default ~/.hero. |
Limits of hero codify-policy
| Limit | Behaviour | Can you change it? | What to do |
|---|---|---|---|
| No help page | hero codify-policy isn't listed in hero help, and its help forms print the general help page. | No | Use this page. |
| Off doesn't switch your rules off | off 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. | No | To stop one rule entirely, use hero codify off <rule>. |
| Turning code back on | Rules switched back by off don't return to code when you choose default or ask. Each one has to earn it again. | No | Set 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 key | With auto on, nothing is sent unless this install has an Ekamyth key. | No | See hero privacy for the flow's state. |
Commands related to hero codify-policy
Checked against Agent OS 0.1.36rc14 (build 599c5e120c18) on 17 Nov 2026.