Describe the bug
When plan-mode is invoked during an existing session (rather than at session start), the approval gate ("Execute the plan? yes/no") is never shown. The agent writes the plan file and immediately begins executing it without waiting for user confirmation.
Steps to reproduce
- Start a normal (non-plan-mode) session
- Mid-session, explicitly invoke plan mode (e.g. via slash command or prompt)
- Agent writes the plan document
- Agent immediately proceeds to execute — no approval prompt appears
Expected behavior
After writing the plan, execution should be gated behind user approval regardless of whether plan mode was active from session start or invoked mid-session.
Actual behavior
The agent self-authorizes execution. The questionnaire tool (or equivalent gate) is never called. The transition from plan → execute is skipped entirely.
Root cause hypothesis
The approval gate appears to be wired only at session initialization. A mid-session mode switch doesn't re-arm it, so the model has no instruction to stop and wait.
Environment
- prime-agent version: 0.7.1
- Model: claude-sonnet-4-6
Describe the bug
When plan-mode is invoked during an existing session (rather than at session start), the approval gate ("Execute the plan? yes/no") is never shown. The agent writes the plan file and immediately begins executing it without waiting for user confirmation.
Steps to reproduce
Expected behavior
After writing the plan, execution should be gated behind user approval regardless of whether plan mode was active from session start or invoked mid-session.
Actual behavior
The agent self-authorizes execution. The
questionnairetool (or equivalent gate) is never called. The transition from plan → execute is skipped entirely.Root cause hypothesis
The approval gate appears to be wired only at session initialization. A mid-session mode switch doesn't re-arm it, so the model has no instruction to stop and wait.
Environment