Summary
Task Agent AGENT.md files declare template.parameters and use {{token}} placeholders in the prompt body. Today the parser validates that tokens are declared, but nothing substitutes values from work item state at run time.
Current behavior
- agent-parser.ts validates
{{tokens}} against template.parameters at parse time
? suffix marks optional parameters in declarations only — no runtime enforcement
- verifyIsTaskAgentState checks
workingDir, instructions, engineName, and sessionId — not template parameters
- Engines pass raw
agent.promptBody to the model with literal {{...}} still in the text (cursor-engine.ts, prompt.ts)
Desired behavior
- Render — substitute
{{parameterName}} in promptBody from work item state before the engine builds the final prompt
- Validate — parameters without a
? suffix are required in state; missing required parameters should fail before engine execution
- Optional — parameters declared with
? may be omitted from state
Docs
Usage guide describes this as planned behavior: using-task-agents.md
Out of scope
Workflow child enrichment (instructions, engineName, template params on task steps) — that remains the job of step decorators, not the workflow framework.
Summary
Task Agent
AGENT.mdfiles declaretemplate.parametersand use{{token}}placeholders in the prompt body. Today the parser validates that tokens are declared, but nothing substitutes values from work itemstateat run time.Current behavior
{{tokens}}againsttemplate.parametersat parse time?suffix marks optional parameters in declarations only — no runtime enforcementworkingDir,instructions,engineName, andsessionId— not template parametersagent.promptBodyto the model with literal{{...}}still in the text (cursor-engine.ts, prompt.ts)Desired behavior
{{parameterName}}inpromptBodyfrom work itemstatebefore the engine builds the final prompt?suffix are required instate; missing required parameters should fail before engine execution?may be omitted fromstateDocs
Usage guide describes this as planned behavior: using-task-agents.md
Out of scope
Workflow child enrichment (
instructions,engineName, template params on task steps) — that remains the job of step decorators, not the workflow framework.