Skip to content

Sessions & Custom Instructions

What Are Sessions?

A session is like a conversation with Copilot. Everything you discuss stays in that session's memory.

Aspect How It Works
Created when You launch copilot or open a new panel
Memory Remembers everything discussed within the session
Ends when You close the terminal or start a new session
Resume Type /resume to go back to any past session

Custom Instructions

Custom instructions tell Copilot who you are and how you like to work. They're loaded automatically in every session.

Where Is the File?

C:\Users\<your-username>\.copilot\copilot-instructions.md

What does the dot (.) mean?

The .copilot folder starts with a dot — this is a convention that means "hidden folder". On Windows, you might not see it in File Explorer unless you enable "Show hidden files".

What Can You Put in It?

  • Your name, role, and background
  • How you like answers formatted
  • Your learning style preferences
  • Environment details (like lab tenant info)
  • Anything you want Copilot to always know about you

How to Edit It

You can ask Copilot CLI to edit it for you! Just say:

"Add to my custom instructions that I prefer dark mode examples"

Or edit it manually with Notepad:

# This opens the file in Notepad for editing
notepad "$HOME\.copilot\copilot-instructions.md"

Backup

We set up an automatic daily backup to OneDrive:

  • Schedule: Daily at 9:00 AM
  • Location: OneDrive - Microsoft\CopilotCLI_Backups\
  • Keeps: Last 30 backups
  • Includes: All config files, plugins, session history (excludes large MCP server files)

The backup is managed by a Windows Scheduled Task called CopilotCLI_BackupInstructions.

# To see the scheduled task
Get-ScheduledTask -TaskName "CopilotCLI_BackupInstructions"

# To run a backup manually right now
& "$HOME\.copilot\backup-instructions.ps1"