# delete a session by ID
+/session delete-all # delete all sessions`} label="The /session delete command removes sessions you no longer need:" />
+ You can also press x on a highlighted session in the session picker (--resume) to delete it directly from the list.
+ In the session picker, press s to cycle the sort order: relevance, last used, created, or name. The picker also shows the branch name and idle/in-use status for each session.
+ The /rewind command opens a timeline picker that lets you roll back the conversation to any earlier point in history, reverting both the conversation and any file changes made after that point. You can also trigger it by pressing double-Esc:
+
+ Use /rewind when you want to branch off from a different point in the conversation, rather than just undoing the most recent turn.
+ The /undo command reverts the last turn—including any file changes the agent made—letting you course-correct without manually undoing edits:
+
+ Use /undo when the agent’s last response went in an unwanted direction and you want to try a different approach from that point.
+ The /fork command (v1.0.45+) copies the current session into a new independent session that starts from the same conversation state. The original session continues unchanged — you can switch back to it at any time. This is useful when you want to explore two different approaches to a problem simultaneously. In v1.0.64+, /branch is available as an alias for /fork (matching Claude Code’s command naming):
+
+ After forking, the new session is immediately active. Both sessions share the same history up to the fork point but accumulate changes independently from that moment forward. Use /fork to experiment with a risky refactor without abandoning your current working session. Since v1.0.47, forked sessions display their origin session name in the sessions dialog, making it easy to trace which session a fork came from.
+ The /cd command changes the working directory for the current session. Since v1.0.65, the working directory persists when you resume a session — if you restart the CLI and resume, you return to the same directory automatically. Changing directory also triggers discovery of custom agents in the new location, so switching to a different project loads its agents without a restart:
+
+ This is useful when you have multiple backgrounded sessions each focused on a different project directory.
+ The /worktree command (v1.0.61+, also aliased /move) creates a new git worktree and switches into it, moving any uncommitted changes along. This lets you start working on a parallel branch without leaving your current terminal session:
+
+ In v1.0.66+, you can pass a task description to /worktree to name the branch from the task and immediately run the task as the first prompt in the new worktree — all in one step:
+
+ This creates a branch named from your task description and begins working on it immediately, making it easy to spin up parallel work without stopping to think of a branch name.
+ After the command runs, the session is inside the new worktree. Use this when you want to work on a second task in parallel without stashing changes or opening a new terminal. In v1.0.64+ you can also use the experimental --worktree flag at startup (copilot -w [name]) to create or reuse a worktree under <repo>.worktrees/ before the session begins.
+ The /every command (also available as /loop since v1.0.64) schedules a recurring prompt to run automatically at a specified interval. The companion /after command runs a prompt once after a specified delay. Both are useful for self-paced automation — polling for results, periodically summarizing progress, or triggering other slash commands on a timer:
+
+ The interval can be specified in seconds (s), minutes (m), or hours (h), and both commands can invoke other slash commands as their payload. To see and manage all your scheduled prompts, use /every with no argument — it opens the schedule manager. To cancel a running schedule, use /every stop or Ctrl+C.
+
+ Experimental:
+ /every, /loop, and /after are part of the experimental feature set. They appear in the /experimental slash command list — enable experimental features if they are not already visible in your current session.
+
+
+ Note:
+ Scheduled prompts run in the background of the current session and use your active model. They share the session context window, so very frequent scheduling with long responses may consume context rapidly. Use /compact if context usage becomes a concern.
+
+ The /pr auto command (v1.0.66+) starts a self-paced automation loop that drives the current pull request to CI green. Rather than running continuously, it fixes one failing item per run and paces itself around CI checks to avoid redundant work:
+
+ /pr auto is ideal when you have a PR with failing tests or linting errors — let it work through failures one at a time while you focus on other things. /pr automerge extends this further: it continues until all CI checks pass, required reviews are approved, and the PR is successfully merged. Both commands can be monitored and stopped from /loop or /every, which register the running automation as a scheduleable loop task.
+ The /delegate command creates a delegate PR — a pull request that the coding agent works on autonomously. By default, the delegate PR targets your current branch. Use --base (v1.0.69+) to specify a different target base branch:
+
+ This is useful when you want to hand off a task to the coding agent on a specific branch — for example, backporting a fix to an older release branch or targeting a long-lived feature branch for automated work.
+ The /share html command exports the current session — including conversation history and any research reports — as a self-contained interactive HTML file:
+
+ The exported file contains everything needed to view the session without a network connection and can be shared with teammates or stored for later reference. This complements /share (which shares via URL) for cases where an offline or attached format is preferred.
+ The /chronicle command opens an interactive timeline of everything the agent has done in the current session. It shows file changes, tool calls, and conversation turns in chronological order, letting you review the full arc of the session at a glance:
+
+ Chronicle tracks which files were created, modified, or deleted during the session alongside the conversation that led to those changes. Use it to review what happened before a /rewind, audit what the agent changed, or share a summary of session activity with teammates.
+ The /chronicle skills review subcommand (v1.0.66+) opens an interactive review flow for proposed draft skill changes. When the agent has suggested additions or modifications to skills during a session, you can review each draft individually and choose to accept, reject, or defer:
+
+ This keeps you in control of skill evolution — the agent can propose skill improvements as it discovers reusable patterns, but nothing is applied until you explicitly approve each change.
+
+ Note:
+ Session history, file tracking, and the /chronicle command were previously experimental features. As of v1.0.40, they are available to all users without enabling experimental mode.
+
+ The /diagnose command (v1.0.64+) analyzes the current session’s logs and surfaces diagnostic information to help troubleshoot unexpected behavior, performance issues, or errors:
+
+ Use /diagnose when a session is behaving unexpectedly — it inspects session logs and reports what it finds, making it easier to share diagnostics with support or understand what happened internally.
+ Keyboard shortcuts for queuing messages: Use Ctrl+Q or Ctrl+Enter to queue a message (send it while the agent is still working). Ctrl+D no longer queues messages — it now has its default terminal behavior. If you have muscle memory for Ctrl+D queuing, switch to Ctrl+Q.
+ Background running tasks: Press Ctrl+X โ B to move the current running task or shell command to the background. The task continues executing while you can type a new message or review earlier output. This is useful for long-running commands where you want to interact with the agent while waiting for the result.
+ Shell command history in normal mode (v1.0.65+): The โ/โ arrow keys and Ctrl+R reverse search now include past shell commands (commands run with !) while you are in normal (non-shell) input mode. Previously you had to type ! to enter shell mode before history worked. Now you can recall and re-run a shell command without switching modes first — useful for quickly repeating a build, test, or diagnostic command from earlier in the session.
+ Inline image rendering (v1.0.64+): The CLI can display images inline in the terminal when your terminal supports it. If an MCP tool, agent, or attachment returns an image, it is rendered directly in the conversation timeline rather than shown as a file path or URL. This works in terminals with image protocol support (such as iTerm2, Kitty, Wezterm, and tmux with appropriate configuration).
+ The /ask command lets you ask a quick question without affecting your conversation history. The current session context is preserved, so you can use it for one-off lookups without derailing an ongoing task. Responses are rendered as full markdown, including tables and formatted links:
+
+ The /refine command (v1.0.70+) rewrites a rough, stream-of-consciousness prompt into a clear, structured one before sending it to the agent:
+
+ Type your rough idea, and /refine transforms it into a precise, well-structured prompt. This is especially helpful for complex multi-step tasks where prompt clarity significantly affects output quality — for example, turning “um make the login thing work better with the existing setup” into a focused task description with clear scope and acceptance criteria.
+ The /env command shows all loaded environment details — instructions, MCP servers, skills, agents, and plugins — in a single view. Use it to verify that the right resources are active for the current session:
+
+ The /context command shows a visualization of the current conversation’s context window usage — how many tokens are consumed and how much headroom remains:
+
+ The /usage command displays session metrics such as the number of tokens consumed, API calls made, and any quota information for the current session. In v1.0.64+, /usage also shows per-model token totals when you have used multiple models in a session:
+
+ The /compact command summarizes the conversation history to free up context window space while preserving the thread of the conversation. Use it when your context is getting full but you do not want to start a fresh session:
+
+
+ Note:
+ Skills remain loaded and effective after /compact. You do not need to re-invoke them after compacting.
+
+
+ ACP sessions (v1.0.39+):
+ The /compact, /context, /usage, and /env commands are now available in ACP (Agent Coordination Protocol) sessions, allowing remote ACP clients to surface session details and manage context from within their own automated workflows.
+
+ The /statusline command (with /footer as an alias) lets you control which items appear in the terminal status bar. You can show or hide individual indicators like the working directory, current branch, effort level, context window usage, quota, and active account username (v1.0.43+). The changes toggle shows a running count of added/removed lines for the session — useful when tracking the scope of an ongoing edit. In v1.0.65+, there is also an opt-in CI check status indicator that shows the passing/running/failing state of CI checks for the current branch — enable it from the /statusline menu:
+
+ Toggle the username indicator to display which GitHub account is currently active in the footer — helpful when you work with multiple accounts or switch between personal and organization contexts.
+ The /keep-alive command prevents the system from sleeping while Copilot CLI is active. This is useful during long-running agent sessions on laptops or machines with aggressive sleep settings:
+
+
+ Note:
+ /keep-alive was previously an experimental feature. As of v1.0.36, it is available without enabling experimental mode.
+
+ The /allow-all command (also accessible as /yolo) enables autopilot mode, where the agent runs all tools without asking for confirmation. It now supports on, off, and show subcommands:
+
+
+ Note:
+ /allow-all on permissions persist after /clear starts a new session, so you don’t need to re-enable it each time.
+
+
+ ACP clients (v1.0.39+):
+ ACP clients can also toggle allow-all mode programmatically via session configuration, without issuing a slash command. This is useful for automated pipelines that drive Copilot CLI through the ACP protocol.
+
+ The /autopilot command (v1.0.45+) is a quick in-session toggle that switches between interactive mode (where the agent pauses to ask for confirmation before tool use) and autopilot mode (where it runs autonomously). Unlike /allow-all which specifically controls whether tool permissions are required, /autopilot toggles the overall agent mode:
+
+ Use /autopilot when you want to flip between supervised and unsupervised operation mid-session without typing out the full /allow-all on or /allow-all off commands.
+
+ Enhanced autopilot (v1.0.64+):
+ When autopilot mode is active — including when launched with --autopilot at startup or during automatic continuation turns — the agent automatically handles elicitation dialogs, ask_user prompts, sampling requests, and permission prompts without surfacing them as interactive dialogs. This means long-running automated sessions can proceed end-to-end without manual confirmation steps.
+
+
+ Auto allow-all mode (v1.0.69+):
+ In addition to the standard allow-all mode (which approves everything), the CLI now supports an auto allow-all mode that uses an LLM judge to evaluate each tool request. When enabled, the judge automatically approves requests it evaluates as acceptable, and asks you for manual confirmation only for requests it considers risky. This gives you a middle ground between full autopilot and fully supervised operation — most routine actions proceed automatically while unusual or potentially dangerous actions still surface for your review. As of v1.0.69-3, this mode requires experimental features to be enabled — use /experimental on or start the CLI with --experimental — then activate it with /allow-all auto. The previous AUTO_APPROVAL environment variable approach has been removed in favour of experimental mode.
+
+
+ Read-only gh CLI commands (v1.0.46+):
+ Read-only gh commands — such as gh issue list, gh pr view, gh run status, and other commands that don’t write to GitHub — are automatically approved without a permission prompt. Only commands that write to GitHub (like creating issues, merging PRs) still require explicit approval. This reduces friction during exploratory sessions where you frequently check issue or PR status.
+
+ The --effort flag (shorthand for --reasoning-effort) controls how much computational reasoning the model applies to a request:
+
+ Accepted values are low, medium, and high. You can also set a default via the effortLevel config setting.
+