Skip to main content

corgi agent undo

corgi agent undo

Drop what a session left uncommitted in its own worktree; --worktree drops the worktree and its branch too

Synopsis

A run went the wrong way. This throws away every uncommitted edit and every new file in the session's worktree — git checkout -- . and git clean -fd — and with --worktree removes the worktree and deletes its corgi/<ref> branch.

Only for a session with a worktree of its own (--isolate): a session on your checkout would take your own edits with it, so it is refused. A working session is interrupted first (corgi agent interrupt). It asks before it acts unless --yes.

corgi agent undo api·APP-412 corgi agent undo api·APP-412 --worktree --yes

corgi agent undo <session> [--worktree] [--yes] [flags]

Options

-h, --help help for undo
--worktree Remove the worktree and delete its branch as well
--yes Do not ask

Options inherited from parent commands

--describe Describe contents of corgi-compose file
--dockerContext string Specify docker context to use, can be default,orbctl,colima (default "default")
-l, --exampleList List examples to choose from. Click on any example to download it
-f, --filename string Custom filepath for for corgi-compose
--fromScratch Clean the .corgi/corgi_services folder before running
-t, --fromTemplate string Create corgi service from template url
--fromTemplateName string Create corgi service from template name and url
-g, --global Use global path to one of the services
--interactive Force interactive prompts even when no TTY/agent detected
--isolate string Run this workspace under a named lease: own port block, own database names, own containers
--json Emit machine-readable JSON output
--privateToken string Private token for private repositories to download files
-o, --runOnce Run corgi once and exit
--silent Hide all welcome messages

SEE ALSO

  • corgi agent - Keep Claude Code Remote Control running for your corgi workspaces
Auto generated by spf13/cobra on 20-Sep-2026