Skip to content

OTel: emit active permission mode and per-call approval outcome (auto-approved / user-approved / denied) #5657

Backlog

Description

@k4otix

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_agent has no permission-mode attribute, whether launched with --allow-all or not.
  • The github.copilot.hook.start / end events for permissionRequest still fire under --allow-all, but carry no decision or outcome.
  • execute_tool spans 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

  1. github.copilot.permission.mode on invoke_agent, with values matching permissions.defaultMode (manual, assisted, allow-all) plus autopilot where it applies.
  2. 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).
  3. On each execute_tool span, github.copilot.permission.outcome: auto_approved_rule, auto_approved_mode, user_approved_once, user_approved_always, denied_rule, denied_user, denied_policy.
  4. On permissionRequest and preToolUse hook end events, the decision and a short reason (for example permissionDecisionReason, or the matching rule id). This is metadata, so it shouldn't need content capture.

Example prompts or workflows

  • Alert on git push --force main or rm -rf ~ only when permission.outcome starts with auto_approved.
  • Report how many sessions across the fleet run in allow-all or autopilot, and how that changes over time.
  • Confirm that the managed disableBypassPermissionsMode policy is actually being enforced, by detecting sessions where it should apply but permission.mode = allow-all.
  • Triage a policy-hook deny by reading its reason straight from the trace.

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions