Shell Escape When Passing Prompts to Helper
# Shell-escape pitfall when passing a real goal prompt to the helper script
## The problem
`scripts/generate_goal_prompt.py --json "<prompt>"` is documented as the standard
invocation, but real prompts contain `()`, single quotes, double quotes, backslashes,
and embedded multi-line bullets. When the agent invokes this through a terminal
tool that pipes the command through `bash -c` or `fish -lc '...'`, **bash's `eval`
chokes on the unescaped parens** before the Python script ever runs.
Symptom you'll actually see in `mcp_terminal`:when to use it
Community prompt sourced from the open-source GitHub repo srinitude/hermes-goal-prompt-generator (MIT). A "Shell Escape When Passing Prompts to Helper" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
codingcommunitydeveloper
source
srinitude/hermes-goal-prompt-generator · MIT
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions