Repository navigation
fix(telemetry): stop reporting declined permission prompts as tool errors - #1662
altimate-software-factory[bot] wants to merge 1 commit into
Conversation
Factory lane: altimate_code. Agent-Authored-By: altimate-factory
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
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. |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
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
Changes
3 files changed, 50 lines added, 6 lines removed.
packages/opencode/src/altimate/telemetry/error-detail.tspackages/opencode/src/session/prompt.tspackages/opencode/test/telemetry/permission-rejection-fingerprint.test.tsNew tests
packages/opencode/test/telemetry/permission-rejection-fingerprint.test.tsIndependent review: accepted, confidence 0.88
Verification
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.
isUserPermissionRejectionto detect the exact rejection text stored on the tool part.Written for commit 7b2176f. Summary will update on new commits.