Skip to main content

completed_agent_worktree

Function completed_agent_worktree 

Source
pub fn completed_agent_worktree(
    tool_name: &str,
    tool_input: &Value,
    tool_response: &Value,
) -> Option<AgentWorktree>
Expand description

The agent worktree a completed Agent-tool call left behind, from the PostToolUse hook payload.

Gated four ways because the answer aims a deletion: only the Agent tool (either spelling), only calls that ran with isolation: "worktree", only a structured worktreePath field, and only paths with the CLI’s managed layout <repo>/.claude/worktrees/agent-<...>. None when any gate fails.