langgenius / langgenius/dify

referencing #40671

Open
#40,674 9 comments 1 reaction 0 assignees View on GitHub
💪 enhancement
Dominant language
TypeScript
Stars
156k
Forks
24.6k
Avg merge
22h 9m
Merged PRs (30d)
610

Description

### Self Checks

- [X] I have read the [Contributing Guide]() and [Language Policy]().
- [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] Please do not modify this template :) and fill in all the required fields.

### 1\. Is this request related to a challenge you're experiencing? Tell me about your story.

**Update, with real test data:** tested a parameter-renaming mitigation
(see langgenius/dify#40671) using real disposable tasks so the Agent had genuine matches
to find. Results revealed a second, distinct failure mode beyond the
original zero-tool-call fabrication:

| | Zero-call fabrication | Wrong-parameter dispatch |
| -- | -- | -- |
| Tool dispatched? | No | Yes |
| Runner accepts as success? | Yes (no validation) | Yes (no validation) |
| Failure locus | Runner loop | Model hallucinates argument value |
| DB side-effect | None | Row written with wrong identifier |
| Detection difficulty | Empty trace, easy to spot | Row looks legitimate, wrong record targeted |

The wrong-parameter case is arguably higher severity: a zero-call
fabrication leaves no trace and a human audit catches the absence. A
wrong-argument call writes a row that *looks* legitimate — an approver
trusting the description rather than independently verifying the actual
identifier would approve based on false context.

**Revising the ask accordingly:** the proposed guard should validate not
just that a tool was called, but that the tool's actual response contains
a verifiable identifier matching what was requested (e.g. the real
task_id echoed back by the underlying API), not merely that
tool_responses is non-empty. This closes both failure modes with one
mechanism.

Full trial data with real task IDs and the exact "Team not authorized"
evidence for the wrong-parameter case is in langgenius/dify#40671.

### 2\. Additional context or comments

*No response*

### 3\. Can you help us with this feature?

- [ ] I am interested in contributing to this feature.

Contributor guide

Open the contributing guide

Research direction

Start by reading the real trial data and exact evidence in issue #40671, then trace the agent tool-dispatch and response-validation entry points discussed there. Define done as rejecting both zero-call fabrications and calls whose response lacks a verifiable identifier matching the requested record, with coverage for both failure modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.