SpaceXAI (formerly xAI) released Grok 4.7 on September 21, 2026. It was trained on tasks that take hours, and it "checks its own work more carefully." Claude Opus 5 does the same. Here's how to set them up so they actually finish.
The rule
Anthropic's Claude Code docs: "Claude stops when the work looks done." Give it something that returns a pass or fail and "the loop closes on its own": it does the work, runs the check, reads the result, and iterates until the check passes.
Good checks: a test suite, a build exit code, a linter, a script that diffs output against a fixture, or a screenshot compared against a design.
Before and after prompts
| Before | After |
|---|---|
| "implement a function that validates email addresses" | "write a validateEmail function. example test cases: user@example.com is true, invalid is false, user@.com is false. run the tests after implementing" |
| "make the dashboard look better" | "[paste screenshot] implement this design. take a screenshot of the result and compare it to the original. list differences and fix them" |
| "the build is failing" | "the build fails with this error: [paste error]. fix it and verify the build succeeds. address the root cause, don't suppress the error" |
Delete these lines
On Claude Opus 5, Anthropic says to remove re-check instructions such as:
- "double-check your answer"
- "re-verify before responding"
- "include a final verification step for any non-trivial task"
They "add cost without improving results."
Hand over the whole task
Claude Opus 5 "performs best when given the complete task specification up front and left to run."
Ask for evidence
Ask for "the test output, the command it ran and what it returned, or a screenshot of the result." Reviewing evidence is faster than re-running the check yourself.
Make it a hard gate (Claude Code)
- /goal: set the check as a goal condition; Claude keeps working until it resolves.
- Stop hook: runs your check as a script and blocks the turn from ending until it passes.
Set effort to the job
For Claude Opus 5, Anthropic suggests using low and medium effort for cost and speed where quality holds, and stepping up to xhigh for demanding coding and agentic work.