Skip to content

fix(prompt): a skill named like a template argument no longer empties the prompt - #1792

Closed
ian-at-strix wants to merge 1 commit into
mainfrom
fix/skill-named-like-template-arg
Closed

ian-at-strix wants to merge 1 commit into
mainfrom
fix/skill-named-like-template-arg

Conversation

@ian-at-strix

Copy link
Copy Markdown
Contributor

render_system_prompt passed every loaded skill body to the template as a keyword argument named after the skill, next to its own arguments. A skill named methodology (new in #1779), interactive, is_root, … raised a duplicate-keyword error, which the renderer catches, so the agent ran with an empty system prompt. Example: strix --skills-dir ./skills --skills custom/methodology.

The template reads skills only through get_skill, so this drops the keyword spread. Regression test included; it fails on main.

… the prompt

The template reads skill bodies through get_skill, so passing them as keyword
arguments too only let a skill named methodology, interactive or is_root
collide with the template's own arguments and empty the whole prompt.
@arcanist

arcanist Bot commented Nov 19, 2026

Copy link
Copy Markdown

Ready to merge Re-run Arcanist review

PR summary

A skill whose name matched a template argument could leave an agent with an empty system prompt. The renderer now passes skill bodies only through the skill lookup, so those skills render without erasing the prompt.

🔴 High blast radius. If this breaks (1):
  1. A prompt rendering failure leaves agents running the pentest without their operating rules. The exception handler returns an empty prompt and lets agent construction continue.
Flow diagram
%%{init: {"theme": "neutral"}}%%
flowchart LR
  n0["Agent factory"]
  n1["Factory requests the agent prompt"]
  n0 --> n1
  n2["Skills stay out of template inputs"]
  n1 --> n2
  n3["Renderer returns the prompt"]
  n2 --> n3
  pad["#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;#nbsp;"]
  n3 ~~~ pad
  style pad fill:none,stroke:none
Loading
✅ Ruled out (1)
  • Could removing skill arguments omit skill bodies?
    No, both paths still fetch the loaded bodies through the same lookup, so removing the duplicate keyword arguments does not omit them.

@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

Fixes empty system prompts when a loaded skill shares a name with a template argument.

  • Skills named like prompt inputs still appear in the system prompt.

No actionable issues found.

Reviews (2) · Last reviewed commit: "fix(prompt): a skill named like a templa..." · Reviewed by Greptile

@ian-at-strix

Copy link
Copy Markdown
Contributor Author

Superseded by #1782, which removes --methodology.

@ian-at-strix
ian-at-strix deleted the fix/skill-named-like-template-arg branch November 19, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant