Skip to content

fix(telemetry): stop reporting user permission rejections as tool errors - #1697

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

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

Conversation

@altimate-software-factory

@altimate-software-factory altimate-software-factory Bot commented Nov 8, 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

The session telemetry loop turned every failed tool call into an error fingerprint, including calls that failed only because the user chose to reject the permission prompt, which is an expected decision rather than a tool failure.

Fix

Tool calls that fail only because the user rejected the permission prompt are no longer recorded as error_fingerprint tool errors, while config denials and other permission failures still are.

Acceptance criteria

  • A tool part whose error is the user-rejected-permission message produces no error_fingerprint record
  • A tool part whose error is the user-rejected-with-feedback message produces no error_fingerprint record
  • Config-rule denials and OS permission-denied errors still produce error_fingerprint records
  • isUserRejection returns true for the real RejectedError and CorrectedError strings and false for DeniedError

Changes

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

  • packages/opencode/src/altimate/telemetry/error-detail.ts
  • packages/opencode/src/session/prompt.ts
  • packages/opencode/test/telemetry/user-rejection.test.ts

New tests

  • packages/opencode/test/telemetry/user-rejection.test.ts

Independent review: accepted, confidence 0.88

Verification

  • Verify job: passed

Summary by cubic

Fixes the session telemetry loop so user rejections of permission prompts are no longer recorded as error fingerprints.

Tool calls that fail only because the user rejected or corrected the permission prompt are now skipped, while config-rule denials and other permission failures still produce error fingerprints. Adds isUserRejection to distinguish those cases and tests covering the real rejection and denial messages.

Written for commit 1636c79. 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 Nov 8, 2026
@coderabbitai

coderabbitai Bot commented Nov 8, 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: ca11c777-e721-4b86-943e-52a0e70d300e

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

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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

@github-actions

github-actions Bot commented Nov 8, 2026

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

github-actions Bot commented Nov 8, 2026

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