Use LoopCode
Common workflows
Proven ways to work with LoopCode — understanding a codebase, fixing bugs, building features, reviewing changes, opening pull requests and running long tasks.
Understand a codebase
Start new projects with questions. LoopCode reads what it needs and answers with file references.
Give me an overview of this codebase: the main parts, how they talk to each
other, and where requests enter.How does authentication work here? Trace a login from the form to the session.For a broad question, LoopCode often sends an Explore subagent to do the reading in its own context and report back, which keeps your conversation light. Run /init once so later conversations start with the project's commands and conventions.
Fix a bug
Give the symptom, how to reproduce it, and what correct looks like:
Checkout fails with "cart is undefined" when a coupon is applied to an empty
cart. Reproduce it with a test first, then fix it, then run the checkout tests.Paste the error or stack trace directly, or attach a screenshot (ctrl v in the terminal, drag and drop in the app). LoopCode writes a failing test, fixes the cause, and proves the fix with the passing test.
Build a feature
For anything larger than a few files, plan first:
- Switch to Plan mode (shift tab in the terminal, or the mode picker in the app). LoopCode explores read-only and proposes a plan.
- Read the plan. Approve it, or say what to change.
- LoopCode implements it, step by step, keeping a checklist you can see.
Add CSV export to the reports page: a button, a server route that streams the
rows, and tests for the route. Follow the patterns the other exports use.Review your changes
/review/review reviews your uncommitted changes and the commits on your branch. It reports only real problems the change introduced — a bug, a security hole, broken behaviour — each with the file and line, a severity, and a concrete fix. It does not change files.
/diff shows the diff itself, including untracked files.
Open a pull request
/prLoopCode commits what is left, pushes the branch, and opens a pull request with a title and description written from the changes. With the GitHub CLI (gh) signed in it opens the pull request itself; without it, it pushes and opens GitHub's page for you to finish. In the desktop app, use Create pull request from the command palette (⌘ K).
To have LoopCode review every pull request and answer @loopcode mentions on GitHub, see GitHub reviews and fixes.
Write and run tests
Add tests for the discount calculator: the edge cases around zero, rounding and
expired coupons. Run them and fix any failures in the calculator, not the tests.Refactor safely
Rename UserService to AccountService everywhere, including imports and tests,
then run the typecheck and the full test suite.LoopCode uses the language server's rename where one is available, so every reference changes in one reviewed diff. See Code intelligence.
Work on the UI
In the desktop app, LoopCode can open your app in the built-in browser, click through it, and take screenshots to check its work. Run the dev server and say what to look at:
Start the dev server, open the signup page, and make the form errors readable
on mobile widths. Check it in the browser at 375px wide.See Browser.
Let it run for hours
For a large objective, set a goal. LoopCode keeps taking turns until it can prove the goal is done:
/goal Migrate every API route from Express to Hono, keeping all tests greenUse Auto-review mode for long runs so commands are judged rather than waiting for you. See Goals, loops and automations.
Work on two things at once
Start a second conversation in its own git worktree so the two never touch each other's files:
loopcode -w payments-fix
See Parallel work in worktrees.
Tips for good results
- Say what done looks like — the test that should pass, the page that should render, the command that should succeed.
- Point at the right place when you know it: mention files with
@, paste the error. - Keep one task per conversation. Start a new one (
/new) when the topic changes; LoopCode's memory carries the lasting facts across. - Write the rules down once in
LOOPCODE.mdor with# remember thisrather than repeating them. - Interrupt early. If it heads the wrong way, press esc and redirect.