charmbracelet/gum · info
not submitted
Error message
not submitted
What it means
gum input's Run prints the entered text only when the model's `submitted` flag is true, which is set when the user confirms with Enter. If the input was aborted (Esc or Ctrl+C), the program ends normally but nothing was submitted, so Run returns `errors.New("not submitted")`. It is a control-flow signal meaning "user cancelled", not an internal failure.
Source
Thrown at input/command.go:77
keymap: defaultKeymap(),
}
ctx, cancel := timeout.Context(o.Timeout)
defer cancel()
p := tea.NewProgram(
m,
tea.WithOutput(os.Stderr),
tea.WithContext(ctx),
)
tm, err := p.Run()
if err != nil {
return fmt.Errorf("failed to run input: %w", err)
}
m = tm.(model)
if !m.submitted {
return errors.New("not submitted")
}
fmt.Println(m.textinput.Value())
return nil
}
View on GitHub (pinned to 4d089f9550)
Solutions
- Handle the non-zero exit as an expected cancellation path: check the exit status in the calling script and branch on it.
- Tell users to press Enter instead of Esc/Ctrl+C to confirm the input.
- Provide a default value with `--placeholder`/`--value` so Enter-only workflows complete without typing.
- If you need to distinguish cancellation from real failures, match on the message `not submitted` in Go code or on the exit code in shell.
Example fix
// before
value, err := cmd.Output() // treats cancel as unexpected failure
if err != nil { return err }
// after (shell)
value=$(gum input --placeholder "Name") || { echo "cancelled"; exit 0; } Defensive patterns
Strategy: try-catch
Try / catch
if ! value=$(gum input --placeholder "Name"); then
# exit code 1 = user cancelled ("not submitted")
echo "input cancelled" >&2
exit 0
fi Prevention
- Always branch on gum's exit code and treat it as a cancellation signal.
- Document Enter vs Esc/Ctrl+C behavior for users of your scripts.
- Provide sensible defaults with --value/--placeholder so Enter-only flows work.
- Wrap prompts in loops that re-prompt on cancellation instead of failing.
When it happens
Trigger: User presses Esc or Ctrl+C inside the `gum input` prompt, causing the Bubble Tea program to quit with submitted=false.
Common situations: Users aborting a prompt in interactive scripts; automation driving gum via synthesized key events that send Esc/Ctrl+C; scripts that treat any non-zero exit as a bug when it is just cancellation.
Related errors
AI-assisted analysis of charmbracelet/gum@4d089f9550 (2026-08-31).
Data as JSON: /api/errors/ea057e9c08d360c3.
Report an issue: GitHub.