trailheadapps / trailheadapps/agent-script-recipes

When calling actions, Agent Script doesn't support expressions in string parameters

Open
#30 2 comments 1 reaction 1 assignee View on GitHub

@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
  1. Run the test instructions for AfterReasoning.
  2. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.