Affected Component
AI Agents (Researcher/Developer/...)
Describe the bug
What happens: For a simple flow (e.g. prompt "print the hostname of this
machine"), the primary agent sometimes calls done with success: true and a
result that contains command output it never actually produced — no specialist
was delegated and no terminal command ran. The fabricated output is then stored
as the subtask result and surfaced to the user by the refiner/reporter as if it
were real.
What should happen: The primary agent should only report results that a specialist/tool actually produced in that subtask. A success that reports command output with no delegation and no tool execution should not be accepted at face value.
Additional context:
- Observed firsthand on a "print the hostname" flow: the report claimed the
hostname was
debian, but the flow'stermlogstable had no rows — no terminal command was ever run. Other flows that really executedhostnamedid havetermlogsand reported the real sandbox container id. - Reproduced on a clean stack (OpenAI). Measured phantom rate ~2/5 on the simple hostname prompt.
Root cause: The primary executor's done barrier handler
(backend/pkg/providers/provider.go, the FinalyToolName branch) only calls
Done.Validate() (backend/pkg/tools/args.go), which merely checks that
success is set. It never checks whether any delegation/tool call happened in
the subtask, so a success that reports unverified output is accepted and stored.
Steps to Reproduce
- Start a flow with a simple execution prompt such as "print the hostname of this machine" (OpenAI provider).
- Repeat a handful of times.
- Observe occasional flows that finish "successfully" reporting a hostname while
the flow's
termlogscontain no entry — i.e. nothing was executed and the value is fabricated.
System Configuration
- PentAGI Version: main (
h843dfeb) - Deployment: Docker Compose (default local stack)
- LLM Provider: OpenAI (default models)
Impact
Silent fabrication of results undermines trust in every flow report: an operator cannot tell a real finding from a hallucinated one.
This is a serious trust issue — if a "successful" result can be stored without any delegation or tool execution, every downstream report/refiner step becomes unreliable. The root cause analysis makes sense: Done.Validate() only checks that success is set, so unverified output is accepted at face value.
A couple of thoughts on the fix direction:
Thanks for including the phantom rate measurement (~2/5) — that makes the impact concrete.