{"record":{"id":"811f0afee8550d0b","repo":"plandex-ai/plandex","slug":"invalid-value-for-debug-v","errorCode":null,"errorMessage":"invalid value for --debug: %v","messagePattern":"invalid value for --debug: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/cli/cmd/plan_exec_helpers.go","lineNumber":238,"sourceCode":"\n// AutoDebugValue implements the flag.Value interface\ntype autoDebugValue struct {\n\tvalue *int\n}\n\nfunc newAutoDebugValue(p *int) *autoDebugValue {\n\t*p = 0 // Default to 0 (disabled)\n\treturn &autoDebugValue{p}\n}\n\nfunc (f *autoDebugValue) Set(s string) error {\n\tif s == \"\" {\n\t\t*f.value = defaultAutoDebugTries\n\t\treturn nil\n\t}\n\tv, err := strconv.Atoi(s)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"invalid value for --debug: %v\", err)\n\t}\n\tif v <= 0 {\n\t\treturn fmt.Errorf(\"--debug value must be greater than 0\")\n\t}\n\t*f.value = v\n\treturn nil\n}\n\nfunc (f *autoDebugValue) String() string {\n\tif f.value == nil {\n\t\treturn \"0\"\n\t}\n\treturn strconv.Itoa(*f.value)\n}\n\nfunc (f *autoDebugValue) Type() string {\n\treturn \"int\"\n}","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/cli/cmd/plan_exec_helpers.go#L220-L256","documentation":"This error comes from autoDebugValue.Set, the flag.Value parser for the --debug flag. strconv.Atoi failed to parse the provided string as an integer, so the flag is rejected before any command runs. It is a pure input-validation error.","triggerScenarios":"Passing --debug with a non-numeric value, e.g. --debug=abc, --debug=1.5, or --debug with trailing whitespace/units.","commonSituations":"Typing a word instead of a number, copying a value with quotes or spaces, assuming --debug takes a boolean like 'true' when it expects a positive integer retry count.","solutions":["Pass a positive integer, e.g. --debug=3","Remove quotes, spaces, or units from the value","If no value is wanted, omit the flag (empty string falls back to defaultAutoDebugTries)"],"exampleFix":"// before\nplandex tell -f plan.md --debug=true\n// after\nplandex tell -f plan.md --debug=3","handlingStrategy":"validation","validationCode":"v, err := strconv.Atoi(debugArg)\nif err != nil || v <= 0 {\n    return fmt.Errorf(\"--debug must be a positive integer\")\n}","typeGuard":"func isValidDebugVal(s string) bool {\n    v, err := strconv.Atoi(s)\n    return err == nil && v > 0\n}","tryCatchPattern":null,"preventionTips":["Always pass --debug a positive integer","Never quote or annotate the value (e.g. \"3 tries\")","Remember the flag takes a count, not a boolean","Let scripts default the value when unset"],"tags":["cli","validation","flags"],"backgroundTag":"invalid-flag-value","analyzedSha":"e2d772072efadbe41d2946d97d79be55532dbab5","analyzedAt":"2026-09-05T20:56:53.631Z","contentChangedAt":"2026-09-05T20:56:53.631Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}