A good task says what is wrong, where to look and how to tell it's done. The agent can't ask you what you meant while you're away, so put that in the task.
Doesn't say whether the code or the test is wrong.
Write
task
The test "retries three times before failing" in src/retry.test.ts fails.Error: expected 3 attempts, got 2.Run it with: npm test -- retryFix the code in src/retry.ts, not the test. Done when npm test passes.
Upgrade zod from 3.23 to 4 in packages/api.Follow the upgrade notes in the zod changelog.Fix type errors and failing tests. Don't upgrade anything else.Done when pnpm typecheck and pnpm test pass.
The test "reconnects after a drop" in test/socket.test.ts fails about one run in ten.Run it 50 times with: for i in $(seq 50); do npm test -- socket || break; doneFind the race and fix it. Explain the cause in the pull request.