# The coding agent says done, but the app is still broken

> A recovery workflow: reproduce the failure, inspect local services and logs, point the agent at evidence, and verify the new diff.

Canonical HTML: https://canopyide.dev/guides/agent-says-done-but-app-is-broken
Article date: 2026-09-28

An agent can finish its assigned edit while the feature still fails in the running product. The fastest correction starts with a reproducible observation, not another broad prompt.

## Reproduce the failure yourself

Open the exact page or command the task was supposed to fix. Record what you did, what happened, and what should have happened. If the bug only occurs with a particular input, account, viewport, or browser state, include it. A screenshot is useful for a visual mismatch; a log line or failing test is better for a process error.

## Example: the settings form never finishes saving

Suppose the agent says it fixed profile saving. On the current branch, enter a new display name, press Save, and observe a spinner that never stops. Record the page URL and account role, then check whether the browser sent a save request. Chrome's Network panel shows request method, status, and response; a 500 response points you toward the API log, while no request suggests the browser code stopped earlier. If the request succeeds but refresh restores the old name, check which backend or account the page used. These are different failures and should not all be reported as 'the UI is broken.'

*Collect one matching observation from each layer before asking for another edit.*

| Layer | Question | Evidence to record |
| --- | --- | --- |
| Browser | Did Save send a request? | URL, method, status, safe response excerpt |
| Service | Did the intended API handle it? | Process, port, matching timestamp, first error |
| Repository | Did the fix touch this path? | Branch, latest commit, relevant diff and test |
| Result | Did the name persist after reload? | Observed value with a disposable account |

## Check the stack before changing code

In Canopy, inspect the Servers panel for process state, ports, and terminal output. Confirm the website is pointing at the expected API and worker. A stopped server, stale port, missing environment variable, or old browser state can mimic a code defect. Restart the relevant service and reproduce again before sending the agent toward a needless rewrite.

## Compare the claim with the actual diff

Read the agent's changed files and the latest commit or PR. Did it change the component the failure comes from? Did it add a test that exercises the behavior or just a nearby helper? If the test passes but the UI still fails, preserve both facts: the test may be incomplete, the runtime path may differ, or the local stack may be misconfigured.

## Give a focused correction

Send the exact reproduction, current logs, screenshot or test output, and relevant branch. Ask the agent to diagnose before editing, state the likely cause, and make the smallest justified fix. Specify that it must rerun the failing check and report the result. In Canopy, element annotations and scoped screenshots can keep feedback tied to the preview.

## Verify the final state, not the second summary

Repeat the reproduction yourself, then inspect the new diff and relevant tests. In the settings example, a valid name should save once, show success, and still appear after reload. Force one API failure and check that the form shows an error and allows retry; a fix that hides the spinner by discarding the request has not solved the task. If the fix required a PR update, check CI on the latest commit and whether comments were actually addressed. Close the task only when the original acceptance check passes in the running product or the remaining failure is explicitly documented for another owner.

- Record the checkout, URL, and account used for the final check so another reviewer can repeat it.
- Inspect the latest diff after the last correction, including tests changed to make a failure disappear.
- Treat a passing build as one check; it does not exercise the form's save and retry behavior.

## Copyable resources

### Copyable follow-up prompt

Fill in the reproduction and evidence before sending another agent turn.

````text
The requested behavior is still failing on branch [branch/PR].
Steps to reproduce: [numbered steps and input]
Actual result: [what I saw]
Expected result: [what should happen]
Current evidence: [screenshot, log line, failing command, URL/port]
Checks already run: [command and result]
Please inspect the current diff and running path before editing. Explain the likely cause, make the smallest justified fix, rerun the failing check, and report the exact result plus any remaining uncertainty.
````

## Frequently asked questions

### If tests pass, why can the app still be broken?

Tests only cover the behavior they exercise. The failing UI path, environment, integration, or input may not be represented in them.

### Should I tell the agent to try again?

Give it a specific reproduction and evidence first. A broad retry can repeat the same mistaken assumption.

## Sources and further reading

- [Canopy app README: servers, preview, and review](https://github.com/FluidWorksApp/canopy-ide#readme)
- [Chrome DevTools Network reference: requests and responses](https://developer.chrome.com/docs/devtools/network/reference)
- [GitHub: reviewing proposed changes](https://docs.github.com/en/pull-requests/how-tos/review-pull-requests)

## Related Canopy pages

- [Why does my AI-built app lose data when I refresh?](https://canopyide.dev/guides/ai-built-app-loses-data-on-refresh.md)
- [Debug an agent-built page using the browser console and network log](https://canopyide.dev/guides/debug-agent-built-page-with-console-and-network.md)
- [Why does my browser show the old app after my coding agent changed the code?](https://canopyide.dev/guides/coding-agent-changed-code-but-browser-shows-old-app.md)
- [How do I start my website, API, and worker with one click?](https://canopyide.dev/use-cases/one-click-local-dev-stack.md)
- [An AI coding-agent task brief you can copy and use](https://canopyide.dev/guides/ai-coding-agent-task-brief-template.md)

Canopy runs installed coding CLIs; CLI accounts, model selection, and provider billing remain separate. Check the installed release before relying on version-specific behavior.
