Review and clean up
Review the agent’s work before merging it. Then close the workspace if you want to return later, or delete it when you are done.
Review changes
Section titled “Review changes”coco diff fix/loginThis shows tracked changes since the workspace’s original base, including committed and uncommitted edits, and lists new untracked files. Large patches may be truncated with a notice. Use Git to review the complete changes, commit, and merge the branch.
Close work for later
Section titled “Close work for later”coco close fix/login --dry-runcoco close fix/loginClosing frees the worktree and stops its execution processes. The branch and conversation remain available.
Commit, stash, or move files you need before closing. Tracked changes, untracked files, and ignored files all prevent an ordinary close. CoCo also blocks close while work, a pending decision, an attached Codex UI, or background commands still use the workspace.
Find and restore closed work:
coco list --closedcoco reopen fix/logincoco jump fix/loginReopen restores the checkout at the retained commit. For detached work, first preserve new commits on a branch or tag before closing.
Delete finished work
Section titled “Delete finished work”You can delete an open or closed workspace directly:
coco delete fix/login --dry-runcoco delete fix/loginThe default removes the workspace, its worktree, its Codex conversation, and
its CoCo-created branch. Review the plan and confirm with y.
Keep the conversation or branch
Section titled “Keep the conversation or branch”coco delete fix/login --keep-threadcoco delete fix/login --keep-branchcoco delete fix/login --keep-thread --keep-branchCoCo prints what it retained. Use a retained thread ID as
coco create <name> --context <thread-id> to copy its conversation later.
Branches selected with --checkout are always kept.
Handle unsaved work
Section titled “Handle unsaved work”The deletion plan lists local files and commits that would lose their last
retaining branch, tag, or remote-tracking branch. Commit, move, or merge work
you want to keep, or use --keep-branch to retain the branch’s commits.
In a terminal, CoCo asks separately before discarding files or unretained
commits. If you explicitly want to discard files during close, use
coco close fix/login --discard-changes.
For scripts, --yes skips confirmation but never grants permission to
discard files or commits. See the lifecycle options
for explicit discard flags and conversation archiving.
If cleanup is blocked or interrupted, follow Troubleshooting.
Remove a repository from CoCo
Section titled “Remove a repository from CoCo”After deleting all of a repository’s workspaces, remove it from CoCo’s lists and selectors:
coco repo remove .This leaves the Git repository and its files untouched. repo rm is the short
alias. A later repo add or workspace creation adds the same repository again.