trailheadapps / trailheadapps/agent-script-recipes
When calling actions, Agent Script doesn't support expressions in string parameters
Open
@pozil is already working on this.
Since Jan 7, 2026.
bug
product-limitation
- Dominant language
- Apex
- Stars
- 135
- Forks
- 82
- Avg merge
- 10m
- Merged PRs (30d)
- 4
Description
Summary
When calling actions, Agent Script doesn't resolve expressions in string input parameters.
For example, in this action:
run @actions.log_event
with event_type="reasoning_started"
with event_data="Turn: {!@variables.turn_count}"
expressions are not evaluated and this produces the following event_data value:
Turn: {!@variables.turn_count}
This affects at least the AfterReasoning recipe.
Salesforce Org Type
Scratch Org
Steps To Reproduce
- Run the test instructions for AfterReasoning.
- Open the Agent Log Events tab and look at the Event Data field values.
Current Behavior
The expressions aren't evaluated in the log Event Data field and produce things like:
Turn: {!state.turn_count}
Expected Behavior
Expressions should be evaluated as in
Turn: 1
Code of Conduct
- I agree to follow this project's Code of Conduct
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.