Skip to content

Warn agents before archiving or deleting their worktree #725

Description

@davdroman

What problem does this solve?

The generated CLI skills document worktree archive and worktree delete, but do not warn agents that either operation can remove the current worktree from Supacode's active terminal set and close the calling surface. An agent can therefore archive or delete its own worktree before finishing checks, commits, integration, or reporting, leaving the task incomplete.

Proposed solution

Add a concise critical section to the generated CLI skill guidance telling agents to make archiving or deleting the current worktree their final operation. The guidance should require all edits, checks, commits, integration, and reporting to finish first, with no follow-up commands scheduled. It should also cover worktrees removed through Git once Supacode refreshes them.

Alternatives considered

None.

Supacode version

Current main.

Are you planning to build this yourself?

  • I intend to open a pull request once this is approved and marked ready.

Before submitting

  • I searched existing issues and this is not a duplicate.
  • I understand feature pull requests are closed until the issue is marked ready.
  • I agree to follow this project's Code of Conduct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions