edhil implement
edhil implement
edhil implement NUMBER... [--include-committed] [--yes] [--quiet] [--agent NAME]
[--no-input]
Implements epics and work items with the agent, one commit per work item. What happens in a run is described in How edhil works; this page is about the command.
The numbers
Give one or more issue numbers, with or without a # (quote it in a shell: '#12'). edhil asks the forge what each one is:
- An open epic stands for its open work items. The work items that an earlier run committed are left out and listed with the run that committed them.
--include-committedruns them again. - An open work item that is not an epic runs directly, also if an earlier run committed it, because you asked for it by name.
- A closed or missing issue, and an issue with the
Projectslabel (open or closed), is a problem. A project is not a work item, so the epic that is linked to a project does not bring it in. All problems are printed together underCannot implement:and nothing is started.
A number that is given twice counts once. A work item that is reached twice (it is named, and so is its epic) runs once, and a note says which number brought it in. The work items run in ascending order of their issue numbers, not in the order you typed them. The whole list is one run. The run is recorded with an epic only when the list is exactly one epic.
The plan and the question
The plan is printed before anything starts, grouped by the number that brought the work items in:
Epic #5 The epic
#11 First item
verify: yet prepush (timeout 30 minutes)
#12 Second item
verify: yet cleanify (timeout 10 minutes)
verify: cargo test -p edhil (no timeout)
Work items
#13 Loose item
verify: yet prepush (timeout 30 minutes)
Already committed, left out (--include-committed runs them again):
#10 Earlier item (run #4)
3 work items to implement.
Run these 3 work items? [Y/n]
Under each work item are the commands that will verify it and the time each may take, as integration.verification sets it (see the next section). --yes skips the question. Without --yes and without a terminal the command fails before it starts anything. If nothing is left to run it prints the plan, Nothing to implement. and exits with 1.
The verification commands
edhil reads the commands that verify a work item from the Verification steps section of its description in the forge, before anything starts. The description must be in the format that edhil import creates. If it is not, or if a command is not allowed by integration.verification.restrict (see Configuration), the work item cannot be implemented. Every such problem is printed together, one line for each, under Cannot implement:, and nothing is started:
Cannot implement:
#12 (Second item): the command 'make all' is not allowed by integration.verification.restrict
#13 (Loose item): the description is not a valid work item: line 1: bad_work_item_heading: a work item heading must read '## WI #N.M - Title'
An issue that was written before the format existed has to be edited into it. A work item that an earlier run committed and that is left out of the plan is not checked. The run never starts for a work item that has no command: that is No verification commands were given for #11.
The progress
One line for each phase of each work item, on stdout:
[1/3] #11 First item: implementing
[1/3] #11 First item: verifying
[1/3] #11 First item: summarizing
[1/3] #11 First item: committing
[1/3] #11 First item: committed 0123456
Unless you give --quiet, each step announces itself ( > implement) and its output follows, indented, as it arrives: what the agent prints and the log of the verification. With --quiet only the phases and the pauses are shown. Every command of the verification is a step of its own, announced as ` > verify. In both cases the full output is in the journal, and [edhil log`](/documentation/edhil/commands/log) shows it afterwards.
A pause is shown as a block and a question:
Paused at #12 Second item: the verification failed
step: verify
(r)etry, (i)gnore, (a)bort?
The answers are described in How edhil works. Answering i asks Ignore the failure and go on? [y/N]. After a failed commit or a git error the question is (r)etry, (d)iscard, (a)bort? instead: d lists the files that will go, then asks Discard these changes? [y/N]. An answer that is none of these is asked again.
At the end the run is summarized:
Run #7 done: 3 of 3 work items committed.
#11 committed 0123456
#12 committed 89abcde
#13 committed fedcba9
Options
| Option | Meaning |
|---|---|
NUMBER... |
One or more epics or work items. At least one is required. |
--include-committed |
Also run the work items of an epic that an earlier run committed. |
-y, --yes |
Do not ask before the run starts. |
-q, --quiet |
Show only the phases and the pauses, not the output of the steps. |
--agent NAME |
Use this agent for the run instead of the one in integration.agent. NAME is an agent from integration.agents or a tool: copilot, claude, codex or opencode. It can come before or after implement. An unknown name fails the command before anything starts. |
--no-input |
Never ask: a question that would be asked fails the command, and a pause aborts the run. Useful in scripts and cron jobs. |
Exit codes
| Code | When |
|---|---|
| 0 | Every work item was committed. |
| 1 | Something prevented the run or made it fail: a problem with a number, a dirty tree, no branch, another edhil running, a closed issue, no answer to the first question. |
| 2 | Wrong command line. |
| 3 | The run was aborted, or ended paused with nobody to ask. The work stays in the working tree. |
| 130 | The run was stopped with Ctrl-C. |
Before you start
- The working tree must be clean and you must be on a branch. The commits go on that branch; edhil does not push and does not make branches.
- The commands in the Verification steps of the work items must be runnable in the repository. They run in the order they are written, each as its own step, and the first one that fails stops the verification.
- The agent runs for as long as
integration.agent_timeout_minutesallows for each step. Leave the machine alone while a run is going; edhil looks at the working tree after every step.