Skip to main content
CODING-WITH-CODEX5 MIN READ

Decision Walk: Debug In A Dirty Worktree

Navigate a bugfix safely when existing worktree changes mean you cannot treat the repo as clean.

The situation A checkout flake must be fixed on a branch that already contains unrelated copy, analytics, and design edits from the user. One careless command can turn a focused bugfix into an accidental cleanup PR. Guiding principle Constrain, inspect, justify, then edit On a dirty branch, strong Codex work keeps re-establishing which files belong to the task and which do not. Bad shortcut Run broad formatters or accept an unexplained file list. You protect existing work while still fixing the bug. Dirty state demands explicit file boundaries. Start Codex proposes running a repo-wide formatter before debugging because some files…

Read the full lesson

Sign up free — one personalized lesson every day, matched to your role and goals.

Already have an account? Sign in

← Back to library
Contact us