Answer: Use the userPromptSubmitted hook to record when users submit prompts to Copilot CLI, creating a logging script such as .github/hooks/scripts/log-prompt.sh (Bash) or .github/hooks/scripts/log-prompt.ps1 (PowerShell) that writes entries to .github/hooks/logs/audit.jsonl. Status: Confirmed Entry: tool/github-copilot/privacy-and-data/log-prompts-for-auditing Revision: 2 Digest: sha256:93852a051dd03a5a (changes whenever the content changes) Timeline: Created: 2026-11-13T03:33:11Z Last changed: 2026-11-17T13:35:04Z (log directory permissions: — → 700) Last verified: 2026-11-20T13:15:08Z Next check: 2026-11-21T13:15:08Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of hook | userPromptSubmitted | [1] | 2026-11-20 bash script path | .github/hooks/scripts/log-prompt.sh | [1] | 2026-11-20 powershell script path | .github/hooks/scripts/log-prompt.ps1 | [1] | 2026-11-20 log file | .github/hooks/logs/audit.jsonl | [1] | 2026-11-20 log directory permissions | 700 | [1] | 2026-11-20 Sources: [1] GitHub. "Rolling out Copilot CLI hooks for your teams - GitHub Docs". https://docs.github.com/en/copilot/tutorials/copilot-cli-hooks Role: primary. Accessed: 2026-11-20T13:15:08Z Quote: "Use the userPromptSubmitted hook to record when users submit prompts to Copilot CLI." (Supports: hook) Quote: "Create .github/hooks/scripts/log-prompt.sh :" (Supports: bash script path) Quote: "Create .github/hooks/scripts/log-prompt.ps1 :" (Supports: powershell script path) Quote: "check .github/hooks/logs/audit.jsonl for a new log entry." (Supports: log file) Quote: "chmod 700 "$LOG_DIR"" (Supports: log directory permissions) Snapshot SHA-256: f8bc9b4504be46c82f4ab2f6638a21f9a0f0c9452b9ebe6251ce4b57894be72b (captured 2026-11-18T13:11:33Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:11:36Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:15:08Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:15:08Z Last attempt: 2026-11-20T13:15:08Z Notes and limitations: Extracted automatically from a single official source (section "4. Log prompts for auditing"). Related: https://latestn.com/tool/github-copilot/privacy-and-data/manage-copilot-memory-retention How do I manage GitHub Copilot Memory retention for an enterprise or organization? https://latestn.com/tool/github-copilot/privacy-and-data/memory-retention-expiry How long does GitHub Copilot Memory retain memories before they expire? https://latestn.com/tool/github-copilot/privacy-and-data/opentelemetry-data-sent What data does GitHub Copilot send when OpenTelemetry is enabled? https://latestn.com/tool/github-copilot/privacy-and-data/export-delete-user-preferences How do I export or delete user-level preferences for GitHub Copilot Memory in an enterprise or organization? https://latestn.com/tool/github-copilot/privacy-and-data/hooks-audit-redact How do I set up GitHub Copilot SDK hooks for auditing and redacting secrets? https://latestn.com/tool/github-copilot/privacy-and-data/integration-data-usage How does GitHub Copilot handle data usage with integrations? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-17T13:35:04Z | changed | log directory permissions: — → 700 | [1] 2026-11-17T13:35:04Z | changed | powershell script path: — → .github/hooks/scripts/log-prompt.ps1 | [1] 2026-11-17T13:35:04Z | changed | bash script path: — → .github/hooks/scripts/log-prompt.sh | [1] 2026-11-17T13:35:04Z | changed | log directory: .github/hooks/logs → — | [1] 2026-11-17T13:35:04Z | changed | PowerShell script path: .github/hooks/scripts/log-prompt.ps1 → — | [1] 2026-11-17T13:35:04Z | changed | Bash script path: .github/hooks/scripts/log-prompt.sh → — | [1] 2026-11-13T03:33:11Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/privacy-and-data/log-prompts-for-auditing/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/github-copilot/privacy-and-data/log-prompts-for-auditing POST: https://latestn.com/dispute/tool/github-copilot/privacy-and-data/log-prompts-for-auditing with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/privacy-and-data/log-prompts-for-auditing?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I log Copilot CLI prompts for auditing? Revision 2, last verified 2026-11-20T13:15:08Z. https://latestn.com/tool/github-copilot/privacy-and-data/log-prompts-for-auditing (accessed 2026-11-21T09:59:06Z). @misc{LatestN_tool_github_copilot_privacy_and_data_log_prompts_for_auditing_r2, title = {How do I log Copilot CLI prompts for auditing?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/privacy-and-data/log-prompts-for-auditing}}, note = {Revision 2; digest sha256:93852a051dd03a5a; last verified 2026-11-20T13:15:08Z; accessed 2026-11-21T09:59:06Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/github-copilot/privacy-and-data/log-prompts-for-auditing