fix(healing): escape stray {variable} placeholders that crash every LLM workflow generation - #167
Open
Sangaibisi wants to merge 1 commit into
Open
Conversation
… LLM generation
workflow_creation_prompt.md lines 26/29 contained single-braced {variable}
while the file is rendered with str.format(goal=..., actions=...) - every
call raised KeyError('variable') AFTER the browser agent had fully run,
so each generation attempt burned a complete agent session + LLM cost and
then died. This is the default path of generate_workflow_from_prompt.
After rendering, the LLM still sees the intended single-braced example.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
workflow_use/healing/prompts/workflow_creation_prompt.mdlines 26/29 contain single-braced{variable}while every other placeholder in the file is correctly escaped as{{...}}. The template is rendered withstr.format(goal=..., actions=...)(healing/service.py:296), so every call raisesKeyError('variable').Reproduce without any LLM key:
Impact
create_workflow_definitioncrashes after the browser agent has fully run — this is the default path ofgenerate_workflow_from_prompt(HealingService(use_deterministic_conversion=False), used by the CLI), so every generation attempt burns a complete agent session + LLM cost and then dies.Fix
Escape the two stray placeholders to
{{variable}}. After rendering, the LLM still sees the intended single-braced{variable}example text.Note
Found while auditing the replay/generation pipeline (see #165 for the recording-side findings). Happy to split or adjust if you'd like this folded into something larger.
🤖 Generated with Claude Code
Summary by cubic
Escaped two stray
{variable}placeholders inworkflow_use/healing/prompts/workflow_creation_prompt.mdto{{variable}}to stopKeyErrorfromstr.format. This fixes workflow generation crashes after the browser agent completes and avoids wasted sessions and cost.Written for commit cf7d6bf. Summary will update on new commits.