plandex-ai/plandex · error
error confirming: %v
Error message
error confirming: %v
What it means
After listing pending changes, the function asks the user 'Save changes now?' via term.ConfirmYesNo. Any failure from that interactive prompt is wrapped as 'error confirming: %v' — typically because stdin is not an interactive TTY or the read failed.
Source
Thrown at app/cli/lib/models_sync.go:76
onApprove = append(onApprove, SyncPlanModelSettings)
}
if len(changes) == 0 {
return nil
}
term.StopSpinner()
color.New(color.Bold, term.ColorHiYellow).Println("⚠️ Model settings have local changes")
fmt.Println()
for _, change := range changes {
fmt.Println(change)
}
fmt.Println()
shouldSave, err := term.ConfirmYesNo("Save changes now?")
if err != nil {
return fmt.Errorf("error confirming: %v", err)
}
if !shouldSave {
return nil
}
for _, fn := range onApprove {
err := fn()
if err != nil {
return fmt.Errorf("error syncing models: %v", err)
}
}
return nil
}
View on GitHub (pinned to e2d772072e)
Solutions
- Run in an interactive terminal (allocate a TTY, e.g. docker run -it)
- Provide the non-interactive flag / auto-approve option the CLI offers, or pipe an answer (echo y | ...) if supported
- Check that stdin is not closed or redirected in your wrapper script
- Update term.ConfirmYesNo handling to fall back to a default answer when not a TTY
Example fix
// before plandex plan ... # in CI with no TTY -> error confirming // after plandex plan --auto-approve ... # or run inside `script -qec` / a TTY
Defensive patterns
Strategy: fallback
Validate before calling
stat, _ := os.Stdin.Stat()
interactive := (stat.Mode() & os.ModeCharDevice) != 0
if !interactive {
// use auto-approve flag or skip prompting instead of calling the sync flow
} Try / catch
if err := lib.PromptSyncModelsIfNeeded(); err != nil {
if strings.Contains(err.Error(), "error confirming") {
// fall back to non-interactive mode or defer the sync
}
return err
} Prevention
- Run interactive commands inside a TTY (docker -it, script -qec)
- Use the CLI's non-interactive/auto-approve flags in CI
- Never pipe/close stdin for commands that prompt
- Design wrappers to detect TTY availability first
When it happens
Trigger: term.ConfirmYesNo errors: running under CI/non-interactive shells with no TTY, stdin closed or piped, or terminal read errors.
Common situations: Running plan commands in CI pipelines, Docker without -t, or scripts with redirected stdin where the interactive confirmation cannot be answered.
Related errors
- failed to get user input: %s
- error signing in to new account: %v
- error selecting account: %v
- error prompting for sign in to new account: %v
- error selecting sign in option: %v
AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05).
Data as JSON: /api/errors/e3052278371edb45.
Report an issue: GitHub.