Copilot CLI Memory: What Survives a Terminal Session

Copilot CLI can retain a saved session, read instruction files, and use supported memory features. Keep those separate from the project handoff you want another assistant to read.

Updated 5 min read

Copilot CLI memory is several different things: saved terminal sessions, deliberate instruction files, and Copilot Memory when available for your account. Closing a terminal does not make those interchangeable, and starting a new conversation does not guarantee that it reads everything you discussed before.

For project continuity, fenbs holds the plan, decisions, and next step outside a terminal, so a connected assistant can read the work even when you change apps. The useful question is which record should carry each fact forward. A test command belongs somewhere different from an unfinished investigation.

What can survive after the terminal closes?

Three forms of continuity, plus the project record you maintain
RecordWhat it is forWhat to verify
Saved CLI sessionReturning to a particular conversation and its work.You reopened the intended session and checked the current files.
Instruction filesProviding durable guidance for work in a repository.The correct files were discovered and still describe the project.
Copilot MemoryReusing learned repository facts and coding preferences.The feature is available, enabled, and relevant to this work.
Project handoffExplaining completed work, uncertainty, and the next action.Someone saved an accurate summary after the latest changes.

Think of a resumed session as returning to a desk with your earlier notes still on it. That is useful, but the project may have changed while you were away. A colleague could have replaced a component, completed the outstanding task, or reversed a proposed design. Read the present state before trusting yesterday’s next step.

This page covers the terminal experience; the broader GitHub Copilot memory guide covers the surrounding product question. For an introduction to the command-line tool itself, start with GitHub Copilot CLI.

How do you return to an earlier conversation?

GitHub documents selecting a session with the --resume option or /resume command, and continuing the most recently closed local session with copilot --continue. These reopen saved context rather than asking a blank conversation to infer the earlier discussion. Follow the CLI session instructions (opens in a new tab) for the current commands.

  1. Open the intended repository and identify the task you were doing.
  2. Resume the matching session, using its topic and recent work to confirm your choice.
  3. Ask Copilot to explain its last completed action and the next proposed action before changing files.
  4. Compare that explanation with the current changes and task record. Correct stale assumptions before continuing.

A resumed answer is a starting point, not fresh evidence. If the assistant says a check passed, ask which check, on which change, and whether anything has changed afterward. When the result is unavailable, rerun the appropriate check or mark it unverified. Do not convert a remembered success into a claim about new code. Save the result where the next person can check it too.

Where does session history live?

GitHub describes local CLI session files under ~/.copilot/session-state/ and a separate local session store used for history queries. Local session syncing and sharing have their own controls; a synced session is not automatically shared with teammates. See the session data documentation (opens in a new tab) before treating a device or account as the only place a record exists.

For everyday work, separate the questions “Can I return to it?” and “Can my teammate read it?” Your own history can help reconstruct an investigation without providing a usable handoff to someone else. A teammate needs the conclusion, its evidence, and what remains, rather than a requirement to search through your entire conversation.

Keep credentials, personal information, and customer records out of handoff summaries. Link to an appropriate source when necessary, within the access rules your team already uses. The goal is enough context to resume legitimate work, not a second copy of every sensitive input.

What should instructions and learned memory contain?

Use instructions for stable guidance you deliberately maintain: where tests live, how to run a focused check, and which generated files to leave alone. GitHub’s CLI custom instructions guide (opens in a new tab) documents supported locations and the /instructions command for inspecting discovered files.

GitHub also documents Copilot Memory support in the CLI, including repository facts and the initiating user’s coding preferences. That feature has its own availability and controls. Check the Copilot Memory documentation (opens in a new tab) rather than assuming that resuming a conversation turns learned memory on.

Neither record should be your only account of unfinished work. “Use the shared error formatter” is durable guidance. “The formatter change is drafted, but one test fails on empty input” is a handoff. Treating the second sentence as a permanent rule would make future tasks carry yesterday’s temporary problem.

What should you save before ending a session?

Save the smallest explanation that lets another session act correctly. Name the task, the actual change, the checks performed, what remains uncertain, and the next concrete step. Include a waiting question when progress depends on a person. Avoid “continue as discussed,” because a fresh assistant may never see the discussion.

  • Completed: the request handler now uses the existing error formatter.
  • Checked: focused formatter tests pass; the full request suite has not run.
  • Remaining: confirm whether an empty message should use the default text.
  • Next step: ask the maintainer that question before changing the fallback.

That hypothetical handoff separates code work from a product choice. It tells the next assistant both how to continue and where to stop. When the decision arrives, update the task and preserve the reason instead of leaving competing answers in separate conversations. The Copilot CLI MCP guide explains the outside-tool connection used for shared records.

How fenbs helps

Leave a starting point beyond the terminal

Save the task’s status and next action in fenbs, then update Where we left off before closing the CLI. The next connected assistant can read that record alongside the project’s rules, even if it uses a different AI app.

Create a free account

Free for one person · No credit card · Works with Claude, ChatGPT, Cursor and more

How to do this with fenbs?

  1. Create a free account, then add the project and the task you are working on.
  2. Record the person-approved constraints in Decisions and rules. Keep a proposed answer open until a person chooses it.
  3. Use Integrations to connect GitHub Copilot through MCP, a standard way for an AI app to use an outside tool, with browser sign-in.
  4. Ask the assistant to read the project context before working and save the task’s result, remaining checks, and Where we left off before stopping.

fenbs is free for one person, with no credit card. It does not import your CLI transcript or make the next assistant read context automatically. If you only need to reopen one private terminal conversation, the CLI’s session controls may be sufficient. For shared project continuity, the AI memory hub offers more ways to organize the record.

Questions people ask.

Does a fresh CLI conversation know my unfinished plan?

Do not assume it does. Give it the current task and a saved handoff, then ask it to explain the next action before making changes.

Is session syncing the same as team access?

No. Synced account history and a session deliberately shared with someone else are separate controls. Check the applicable GitHub session settings.

Should I put today’s progress in repository instructions?

Keep instructions focused on durable guidance. Put today’s completed work, remaining checks, and next action in a task or handoff record.

Can I switch to another assistant after using Copilot CLI?

Yes, if you save the work somewhere the next assistant can read. A shared project record carries the relevant outcome without requiring the next app to import the CLI conversation.

More in Memory in Claude, ChatGPT, Gemini and Copilot

All Memory in Claude, ChatGPT, Gemini and Copilot articles

Start with one thing.

Free for one person · No credit card · Works with Claude, ChatGPT, Cursor and more

There is nothing to set up first. Write one line and you’ve started.