Repository navigation
Backlog
Labels
Description
Describe the feature or problem you'd like to solve
The native OTel export doesn't say whether a tool call was approved by a human or ran automatically. There is no attribute for the session's permission mode (manual / assisted / allow-all / autopilot) or for how each call was approved.
Checked on 1.0.119 with a file exporter:
invoke_agenthas no permission-mode attribute, whether launched with--allow-allor not.- The
github.copilot.hook.start/endevents forpermissionRequeststill fire under--allow-all, but carry no decision or outcome. execute_toolspans have no approval attribute.
For security teams, "a destructive command ran" and "a destructive command ran with no human in the loop" are very different severities. Today that can only be guessed from process command lines on the endpoint, which miss mode changes made in-session (/allow-all, /permissions), settings-based defaults, and resumed sessions.
Proposed solution
github.copilot.permission.modeoninvoke_agent, with values matchingpermissions.defaultMode(manual,assisted,allow-all) plusautopilotwhere it applies.- A span event when the mode changes mid-session (for example
github.copilot.permission.mode_changed, with old value, new value and source:flag,slash_command,managed_policy,resume). - On each
execute_toolspan,github.copilot.permission.outcome:auto_approved_rule,auto_approved_mode,user_approved_once,user_approved_always,denied_rule,denied_user,denied_policy. - On
permissionRequestandpreToolUsehook end events, the decision and a short reason (for examplepermissionDecisionReason, or the matching rule id). This is metadata, so it shouldn't need content capture.
Example prompts or workflows
- Alert on
git push --force mainorrm -rf ~only whenpermission.outcomestarts withauto_approved. - Report how many sessions across the fleet run in allow-all or autopilot, and how that changes over time.
- Confirm that the managed
disableBypassPermissionsModepolicy is actually being enforced, by detecting sessions where it should apply butpermission.mode = allow-all. - Triage a policy-hook deny by reading its reason straight from the trace.
Additional context
- Related: Non-interactive sessions bypass
disableBypassPermissionsModemanaged setting #4528. Non-interactive-p --yolobypassesdisableBypassPermissionsMode. Telemetry would make that kind of gap visible. - Related: allow-all mode resets after long inactive period #4696 and PC waking from sleep:
/yolono longer works; have to approve every request until I restart session #4618. Allow-all mode silently resets after inactivity or sleep, which shows the mode changes during a session and needs a change event, not just a start-time value. - Related: Hooks: include the tool call id in preToolUse, postToolUse and postToolUseFailure input #5261 (tool call id in hook input) and Feature: Emit a dedicated event when user switches to a custom agent via /agent #2838 (event when the custom agent changes). These are similar requests for session-state and attribution signals.
Activity