[FEATURE] Ultraplan: fire ExitPlanMode hook and write local plan file when plan is teleported back to terminal

Resolved 💬 2 comments Opened Apr 4, 2026 by markwharton Closed May 14, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When an Ultraplan is approved and teleported back to the local terminal, no ExitPlanMode PostToolUse event fires and no local plan file is written to ~/.claude/plans/. This prevents PostToolUse hooks from integrating with Ultraplan.

Proposed Solution

When a plan is teleported back to the terminal:

  1. Write the plan content to ~/.claude/plans/<slug>.md
  2. Fire an ExitPlanMode PostToolUse event so registered hooks can process the plan

This would make Ultraplan compatible with the same hook workflow that standard /plan mode supports.

Alternative Solutions

  • Fire a new dedicated PostToolUse event (e.g., UltraplanApproved) with the plan content in tool_response, letting hooks distinguish local from remote plans
  • Include the plan content in the ExitPlanMode tool_response field so hooks can read it from stdin without requiring a local file

Priority

Medium - Would be very helpful

Feature Category

Configuration and settings

Use Case Example

https://github.com/markwharton/plankit registers a PostToolUse hook on ExitPlanMode to preserve approved plans as timestamped documentation. This works with /plan but not Ultraplan because neither the event nor the local file is created.

Additional Context

Tested on macOS with Claude Code CLI. Ultraplan delivers plan content inline between <ultraplan> tags and instructs Claude to start implementing. The plan file only exists on the remote server (e.g., /root/.claude/plans/<slug>.md). Searched existing issues — #31459 is similar but unrelated.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗