difyctl reports a successfully finished workflow as suspended after human input
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 20/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- bun, python, typescript
- Domain
- cli
Research direction
Start with the status ranking in cli/src/protocol/fold.ts (lines 28-39), where suspended outranks ended, and with foldEvent and finishFold in cli/src/call/fold.ts. Run the Bun reproduction from the issue: after workflow_finished with status succeeded, the result should report ended with the outputs and no stale form hint. A stream that stops while waiting for input must still report suspended. A linked pull request (#47194) is already open, so check it before starting.
Written by the indexing model from the issue text.
Description
Self Checks
- I have read the Contributing Guide and Language Policy.
- This is only for bug report, if you would like to ask a question, please head to Discussions.
- I have searched for existing issues search for existing issues, including closed ones.
- I confirm that I am using English to submit this report, otherwise it will be closed.
- 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- Please do not modify this template :) and fill in all the required fields.
Dify version
main at 5e38d73d8f44b3c899c0ee64dd8d038813a2194a
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
The get.run.event operation supports keeping its event stream open across a human-input pause. In the default CLI output mode, the run's final summary depends on whether the stream included the pause.
To reproduce locally from cli/, run the following with Bun. It calls the same functions that the CLI uses to summarize the SSE response.
bun -e '
import { newFoldResult, foldEvent, finishFold } from "./src/call/fold.ts"
const run = newFoldResult()
foldEvent(run, "human_input_required", {
workflow_run_id: "r1",
hints: [{ op: "submit.run.form", summary: "Approve", form: [] }]
})
foldEvent(run, "workflow_finished", {
workflow_run_id: "r1",
data: { status: "succeeded", outputs: { approved: true } }
})
console.log(JSON.stringify(finishFold(run)))
'
✔️ Expected Behavior
Once the same run emits workflow_finished with status: "succeeded", the CLI reports ended with the final outputs. The completed form is no longer offered as a next step. A stream that ends while waiting for human input should still report suspended with the form hint.
❌ Actual Behavior
The result contains "status":"suspended", the earlier form submission hint, and "outputs":{"approved":true} together. Sending the same finish event on its own produces ended. An automation reading the summary can therefore ask for approval after the run has already completed.
The fold status order ranks suspended above ended. This reproduction exercises the CLI fold locally. The server-side option is defined in the run events endpoint.
- Dominant language
- Python
- Stars
- 162k
- Forks
- 25.6k
- Avg merge
- 15h 9m
- Merged PRs (30d)
- 606
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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.
More from langgenius/dify
-
OpenSearch: text_exists() queries OpenSearch _id instead of metadata.doc_id, so it always returns False for indexed chunksPossibly taken @SanemIzci claimed this 1 day ago. Open🐞 bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
langgenius/dify#47109 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Log only execution identifiers when a workflow worker starts a runPossibly taken @kinglegendzzh claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langgenius/dify#47094 · 2 reactions ·
Maintainers usually reply within 1 day
-
Node.js SDK declares a response body for 204 conversation deletionPossibly taken @Wang-Zephyr claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
langgenius/dify#46883 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Provider IDs with a trailing newline are silently accepted and propagatedPossibly taken @Batianxieshen1 claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
langgenius/dify#46875 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Agent Python SDK polling rejects function-tool results that SSE acceptsPossibly taken @EndlessRoad-max claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
langgenius/dify#46868 · 1 reaction ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
micronaut-projects/micronaut-core#14585 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
langgenius/graphon#443 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
[BUG]: Management endpoints /v1/memory/stats and /v1/memory/counts bypass API key authenticationOpen
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
docling-project/docling-serve#788 ·
Maintainers usually reply within 1 day
-
Mend: dependency security vulnerability untriaged
Difficulty 1/5 Under an hour Newbie friendliness 78/100
opensearch-project/cross-cluster-replication#1805 ·
Maintainers usually reply within 1 day