Feature request: auto-enter plan mode for slash commands / sub-agents

Resolved 💬 1 comment Opened May 1, 2026 by IanVand Closed May 31, 2026

Summary

Provide a way for a slash command (or a sub-agent) to declare that it should run in plan mode from the start, without requiring the user to toggle plan mode manually (shift+tab) or launch Claude with --permission-mode plan.

Motivation

Several of my slash commands are explicitly designed around "gather context, synthesize a plan, then hand off to the user for approval" — e.g. an inbox-triage command that reads PR-review notification emails, reads the affected prompt files, and proposes prompt/rule edits grouped by category. The command's final step is "enter plan mode so the user can review and approve."

Today that last step is a dead letter on the assistant side:

  • There is no ExitPlanMode-equivalent entry tool exposed to the assistant.
  • Slash command frontmatter supports description and allowed-tools but no plan-mode field.
  • Sub-agent frontmatter (.claude/agents/*.md) has no plan-mode field either.
  • settings.json has no defaultMode / permissionMode / planMode key.
  • --permission-mode plan is a launch-time CLI flag only and can't be scoped to a specific command.

The assistant has to write the plan, summarize it, and politely wait. The user then has to notice and toggle plan mode themselves if they want the plan-mode UX (accept/reject buttons, deferred tool execution, etc.). When the whole point of the command is "present a plan for approval," that handoff is clunky.

Proposed API

Any of the following would solve it; ideally all of them:

1. Slash command frontmatter

---
description: Read PR Reviewer emails and synthesize an improvement plan
plan-mode: true
# or: permission-mode: plan
---

When the command is invoked, the harness enters plan mode before the first assistant turn.

2. Sub-agent frontmatter

---
name: pr-inbox-planner
description: ...
plan-mode: true
---

Launching the agent puts that agent's turn into plan mode. Useful for "planner" agents whose job is to produce a plan.

3. settings.json default

{
  "permissions": {
    "defaultMode": "plan"
  }
}

Project-level or user-level default permission mode, matching the existing --permission-mode values.

4. (Optional) An EnterPlanMode tool

Complement the existing ExitPlanMode tool. The assistant calls it when it has gathered enough context to start planning. This is the most flexible option but also the most runtime-behavioral; (1) and (2) are likely sufficient for the common case.

Workarounds I've considered

  • A PreToolUse hook that detects the slash command and somehow toggles plan mode — undocumented, fragile, and not clearly possible today.
  • Having the command print "please press shift+tab now" — clunky UX.
  • Asking the user to launch with --permission-mode plan — doesn't scope to one command.

Environment

  • Claude Code CLI on Windows 11
  • Opus 4.7 (1M context)
  • Plugins installed via marketplaces

Happy to prototype frontmatter parsing if it helps.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗