Conversation Branching
Agents sometimes take the wrong path. Cogpit lets you explore alternative approaches and switch between branches — all without losing a single line of work.
Try it yourself
Open the branches modal to navigate between alternative approaches — OAuth, magic links, and WebAuthn passkeys — and switch the active branch.
Build a user authentication system with JWT
I'll set up the authentication system. Let me start with the user model and auth routes.
Add password hashing and input validation
Added bcrypt hashing and Zod validation schemas. All tests passing.
How it works
Agent makes tool calls
Each turn is recorded as a node in the conversation graph. Tool calls like Edit Write Bash are tracked with their full input/output and success status.
Undo rewinds turns
Each undo dims the most recent turn. The turn isn't deleted — it's marked as "undone" and can be restored with redo. The graph visually shows undone turns as dashed connections with faded nodes.
Branch from any point
When you undo some turns and give a new instruction, the conversation forks. The undone turns are archived as a branch. You can switch between branches at any time through the branch modal — nothing is ever lost.
When to branch
Wrong approach
Agent chose Passport.js but you want a simpler solution. Undo those turns and try magic links instead — the OAuth approach stays archived.
A/B exploration
Try two different implementations from the same starting point. Compare the branches side-by-side and keep the one that works best.
Error recovery
A bad edit broke the build. Instead of trying to fix it forward, rewind to the last good state and take a different path.