Dippy icon indicating copy to clipboard operation
Dippy copied to clipboard

Make parse-error decision configurable (currently hardcoded to ask)

Open AJB-ajb opened this issue 8 months ago • 1 comments

Problem

When Dippy encounters a command with a bash syntax error (e.g. unclosed quotes, broken continuations), it falls through to Decision("ask", ...) in analyzer.py:58-59. This means the user gets prompted for commands that are clearly broken and should just be rejected.

Suggestion

Add a config directive like:

on_parse_error deny "Syntax error — fix and retry."

with ask as the default for backwards compatibility. This would let users opt into auto-denying unparseable commands instead of being prompted.

Current workaround

Manually patching the hardcoded "ask" to "deny" in analyzer.py.

Context

In practice, syntax errors in AI-generated commands are never intentional — auto-deny with a descriptive message lets the AI agent self-correct without interrupting the user.

AJB-ajb avatar Mar 23 '26 14:03 AJB-ajb

The trouble with auto-denying on parse error is that, in Dippy, a parse error doesn't reliably mean the command is broken — it can also mean the command is valid but uses syntax Parable can't parse yet. A live example landed just today: in #139, npm run dev &; … is perfectly valid zsh, but Dippy reports it as a parse error because &; isn't valid bash grammar. With on-parse-error deny, that working command would've been silently blocked instead of prompted.

That's the bind: a parse error is genuinely ambiguous between "you typo'd" and "Parable has a gap," and Dippy can't tell which — so it punts to you, the one party who can. Flipping the default to deny trades a one-time prompt on a real typo for silently breaking valid commands (and the agent then burning turns trying to "fix" syntax that was never wrong).

That's why I'd keep ask here — and treat the cases where you're getting prompted on clearly-valid commands as Parable coverage bugs worth filing, since fixing those removes the prompt at the source.

ldayton avatar Jun 08 '26 12:06 ldayton