Bug Fixes
15.3. Bug Fixes — Fixing Bugs Methodically
The standard process: reproduce → locate → fix → confirm
The investigation (15.1) applies directly to bug fixing: use search_files/git blame/git log to find the exact piece of code related to the bug, and read the context carefully before patching — avoid fixing the surface symptom without understanding the root cause.
A dedicated worktree for hotfixes
For an urgent bug that needs fixing on a different branch than the one where the main feature work is happening, hermes -w lets you open a completely separate worktree to handle the hotfix without affecting the in-progress feature in another session.
Notes
- For bugs reported by users via a GitHub issue, use the
github/*skill (11.2) throughgh issue viewto get the full context (description, comments, attached logs) before starting the fix — avoid fixing based on a short issue title that lacks sufficient information. - After fixing, always have the agent clearly explain the root cause in the commit message or PR description — not just describing “fixed bug X” without saying why the bug happened.
- For hard-to-reproduce bugs, consider using
terminalto write a reproduction script first, confirm the bug actually occurs, and only then start fixing — avoiding “fixing” something that is not the real cause.