Human Intervention node displays unresolved variable references after page refresh during execution
Self Checks
- [x] I have read the Contributing Guide and Language Policy.
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report, otherwise it will be closed.
- [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
1.15.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
- Create a chatflow/app that uses a Human Intervention node.
- Configure the Human Intervention node's form content to reference an upstream text variable.
- Run the app and reach the pending human intervention card.
- Refresh the app page while the workflow is still waiting for human action.
- Check the form content shown in the human intervention card.
- Select one of the available actions.
Possibly related to #37588, but this report is specifically about the page refresh case: after refresh, the card initially renders the raw variable reference and only resolves it after an action is selected.
✔️ Expected Behavior
After refreshing the page during execution, the form content only shows the raw variable reference, for example {{#1778488854176.text#}}.
The actual text value is not visible until one of the actions is selected.
From the attached screenshots:
- Before selecting an action, the form content displays the variable reference.
- After selecting an action, the concrete text value is displayed.
❌ Actual Behavior
After refreshing the page during execution, the form content only shows the raw variable reference, for example {{#1778488854176.text#}}.
The actual text value is not visible until one of the actions is selected.
From the attached screenshots:
- Before selecting an action, the form content displays the variable reference.
- After selecting an action, the concrete text value is displayed.
Hi @severnxue-dify! I'm Dosu and I'm helping the Dify team.
Thanks for the detailed report. Based on my investigation, here's what's happening:
How it's supposed to work: When a workflow pauses at a Human Input node, the backend calls DifyHITLCallback.render_form_content_before_submission(), which uses VariablePool.convert_template() to resolve all upstream variable references (like {{#1778488854176.text#}}) into their concrete values [1]. The resolved content is stored as rendered_content in the database, and the API endpoint (GET /form/human_input/<token>) should return this pre-rendered content [2]. The frontend does not resolve these variables client-side — it expects the API to deliver already-resolved content [3].
Likely root cause: After page refresh, the form content API appears to be returning the raw template (with unresolved {{#nodeId.variable#}} references) instead of the rendered_content. The frontend's form content parser only recognizes {{#$output.field_name#}} patterns for input field placeholders [4], so upstream variable references like {{#1778488854176.text#}} pass through as raw text.
The fact that variables resolve correctly after selecting an action suggests that the post-action flow triggers a re-render or fetches from a different (correct) source.
Possible places to investigate:
- Whether
render_form_content_before_submission()is being called successfully during the initial pause — theVariablePoolmay not have the upstream node outputs available at that point - Whether the API response mapping in
HumanInputFormDefinitionResponse.from_form()is correctly returningrendered_contentvs. the rawform_contenttemplate [5] - Whether the
rendered_contentfield in the database actually contains resolved content for these forms
This appears to be a backend rendering/storage issue rather than a frontend parsing problem. The behavior you see (resolves after action) likely means the post-submission rendering path works correctly but the pre-submission rendered content is either not being stored or not being served from the correct field.
To reply, just mention @dosu.
Docs are dead. Just use Dosu.