Fix your first bug in Autohand Code Desktop
Use a dependency-free Node.js practice project to reproduce a quantity bug, let an agent fix it, review the diff, and verify it in the app.
This exercise gives you a small project with one failing test, so you can try the whole Desktop loop in a few minutes. You need Autohand Code Desktop installed and signed in, Git, Node.js 22 or newer, and npm. The project has no dependencies to install.
Prepare the practice project
- Download the practice project.
- Extract the ZIP and keep the
desktop-first-taskfolder somewhere you can find it. - Open a terminal in that folder and make it a Git repository:
cd "/path/to/desktop-first-task"
git init -b main
git add .
git commit -m "Add practice project"
Replace the path with your extracted folder. These commands also work in PowerShell. If Git cannot commit because your name and email are not set, configure them as you normally would and commit again.
If you installed the ad command during setup, you can now run ad . to open the folder in Desktop.
Reproduce the failure
npm test
The price-times-quantity test fails: the code returns 7 where the expected total is 19. The empty-basket test passes.
The starting implementation ignores quantity:
export function total(items) {
return items.reduce((sum, item) => sum + item.price, 0);
}
Open the project and ask for the fix
- In Desktop, choose Add project, keep Folder, select the
desktop-first-taskfolder, and choose Create project. - Choose New thread. Check the composer shows the project, Local, and the
mainbranch, and that Temporary is off. - Pick a model you can use, and a mode that asks first: Ask for Autohand, or Ask for approval for other agents.


Send:
Fix the failing quantity calculation in this repository. Run npm test first,
inspect total.js and total.test.js, then make the smallest correct fix and
add a regression test for a zero quantity. Run npm test again. Only edit
this project. Do not commit, push, or install dependencies. Explain the bug
and report the test result.
When an approval appears, read what it covers and choose Approve once.
Review and verify
When the turn ends, choose Review on the Edited N files card. You should see total.js multiplying price by quantity, and a new test showing that a zero-quantity line adds nothing. Open Environment > Changes to see the whole working tree, or the Git panel to see each file’s diff.
Then open the right-hand panel, choose Terminal, and run:
npm test
git diff --check
git diff
Expected result: 3 tests passed, 0 failed, with source changes only in total.js and total.test.js. The agent may also create local .autohand files; check those separately before committing. Test names and formatting can differ, so check the behavior rather than the exact output.
Iterate in the same thread
Ask for one more case and keep the fix:
Keep the fix. Add a regression test for a single item with quantity one,
and rerun npm test. Do not change the public function or add dependencies.
Read the new test and run the suite yourself. You should now see 4 tests passed, 0 failed.
Try it in a worktree
To see isolation in action, start a second thread on the same project and choose New worktree in the Work in menu. Ask for a different change, such as a README section. The worktree gets its own branch and files, so the two threads do not touch each other’s work. Find and remove it later in Settings > Worktrees.
Clean up
This is a practice folder. Archive its threads when you are done. Removing the project from Desktop and deleting the folder are separate actions, so keep the files if you want the result.
Next, try real development workflows, review and delivery, or the tour.