AZ-401: Copilot Agent Session Logs and Change Evidence
To review a Copilot change, open the selected session's supported log view, trace its commits to the exact candidate, and compare recorded tool activity with the original validation results. Preserve the command, execution context, outcome and changed revision needed to assess each claim. A session narrative or a signed commit can help explain provenance; acceptance still requires evidence that the intended checks actually ran on the relevant change.
The procedure below collects that evidence from an existing authorized GitHub Copilot session. It separates repository-visible cloud sessions, local-session sharing and synced-history queries, then defines a restricted handoff and owner-controlled retention decision. It is an illustrative review procedure: no session was started, log collected, test run or repository setting changed for this article.
Establish the session and evidence boundary
Use AZ-401: Agent Requirements Skills and Bounded Work Loops to establish the task's intended behavior, permitted actions, required checks and stop conditions. Use AZ-401: Pull Request Enforcement for Human and Copilot Changes to establish who can review or merge the result. This procedure collects evidence for those decisions; it does not configure their controls.
Choose one existing benign task and its actual repository change. Obtain the owner's agreement on the review scope and the evidence that may be retained. Confirm the selected Copilot surface is available under the account, plan and organization policy before relying on its interface.
Record these real inputs:
- Repository, initiating user, session and selected Copilot surface.
- The task's approved outcome and required verification.
- The relevant branch, commit identifiers and pull request (PR), if one exists.
- An authorized reviewer with the necessary access.
- The approved destination, recipients and retention owner for collected evidence.
Keep cloud and local execution environments distinct. GitHub's application card describes different permissions and data flows across agent experiences. The presence of a session list in one client does not establish a universal filesystem log location or equivalent evidence in another.
If the session or required records are unavailable, stop the affected review claim and report the missing input. Do not create another session and present its results as evidence about the original candidate.
Open the supported session and commit views
For the GitHub surface, use the agents panel or Copilot home page to locate the session. Select it to open its overview and session log. Confirm the repository, initiating task and session identity before copying observations; a similar task title is insufficient.
Inspect the log for the progression of the task and the tools used. Note where validation was attempted and where an error, interruption or missing output limits what can be established. Treat the log as material to inspect, rather than assuming every activity caption denotes a completed operation.
For a Copilot cloud-agent commit, inspect the actual commit message and follow its session-log link. Compare the linked session with the selected task and review the commit's actual diff. The documented authorship and initiating-user co-authorship help connect the work to its origin.
Record the commit identifier and whether later changes exist. If the PR contains additional human or agent commits, distinguish them from the commit associated with the observed session. A test result from an earlier state cannot silently stand for the changed candidate.
A GitHub Verified signature establishes a signature-verification property. It does not establish functional correctness, test execution, human approval or authority to merge.
Preserve the actual visibility conditions
Confirm the session type before deciding who can inspect the evidence.
| Surface or operation | Condition to preserve in the review record |
|---|---|
| Copilot cloud session | Repository access governs its repository-visible session view; do not describe it as a private personal notebook. |
| Local session sharing | Local sessions begin unshared. Supported sharing can give repository collaborators view-only access, without steering or modification rights. |
| Querying session history | Querying concerns sessions the querying user started; another person's shared session is not thereby added to that user's query results. |
| Synced-history queries | The account's sessions must be synced, with applicable organization policy and opt-out settings permitting the feature. |
For an existing local session, use the sharing controls only if the owner approved sharing with the intended collaborators. A failed access attempt is a reason to check the actual account and scope, not to make the repository public or grant broad permissions.
If querying is available, use a narrow natural-language question to locate the user's relevant past work, then inspect the actual session returned. A query answer is a navigation aid, not a replacement for the underlying record. If syncing was disabled or the organization's local-session storage policy does not permit it, record querying as unavailable.
Do not change synchronization or organization policy merely to complete an audit. Ask its owner to determine an authorized evidence path. Keep a local session's visibility, a cloud session's repository access and a user's query eligibility as separate facts.
Build a candidate-bound evidence record
Use the following recommended record in the team's existing approved review system. It is an editorial collection model, not a GitHub export schema or a promise that every field appears in every log.
| Field | What to record from the actual evidence |
|---|---|
| Source identity | Repository, surface, session and original log or commit location |
| Candidate | Commit or saved diff assessed, including later changes |
| Task progress | Material tool actions, errors and stopping point |
| Check execution | Actual command, relevant working context and observed start/end information where available |
| Result | Actual exit result, meaningful output, failed cases and skipped or unavailable checks |
| Check provenance | Actual workflow/run and reporting identity where a repository check exists |
| Limits | Missing output, unavailable context or uncertainty about the candidate checked |
| Review ownership | Reviewer, unresolved findings and authorized next decision |
Preserve enough context for another reviewer to distinguish intention from execution. If a command is shown without its completed output or result, label that gap. If the surface does not expose a particular observation, do not invent it from the surrounding narrative.
For a PR check, follow the actual reported check to its underlying run when accessible. Compare its revision, producer and outcome with the candidate being reviewed. Keep the original failure alongside any later authorized attempt, with the corresponding revision for each.
Do not claim every test passed merely because one command exited successfully. Inspect what the command tested and whether it covered the agreed behavior. A formatter, linter and behavioral test supply different evidence.
Decide what the observations support
Consider an existing task intended to reject an invalid input while preserving valid behavior. The following is an illustrative assessment matrix; it reports no observed results.
| Evidence state | Review decision |
|---|---|
| The agent says the change is tested, but no execution result is available | Record the claim as unverified; obtain the missing evidence through the task owner. |
| A validation command failed | Preserve its actual failure and candidate; do not relabel it as a completed success. |
| The required invalid and valid cases ran on the selected candidate with inspectable results | Assess those results against the agreed behavior, while retaining their coverage limits. |
| A check passed before an additional code change | Determine what must be revalidated for the current candidate. |
| A protected-branch requirement reports skipped or neutral | Inspect whether the intended validation executed; an accepted status category alone does not prove it did. |
| Logs and checks support the task, but required review is outstanding | Hand off evidence and preserve the review requirement. |
GitHub protected-branch behavior depends on the actual requirements, expected status producers and bypass permissions. A readable log or a successful command supplies no independent merge authorization. Conversely, inability to read a session is not proof that the code is defective; it is an evidence or access gap that must remain explicit.
Artificial intelligence (AI) summaries can organize observations, but verify every material conclusion against the underlying diff, command result and current candidate. Human review and testing remain necessary because agent-generated changes can be inaccurate or insecure.
Minimize sensitive data before retaining evidence
Inspect the material before copying it into a wider review channel. Prompts, responses, file changes and command output can reveal repository information or sensitive inputs. Retain only what the approved review needs and keep access within the owner's permitted audience.
GitHub Actions secure-use guidance warns that automatic secret redaction is not guaranteed. Avoid placing credentials in prompts, fixtures or evidence records; do not deliberately leak a credential to test masking. If an actual exposure is discovered, restrict further disclosure and involve the responsible owner for the applicable response and credential rotation.
Reading an execution log also does not establish that executing the underlying code was safe. Privileged workflows, untrusted checkout and persistent self-hosted runner environments have their own trust boundaries. Evidence collection must not broaden token privileges or run an unfamiliar contribution simply to obtain a reassuring result.
Record retention and close the review
Agree with the evidence owner on what must be preserved, where it may be stored, who may read it and when its retention decision will be revisited. Record those as the organization's decisions. This procedure supplies no fixed vendor retention period, universal export interface or automatic transfer into Log Analytics.
Keep the original location and candidate identity with the retained evidence. If copying is not authorized, retain an appropriately restricted reference and record the resulting availability limitation. Do not describe a reference as an independently preserved copy.
Stopping and archiving are different from retaining a review record. The documented cloud-session stop action ends its GitHub Actions run and preserves commits already pushed; archive removes a stopped session from the sessions list. Cloud sessions can be archived but not deleted through that documented distinction. Neither action demonstrates that the team's separately retained evidence was removed.
For an inspection-only review, leave session state and repository controls unchanged. If an owner separately authorizes cleanup or a sharing change, confirm the permitted surface and restore only the owned change. Do not stop another person's active work, delete shared records or remove branch protection as cleanup.
Hand off the selected candidate, supported validation conclusions, failures, evidence limits and unresolved owner decisions. AZ-401: GitHub Agentic Workflows and Mediated Writes addresses the related workflow mechanism; AZ-401: Run Artifact Retention and Evidence Preservation addresses the separate storage and retention boundaries. A useful audit trail makes these limits reviewable without promoting a fluent summary into a test result or approval.
Authoritative Sources
- Managing agent sessions — Supported session and commit views, sharing, synced queries and stop/archive distinctions.
- Application card: GitHub Copilot Agents — Surface-specific environments, limitations, human review and testing.
- Secure use reference — Sensitive information, untrusted execution and runner trust boundaries.
- About protected branches — Required reviews/checks, status producers and bypass conditions.

