Repository navigation
fix(telemetry): stop reporting user permission rejections as tool errors - #1696
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
|
|
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. |
|
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. |
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
Changes
4 files changed, 106 lines added, 0 lines removed.
packages/opencode/src/altimate/telemetry/error-detail.tspackages/opencode/src/session/prompt.tspackages/opencode/src/tool/tool.tspackages/opencode/test/altimate/permission-rejection-telemetry.test.tsNew tests
packages/opencode/test/altimate/permission-rejection-telemetry.test.tsIndependent review: accepted, confidence 0.86
Verification
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_failureevents. Now a user rejection (with or without feedback) produces noerror_fingerprintorcore_failureevent, while config-rule denials and real permission failures likeEACCESare still reported. Thetool_callevent withstatus: erroris still emitted for rejected calls.Written for commit d69eb62. Summary will update on new commits.