Duo Workflow - Agent unnecessarily runs ls
commands
Summary
While using Workflow to write simple tests for new (and nearly empty) Vue components, the agent repeatedly attempted to run ls commands to locate files, despite the prompt clearly specifying the exact file paths.
Details
Prompt included a clear instruction:
"The file structure is to go in spec/frontend/(*)
where (*)
is the same path as the component."
Despite this, the agent requested approvals to run a series of increasingly specific ls commands:
ls spec
ls spec/frontend
ls spec/frontend/ee
This behaviour was tedious and unexpected, especially given how simple the task was and how explicit the file structure was in the prompt.
Expected behavior:
The agent should recognize and use the provided file paths without needing directory lookups via ls especially because running ls
require approval whereas other tools for this task don't.
Suggested improvement: Consider prompt engineering or tool prioritization changes to prevent unnecessary approval request and avoid running ls as a tool call.
Example workflow:
- 1014541
Next steps:
- Try to reproduce the issue for further debugging.
- Attach screenshots of the workflow steps if available.
- Track recurrence to determine if it’s a systemic behaviour or edge case.
Implementation Plan
-
Update tool description / prompt to favour existing tools over run_command
-
Testing to ensure agent uses list_dir
overrun_command
tool