Write the task so someone else could verify it
Begin with the user problem and the outcome, not a list of files to edit. Include what should change, what should stay the same, and how you will know the change works. If there are screenshots, examples, existing conventions or acceptance criteria, provide them before asking for implementation.
For example, “Make the settings panel easier to use” leaves many decisions open. “On narrow screens, place the account controls below the profile summary. Keep the existing desktop layout, preserve keyboard access, and confirm that the save action still works” gives the coding agent a concrete target.
Ask the agent to inspect before it edits
A coding agent needs to understand the repository around the requested change. Ask it to identify the relevant components, current behavior, project conventions and any constraints. For an unfamiliar codebase, request a short plan and wait for it before implementation. This exposes mistaken assumptions while the change is still cheap to redirect.
OpenAI’s Codex guidance describes software work such as inspecting a repository, making a focused change and checking it. Anthropic’s Claude Code documentation likewise starts from working in a project on your development machine. In either workflow, give the tool the current project context instead of treating it as a blank chat.
Build one complete slice at a time
Break the task into small steps that each leave the project in a reviewable state. A vertical slice might add one form field, pass it through the existing state flow, validate it, and show the saved value. Avoid asking for a complete product in one prompt when the key decisions have not been made.
- Keep the scope and affected behavior visible.
- Ask for a brief explanation when the agent chooses a new dependency or changes an existing pattern.
- Check the rendered interface and important edge cases as each slice is completed.
- Use the project’s existing checks and add focused ones where they help catch regressions.
Review the change as the owner of the software
Read the diff, run the application and try the task the way a user would. Check for unrelated edits, hard-coded secrets, unsafe handling of user input, missing error states and broken keyboard or mobile behavior. A fluent explanation is not evidence that the result works; the change and its checks are the evidence.
When something is wrong, give the agent the observed failure and ask it to trace the cause. Avoid stacking vague requests such as “fix everything” on top of a broken change. A specific failure and a clear completion condition make the next iteration more effective.
Use this loop with either Claude Code or Codex: task, repository context, plan, small change, checks, review. The tools differ and their capabilities change, so choose based on the environment and workflow you prefer rather than a static feature checklist.
Further reading
Reference documentation used for the technical details in this guide.