plandex-ai/plandex · warning
failed to get confirmation user input: %s
Error message
failed to get confirmation user input: %s
What it means
commitApplied asks the user to confirm committing the applied updates via term.ConfirmYesNo when auto-commit is off. If reading the terminal answer fails (non-interactive stdin, closed pipe, EOF), the CLI wraps the terminal error in this message.
Source
Thrown at app/cli/lib/apply.go:603
})
if apiErr != nil {
return "", fmt.Errorf("failed to set pending results applied: %s", apiErr.Msg)
}
return commitSummary, nil
}
func commitApplied(autoCommit bool, commitSummary string, updatedFiles []string, currentPlanState *shared.CurrentPlanState) (err error) {
confirmed := autoCommit
if !autoCommit {
fmt.Println("✏️ Plandex can commit these updates with an automatically generated message.")
fmt.Println()
// fmt.Println("ℹ️ Only the files that Plandex is updating will be included the commit. Any other changes, staged or unstaged, will remain exactly as they are.")
// fmt.Println()
confirmed, err = term.ConfirmYesNo("Commit Plandex updates now?")
if err != nil {
return fmt.Errorf("failed to get confirmation user input: %s", err)
}
}
if confirmed {
// Commit the changes
msg := currentPlanState.PendingChangesSummaryForApply(commitSummary)
// log.Println("Committing changes with message:")
// log.Println(msg)
// spew.Dump(currentPlanState)
err = GitAddAndCommitPaths(fs.ProjectRoot, msg, updatedFiles, true)
if err != nil {
return fmt.Errorf("failed to commit changes: %s", err.Error())
}
}
return nil
}
View on GitHub (pinned to e2d772072e)
Solutions
- Use 'plandex apply --yes' (auto-commit) or the equivalent flag to skip the interactive prompt
- Run the command in an interactive terminal
- Pipe 'yes | ' or echo y into the command as a last resort in scripts
- Redirect stderr/stdin properly and ensure the terminal is attached
Example fix
// before (script) plandex apply // after (non-interactive) plandex apply --yes
Defensive patterns
Strategy: try-catch
Validate before calling
// detect non-interactive stdin before prompting
stat, _ := os.Stdin.Stat()
if (stat.Mode() & os.ModeCharDevice) == 0 {
// use auto-commit flag instead of prompting
} Try / catch
confirmed, err := term.ConfirmYesNo("Commit Plandex updates now?")
if err != nil {
// fall back to auto-commit or abort cleanly
return fmt.Errorf("confirmation failed (non-interactive terminal?): %w", err)
} Prevention
- Use the auto-commit/--yes flag in CI and scripts
- Always run apply from an interactive TTY
- Avoid piping stdin when the command prompts
- Handle Ctrl-D/Ctrl-C prompts gracefully in shell wrappers
When it happens
Trigger: term.ConfirmYesNo("Commit Plandex updates now?") returns an error — stdin is not a TTY or is closed, the user pressed Ctrl-D/Ctrl-C, or the terminal read was interrupted.
Common situations: Running plandex apply in CI or scripted pipelines without a TTY; piping stdin from another command; running in a sandboxed environment with no controlling terminal.
Related errors
- failed to get user input: %s
- failed to read keypress: %s
- error selecting account: %v
- error prompting org name: %v
- error prompting auto add domain users: %v
AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05).
Data as JSON: /api/errors/434740b8eb08d6fa.
Report an issue: GitHub.