Skip to content

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.

Terminal window
coco diff fix/login

This 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.

Terminal window
coco close fix/login --dry-run
coco close fix/login

Closing 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:

Terminal window
coco list --closed
coco reopen fix/login
coco jump fix/login

Reopen restores the checkout at the retained commit. For detached work, first preserve new commits on a branch or tag before closing.

You can delete an open or closed workspace directly:

Terminal window
coco delete fix/login --dry-run
coco delete fix/login

The default removes the workspace, its worktree, its Codex conversation, and its CoCo-created branch. Review the plan and confirm with y.

Terminal window
coco delete fix/login --keep-thread
coco delete fix/login --keep-branch
coco delete fix/login --keep-thread --keep-branch

CoCo 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.

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.

After deleting all of a repository’s workspaces, remove it from CoCo’s lists and selectors:

Terminal window
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.