Skip to content

GH-600 · Domain 3: Manage memory, state, and execution · 12% of the exam

Task 3.1: Implement agent memory strategies

Choosing between the context window, persistent memory and external stores, keeping memory scoped to the task, and the rules that expire, prune or reset it.

Study it

  • Short-term, long-term and external memory: context windows, Copilot Memory and files

    Partly covered by: Context Windows

  • Memory scope, expiry, pruning and reset

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the GitHub documentation page that proves it.

Question 1 · choose 1

A team worries that Copilot Memory will keep acting on facts about a build tool they abandoned months ago, long after anyone last relied on them. What does GitHub document about how long unused memories last?

  1. AAnything not used for 28 days is deleted, and using an entry may reset that timer
  2. BFacts stay until a repository owner deletes them, so stale ones must be cleared by hand
  3. CFacts expire 28 days after they were created, however often they are used
  4. DFacts are rebuilt from scratch at the start of every session
Show the answer and why
  • AAnything not used for 28 days is deleted, and using an entry may reset that timer

    Correct

    Unused facts and preferences are deleted automatically after 28 days; validated use can reset the timer.

  • BFacts stay until a repository owner deletes them, so stale ones must be cleared by hand

    Incorrect

    Clearing by hand isn't the only way out; unused entries are also removed automatically after 28 days.

  • CFacts expire 28 days after they were created, however often they are used

    Incorrect

    The timer applies to unused entries and may reset each time an entry is validated and used.

  • DFacts are rebuilt from scratch at the start of every session

    Incorrect

    Memories persist across sessions; they are pruned when unused for 28 days.

To stop stale information lingering, any stored repository fact or user preference that goes unused is automatically deleted after 28 days, and the timer may reset whenever Copilot successfully validates and uses the entry.

Question 2 · choose 2

A team relies on Copilot Memory and wants to know what each Copilot feature draws on. Which statements are accurate? (Choose TWO.)

  1. ACopilot code review applies repository-level facts but not user-level preferences
  2. BCode review applies the preferences of the pull request's author
  3. CCopilot CLI applies the user's preferences only, leaving repository facts to cloud agent and code review
  4. DMemory is switched on per repository by its administrator
  5. ECopilot CLI applies repository facts and the preferences of the user who started it
Show the answer and why
  • ACopilot code review applies repository-level facts but not user-level preferences

    Correct

    Code review uses repository facts only; user preferences aren't applied during review.

  • BCode review applies the preferences of the pull request's author

    Incorrect

    User-level preferences are not applied during code review.

  • CCopilot CLI applies the user's preferences only, leaving repository facts to cloud agent and code review

    Incorrect

    The CLI applies repository-level facts as well as the preferences of the user who started the operation.

  • DMemory is switched on per repository by its administrator

    Incorrect

    Copilot Memory is enabled per user, not per repository.

  • ECopilot CLI applies repository facts and the preferences of the user who started it

    Correct

    The CLI applies repository-level facts and the initiating user's preferences.

Copilot Memory holds repository-level facts and user-level preferences, but not every feature applies both. Feature limits apply: Copilot CLI applies repository facts plus the preferences of the user who started the operation, and code review uses repository facts only.

Question 3 · choose 1

Which Copilot features use Copilot Memory?

  1. AInline suggestions in the IDE only
  2. BCopilot Chat in every supported IDE and on GitHub.com, for all users
  3. COnly Copilot cloud agent
  4. DCloud agent, code review, Copilot CLI and agentic autofix
Show the answer and why
  • AInline suggestions in the IDE only

    Incorrect

    Inline suggestions are not listed among the features that use Memory.

  • BCopilot Chat in every supported IDE and on GitHub.com, for all users

    Incorrect

    Chat is not listed among the features that use Memory.

  • COnly Copilot cloud agent

    Incorrect

    Code review, Copilot CLI and agentic autofix use it as well.

  • DCloud agent, code review, Copilot CLI and agentic autofix

    Correct

    These are the features that currently use Copilot Memory.

Copilot Memory stores repository-level facts and user-level preferences. It is currently used by Copilot cloud agent, Copilot code review, Copilot CLI and agentic autofix.

Question 4 · choose 1

A contractor receives Copilot through two different organizations, and Copilot Memory is enabled for her. Repository-level facts are being stored in the repositories she works on, but Copilot never generates any user-level preferences for her, however consistently she states how she likes to work. What is the likely cause?

  1. AShe hasn't selected a default billing entity in her account settings
  2. BUser-level preferences are generated only on individual Copilot plans
  3. CAn administrator has to approve each preference before Copilot stores it
  4. DPreferences are only kept for repositories that she owns herself
Show the answer and why
  • AShe hasn't selected a default billing entity in her account settings

    Correct

    Someone who gets Copilot access through several enterprises or organizations must select a default billing entity before Copilot Memory can generate user-level preferences.

  • BUser-level preferences are generated only on individual Copilot plans

    Incorrect

    Preferences are generated on organization- and enterprise-managed plans too; the default billing entity rule exists for exactly those users.

  • CAn administrator has to approve each preference before Copilot stores it

    Incorrect

    There is no administrator approval step: memories are created in response to Copilot activity by users who have Copilot Memory enabled.

  • DPreferences are only kept for repositories that she owns herself

    Incorrect

    User-level preferences apply to that user's Copilot interactions across repositories, whoever owns them.

Copilot Memory stores repository-level facts and user-level preferences. Preferences follow the user across repositories. A user who receives Copilot access through multiple enterprises or organizations must select a default billing entity in her account settings in order to generate user-level preferences; until then, only repository-level facts are created.

Question 5 · choose 1

A developer restored their Copilot CLI session files from a backup, but /chronicle can't find those sessions. Which command rebuilds the session store from the files?

  1. A/compact
  2. B/chronicle reindex
  3. Ccopilot --continue
  4. D/session checkpoints
Show the answer and why
  • A/compact

    Incorrect

    /compact summarizes the current conversation; it doesn't rebuild the store.

  • B/chronicle reindex

    Correct

    Reindexing rebuilds the session store from the files under the session-state directory.

  • Ccopilot --continue

    Incorrect

    Resuming a session doesn't rebuild the session store from restored files.

  • D/session checkpoints

    Incorrect

    That lists checkpoints of the current session; it doesn't rebuild the store.

Copilot CLI keeps the full record of each session as files and a subset in a local SQLite session store that supports history queries and /chronicle. If session files are moved, restored from a backup or no longer represented in the store, /chronicle reindex rebuilds the session store from those files.

Question 6 · choose 1

Copilot cloud agent discovers how a repository handles database connections and stores it in Copilot Memory. Can Copilot code review use that knowledge later?

  1. ANo, each feature keeps its own separate memory
  2. BOnly if someone copies it into the repository's custom instructions
  3. CYes, facts captured by one feature can be used by another
  4. DOnly for the user who ran the cloud agent session
Show the answer and why
  • ANo, each feature keeps its own separate memory

    Incorrect

    Facts and preferences are shared across the features that use Memory.

  • BOnly if someone copies it into the repository's custom instructions

    Incorrect

    No copying is needed; Memory is shared.

  • CYes, facts captured by one feature can be used by another

    Correct

    For example, a fact cloud agent discovers can later help code review spot inconsistent patterns.

  • DOnly for the user who ran the cloud agent session

    Incorrect

    Repository facts are available to everyone with Memory access in that repository.

Facts and preferences captured by one Copilot feature can be used by another. If cloud agent discovers how a repository handles database connections, code review can later apply it; if code review learns that two files must stay in sync, cloud agent knows to update both.

Practise domain 3 →Practise all domains →