← Voltar para todos os artigos

Este artigo ainda não está disponível em português, por isso estamos mostrando a versão em inglês.

How do I tell an AI agent what “done” means?

4 min de leituraPor The Octuo team
Screenshot of Octuo for macOS showing delegated tasks

Write “done” as a check the agent can prove, not a feeling: one measurable end state, the test or comparison that shows it, and what must not change on the way. Claude Code and Codex both document a /goal command built on this idea, and the same parts help in any agent's brief.

Why do agents stop early?

Unless something else checks, the agent doing the work also decides when it is finished. In Claude Code's words, Claude "stops when it judges the work done", and /goal adds a separate evaluator so completion "is decided by a fresh model rather than the one doing the work". A vague brief such as “clean up the module” gives nobody a line to check against, so the first plausible stopping point wins.

What goes into a good definition of done?

Claude Code's docs list the parts of a condition that holds up across many turns. Codex's docs name three: outcome, constraints and verification. Combined:

  1. One measurable end state. A test result, a build exit code, a file count or an empty queue. Describe the result you want, not only the activity.
  2. A stated check. How the agent should prove it, such as “all tests in one folder pass and the lint step is clean”.
  3. Constraints that matter. What must not change on the way, such as “no other test file is modified”.
  4. A limit. Claude Code's docs suggest adding a turn or time clause, so the work cannot run without end.

Make the proof visible. Claude Code's evaluator judges the condition against what appears in the conversation and does not run commands or read files on its own, so the agent's own output has to show the result.

How do I set it in Claude Code and Codex?

In Claude Code, run /goal followed by the condition, up to 4,000 characters. One goal is active per session, /goal alone shows its status and /goal clear removes it. The goal clears when the condition is met, when the evaluator judges it impossible, or after an error you have to fix.

In Codex, enter /goal in the desktop app, CLI or IDE extension. The goal text becomes both the first prompt and the completion criteria. If the outcome is still unclear, start with /plan and ask Codex to interview you first.

Neither command widens access. Claude Code keeps your permission mode, and Codex keeps its sandbox and approval policy and pauses when it needs a decision.

What should I still check when it says it is done?

A definition of done makes stopping checkable; it does not guarantee completion. Some errors clear a Claude Code goal and wait for you, such as an authentication failure or an unavailable model, and a loop with no progress hands control back to you.

So pair the goal with a halfway look: ask for a checkpoint halfway. Put the settled parts in writing first, as in a one-page kickoff. When the result arrives, review it in ten minutes.

Where Octuo fits

Octuo is a personal assistant that coordinates your AI tools, agents and outside services for you: you say the goal, and it handles the preparation, delegation and follow-up. Tasks carry forward across sessions, with context that survives the conversation.

Octuo follows the work and reports back. Progress is there whenever you want to check; decisions that need you come to Attention. You step in for your own account sign-ins, payments and sensitive approvals that must be yours; Octuo handles the surrounding work.

Octuo is a native Mac app and needs an internet connection. See what Octuo does. New accounts get 1,000 OC trial credits, once per person, no card. OC stands for Octuo Credits.

FAQ

Do I need /goal for this? No. The same parts work as plain text in any agent's brief. In Claude Code the command adds a check after every turn; in Codex the goal becomes the completion criteria.

Does a goal give the agent more access? No. Per the docs, Claude Code keeps your permission mode, and Codex keeps its sandbox and approval policy.

What if it says it is done and it is not? Ask for the evidence, such as the command output, and spot-check it yourself. The condition is only as good as what the agent can show.

Sources

The product names above belong to their owners. We have no affiliation with them.