Skip to content

fix(session): stop reporting user-cancelled tools as tool errors - #1621

Draft
altimate-software-factory[bot] wants to merge 1 commit into
mainfrom
factory/altimate_code/run-40850229986-1
Draft

altimate-software-factory[bot] wants to merge 1 commit into
mainfrom
factory/altimate_code/run-40850229986-1

Conversation

@altimate-software-factory

@altimate-software-factory altimate-software-factory Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Automated fix proposed by the Altimate software factory; a maintainer reviews every change.

The problem, fix and criteria below are the agent's own account; check them against the diff.

Problem

When a session was stopped, every unfinished tool part was closed as the error 'Tool execution aborted', and the prompt loop reported each one as an error_fingerprint tool failure even though the user had asked for the cancellation.

Fix

Tools the user's own Stop interrupted are no longer sent as error_fingerprint tool errors, while unrequested interruptions and real tool failures are still reported.

Acceptance criteria

  • An interrupted tool part is not tracked as a tool error when the session's abort signal fired
  • An interrupted tool part is still tracked when the session did not request the abort
  • A genuine tool error is tracked whether or not the session aborted

Changes

3 files changed, 62 lines added, 0 lines removed.

  • packages/opencode/src/session/processor.ts
  • packages/opencode/src/session/prompt.ts
  • packages/opencode/test/session/processor-tool-abort-telemetry.test.ts

New tests

  • packages/opencode/test/session/processor-tool-abort-telemetry.test.ts

Independent review: accepted, confidence 0.88

Verification

  • Verify job: passed

Summary by cubic

Stops reporting tools interrupted by the user's own Stop as error_fingerprint tool errors in telemetry.

  • Tool parts closed as "Tool execution aborted" after the session's abort signal fired are no longer tracked as tool errors.
  • Interruptions the session did not request and genuine tool failures are still reported.

Written for commit dc23c97. Summary will update on new commits.

View guided diff Turn on auto-fix

Factory lane: altimate_code.
Agent-Authored-By: altimate-factory
@altimate-software-factory altimate-software-factory Bot added the agent-authored Opened by the software factory label Oct 29, 2026
@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 72b7e41f-4bc9-4d90-9411-5a6e5bd4bc55

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.
  • "Cost side effects" section is missing or empty. Describe any model calls, queries or cloud resources whose cost grows with user data, or write "None".

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants