Skip to content

fix(telemetry): stop reporting declined permission prompts as tool errors - #1662

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

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

Conversation

@altimate-software-factory

@altimate-software-factory altimate-software-factory Bot commented Nov 4, 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 telemetry loop in prompt.ts treated every errored tool part as a tool failure, including tool calls the user declined at the permission prompt, so a normal user decision was reported as a recurring permission tool error.

The reported message template matches the RejectedError text stored on the tool part by processor.ts, and prompt.ts turned every errored tool part into an error_fingerprint event without checking for a user rejection.

Fix

Tool calls the user declines at the permission prompt are no longer sent as error_fingerprint tool errors, while rule denials and all other permission failures are still reported.

Acceptance criteria

  • A tool part whose error is the user rejecting the permission prompt, with or without feedback, produces no error_fingerprint record
  • A tool part failing with a rule-based DeniedError or an OS permission error such as EACCES is still fingerprinted with error_class permission
  • An error that only mentions the rejection text in the middle is still fingerprinted

Changes

3 files changed, 50 lines added, 6 lines removed.

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

New tests

  • packages/opencode/test/telemetry/permission-rejection-fingerprint.test.ts

Independent review: accepted, confidence 0.88

Verification

  • Verify job: passed

Summary by cubic

Stops telemetry from reporting user-declined permission prompts as tool errors.

The telemetry loop in prompt.ts previously fingerprinted every errored tool part, so declining a permission prompt was recorded as a recurring permission tool error. Rule-based denials and other permission failures are still reported.

  • Adds isUserPermissionRejection to detect the exact rejection text stored on the tool part.
  • Keeps fingerprints for EACCES and other OS permission errors.
  • Adds tests covering rejections, denials, and EACCES.

Written for commit 7b2176f. 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 4, 2026
@coderabbitai

coderabbitai Bot commented Nov 4, 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: 1c1fe9de-4fc4-4870-9ea1-11448b26ecfe

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 4, 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.

@github-actions

github-actions Bot commented Nov 4, 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.

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