Skip to content

Late tool-round failure hides already-committed side effects #24

Description

@serge-ivo

Severity: LOW. Found in the 2026-07-16 storage/AI sweep (deferred).

agent-do.ts + agent-think.ts: if a later tool round's provider call throws, runAgentThink throws and handleChat shows only "Error:…". Side effects already committed in earlier rounds (memory writes, create_task, record inserts) persist, and allToolLog is discarded — the user gets no confirmation that a task/record was created.

Note this is NOT the FGS drop-the-assistant-message bug (the user message is persisted and an error message is recorded) — the gap is that partial completed work is invisible.

Files:workers/api/src/agent-do.ts (:326-380 chat loop), workers/api/src/agent-think.ts (:371-451 tool rounds).

Fix sketch: on a late-round throw, still surface allToolLog (what succeeded) alongside the error, so committed side effects are acknowledged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions