Skip to content

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

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

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

Conversation

@altimate-software-factory

@altimate-software-factory altimate-software-factory Bot commented Nov 7, 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 step loop and the tool error wrapper treated a user declining a permission prompt as a tool failure, so each rejection was sent as a permission-class error fingerprint and a core_failure event.

The telemetry message is the masked text of the RejectedError message from packages/core/src/v1/permission.ts:72, which reaches the error_fingerprint loop as an errored tool part and is classified permission by keyword.

Fix

When a user rejects a permission prompt, the CLI no longer sends error_fingerprint or core_failure events, while config-rule denials and real permission failures are still reported.

Acceptance criteria

  • A tool call the user rejects at the permission prompt, with or without feedback, produces no error_fingerprint record and no core_failure event
  • A tool call blocked by a config rule (DeniedError) still emits core_failure
  • Messages like 'EACCES: permission denied' or 'Access denied' are still classified and reported as permission errors
  • The tool_call event with status error is still emitted for rejected calls

Changes

4 files changed, 106 lines added, 0 lines removed.

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

New tests

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

Independent review: accepted, confidence 0.86

Verification

  • Verify job: passed

Summary by cubic

Stops reporting user permission rejections as tool errors in telemetry.

Previously, declining a permission prompt was treated as a tool failure, sending permission-class error fingerprints and core_failure events. Now a user rejection (with or without feedback) produces no error_fingerprint or core_failure event, while config-rule denials and real permission failures like EACCES are still reported. The tool_call event with status: error is still emitted for rejected calls.

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

coderabbitai Bot commented Nov 7, 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: 8037a305-4d9b-4ec0-8f69-43d2664d0b69

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