Skip to content

Module tool error results are traced as tool:completed #388

Open

Description

@Anarchid

What is wrong. dispatchToolCallEvent (src/framework.ts ~15342 on main) emits tool:completed for every result storableToolCall resolves with, including { success: false, isError: true }; only a rejected promise reaches tool:failed. The other dispatchers branch on the result: utils on result.success, and the channel, save-image, read-image and fetch-reference paths on result.isError.

Why it matters. A module tool that answers with an error (including #372's new "Nothing was done: …" refusals) looks like a success in traces, dashboards, fleet reducers subscribed to tool:completed/tool:failed, and postmortem tooling, while the same refusal through utils is traced as failed.

How found. Review of #372 (review); the merge-base has the same unconditional emit.

Suggested fix. Emit tool:failed with result.error when result.isError === true || result.success === false.

Posted by the maintainer's desk assistant.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions