---
title: "AI Context Files: Carry Context Between Sessions"
description: "Use an AI context file for context carryover between sessions. Record current work, rules, and facts, then load the maintained file before each new job."
canonical: "https://scalewithsearch.com/articles/ai-context-files"
date: "2026-01-27"
modified: "2026-11-10"
---
## Site navigation

- [Scale With Search](https://scalewithsearch.com/)
- Services
  - Local
    - [All services](https://scalewithsearch.com/services)
    - [AI visibility tracking](https://scalewithsearch.com/services/ai-visibility-tracking)
    - [Google Maps rank tracking](https://scalewithsearch.com/services/google-maps-rank-tracking)
    - [Local SEO](https://scalewithsearch.com/services/local-seo)
    - [Google Business Profile management](https://scalewithsearch.com/services/google-business-profile)
  - Website and search
    - [SEO solutions](https://scalewithsearch.com/seo)
    - [Technical SEO](https://scalewithsearch.com/seo/technical-seo)
    - [On-page and content SEO](https://scalewithsearch.com/seo/on-page-and-content-seo)
    - [Semantic SEO and topical authority](https://scalewithsearch.com/seo/semantic-seo-and-topical-authority)
    - [Custom SEO tools](https://scalewithsearch.com/seo/custom-seo-tools)
    - [Site build](https://scalewithsearch.com/work#site-build)
    - [Whole website fix](https://scalewithsearch.com/work#whole-website-fix)
  - AI functions
    - [AI operations](https://scalewithsearch.com/ai-systems)
  - First step
    - [Working session](https://scalewithsearch.com/audit)
  - Start here
    - [Send your brief](https://scalewithsearch.com/work#send-your-brief)
    - [Example scope](https://scalewithsearch.com/work#review-the-example-scope)
    - [Prices and terms](https://scalewithsearch.com/work#prices-and-terms)
- Industries
  - Agencies
    - [SEO agencies and consultants](https://scalewithsearch.com/for/seo-agencies-and-consultants)
    - [Marketing agencies and freelancers](https://scalewithsearch.com/for/marketing-agencies-and-freelancers)
    - [AI visibility check for SEO agencies](https://scalewithsearch.com/check/seo-agencies-and-consultants)
    - [Marketing and SEO agencies](https://scalewithsearch.com/for/#group-agencies)
  - Browse by business
    - [Trades and field service](https://scalewithsearch.com/for/#group-trades)
    - [Real estate agents and teams](https://scalewithsearch.com/for/real-estate)
    - [Health, wellness, and animal care](https://scalewithsearch.com/for/#group-practices)
    - [Chiropractic and wellness practices](https://scalewithsearch.com/for/chiropractic-and-wellness-practices)
    - [Law, finance, and IT](https://scalewithsearch.com/for/#group-professional)
    - [Machine shops and manufacturers](https://scalewithsearch.com/for/#group-manufacturing)
    - [Restaurants, shops, studios, and nonprofits](https://scalewithsearch.com/for/#group-local-services)
  - [All industries](https://scalewithsearch.com/for/)
- Resources
  - Free tools
    - [AI visibility check](https://scalewithsearch.com/check)
    - [All free tools](https://scalewithsearch.com/tools/)
    - [Free starter kit (.zip)](https://scalewithsearch.com/kit/business-memory-starter-kit.zip)
  - Guides
    - [AI-native library](https://scalewithsearch.com/ai-native)
    - [Industry intelligence](https://scalewithsearch.com/intelligence)
    - [Office job guides](https://scalewithsearch.com/guides/)
    - [Business memory](https://scalewithsearch.com/articles/business-memory-for-ai-agents-guide)
    - [Agent governance](https://scalewithsearch.com/articles/ai-agent-governance-guide-small-business)
    - [Ownership and migration](https://scalewithsearch.com/articles/leaving-vendor-ai-memory-guide)
  - Articles
    - [All articles](https://scalewithsearch.com/articles/)
- About
  - Evidence
    - [Proof](https://scalewithsearch.com/proof)
  - Scale With Search
    - [About](https://scalewithsearch.com/about)
    - [How it works](https://scalewithsearch.com/how-it-works)

# Build an AI Context File That Briefs the Model Before Every Session.

Built from 7 notes in Victor's vault. Drafted with Claude Opus 5.5 and Claude Fable 5.1, rewritten against Victor's notes with Claude Opus 5.5. Reviewed by Victor on 2026.11.11.

Load your context file at each new AI session for context carryover of current work, rules, and facts. Every conversation with an AI model starts without your business. The model does not know your clients, your current priorities, or the preferences you explained last week. A context file stores that information outside the model and hands it over at the start of each session.

Write down how you work one time, and every model reads it first.

## What a context file is

A context file is a structured text document that holds what you want an AI to know. The model's working memory resets with each conversation. The file does not reset, because it lives on your storage and loads at session start.

My vault has one root file. Every language model that works in the vault reads it first. It knows the rules of the operation, how to talk to me, and where to find what it needs. Each domain folder under it has its own context file. That file says what the folder is for, what it tracks, how to use it, and when to cross over to another folder.

A context file usually holds five kinds of information. The four parts below merge preferences and instructions into one rules section.

| Section | Contents |
|---|---|
| Identity | Name, role, company, industry |
| Current state | Active projects, priorities, recent decisions |
| Preferences | Communication style, format rules, terminology |
| Domain knowledge | Industry facts, product details, client information |
| Instructions | Standard procedures, things to always or never do |

## How a context file works

A language model reads text inside a context window. The window is the fixed amount of text the model can consider for one response.

A context file adds text to that window before your first request. The model reads the file as if you had typed it. The difference is that the tool loads it for you every session.

A context file does not give the model memory in the human sense, and it does not train the model. It gives the model the same information at the start of every session. The model only knows what you hand it.

Tools load context in different ways:

- Claude Code reads `CLAUDE.md` files at launch from the working directory and the directories above it. Files in subdirectories load when Claude reads files there. Source: [How Claude remembers your project](https://code.claude.com/docs/en/memory).
- Custom GPTs accept knowledge files that you upload to the configuration.
- API applications place context in the system prompt or the first message.

The [CLAUDE.md template for business context](/articles/claude-md-template-business-context) shows a complete file for Claude Code.

## Write the file in four parts

Loose facts create noise. Structured facts give the model something it can apply.

### Start with identity

The model needs to know who it works with. Identity shapes tone and judgment before a single instruction lands. Use a few lines. This example is fictional:

```markdown
# Who

Sam Rivera
- Owner of a three-person bookkeeping practice
- Also runs a small training business for new bookkeepers
- Based in Ohio
- Two lines of work: client books, and course content
```

### Define the current state

What happens now changes the help you need:

```markdown
# Current priorities

1. Year-end cleanup for four clients: remove duplicate vendors
2. Outreach to 40 accounting firms about the training course
3. Course content: two new lessons this month
```

### Set the behavior rules

Explicit rules stop repeated mistakes. These are the lines the model does not cross and the places where it hands the work back to you:

```markdown
# Rules

- Date format: YYYY.MM.DD, not MM/DD/YYYY
- Read a file before you change it
- Ask when a fact is missing; do not assume
- Dense output; no disclaimers or filler
```

The first three rules come straight from my own root file.

### Add the domain knowledge

Add the facts the model cannot know about your work. The constraint you never say out loud because it is obvious to you is invisible to the machine:

```markdown
# Tools

- CRM: the practice CRM. API access is read-only.
- Notes: Obsidian vault at ~/Documents/Vault
- Phone: a dialer for outbound calls
- Email: Gmail with Google Apps Script automations
```

## Apply five writing rules

Put the most important context first, and keep the file short. Use headings and lists so each fact is easy to find.

Update the file when circumstances change.

Make preferences specific. "Use short sentences. No jargon. Include specific numbers." gives the model constraints it can follow. Without them you get the generic default: em dashes everywhere, "it's not X, it's Y", and every other tell that a machine wrote it.

Include examples. When you want a particular output style, show it. A real file of your own writing holds the standard better than a description of it.

Layer the context. One large file becomes hard to maintain. Use a root file that points to the rest, a file per domain or project, and client files for client requirements. The root routes. The detail lives in the files it points to.

## Compare a context file with built-in memory

ChatGPT and Claude both offer memory features. A context file still has four advantages.

Control is the first. A product memory feature decides what to save. A context file gives you control over every fact the model receives.

Portability is the second. A context file works across sessions and devices, and with small changes, across AI tools. Product memory stays inside one product. A memory you hold can walk out the door with you. The guide to [keeping context across ChatGPT, Claude, Cursor, and other tools](/articles/persistent-context-across-ai-tools) covers the portable pattern.

Capacity is the third. Custom instructions have a character limit. As checked on 2026.09.19, OpenAI allowed 1,500 characters for Free and Go accounts and 5,000 for paid plans. Source: [ChatGPT Custom Instructions](https://help.openai.com/en/articles/8096356-chatgpt-custom-instructions). A context file can hold much more, but everything it holds uses space in the context window.

Version history is the fourth. You can keep a context file under version control, back it up, and restore an earlier version. Product memory offers limited history.

## Keep the file current with a weekly pass

My own context files follow one fixed shape. A short section holds what is true now, each line dated and pointing to its receipt. A second section holds standing rules, each with the date it was ruled. A third holds open items. The receipts of what ran go to a separate log file, not the context file. That keeps the context short enough to read on every run.

Set one habit. At the end of each week, open the file and do three things:

1. Move each finished project out of the priorities list and into an archive file.
2. Add each new project or client with a start date.
3. Read the rules section and add any instruction you typed by hand more than once that week.

Date the file at the top each time, such as `last_verified:: 2026.09.25`. Bump that date only after you check the whole file. Suppose the model gives advice for a project you finished last month. The date tells you at once that the file is stale. Fix the file, not the chat.

## Know what happens to the data

A context file on your computer stays on your computer until a tool reads it. When Claude Code or another agent reads the file, it sends that text to the model provider to process your request. Retention and training terms for that text depend on your plan and your data-sharing settings. Keep passwords, API keys, and sensitive client records out of it. The article on [what client data belongs in AI agent memory](/articles/#cluster-owned-memory)<!-- reading-origin:XSgvYXJ0aWNsZXMvY2xpZW50LWRhdGEtaW4tYWktYWdlbnQtbWVtb3J5KQ== --> sets those limits.

Keep a second copy of the file and the folder around it.

Anthropic also states that Claude Code treats `CLAUDE.md` as context, not as enforced configuration. The model usually follows the file. It can still miss a rule, so review important output.

## Start with three sections for AI context file that briefs every session

Start small. My action for anyone new to this: write five sentences about how you want the model to work with you, and save them where the app loads them every time. Then grow that into three sections: who you are, what you work on, and how you want responses formatted.

In ChatGPT or Claude on the web, paste the file into project instructions or into the first message. The guide on [how to make ChatGPT remember previous conversations](/articles/make-chatgpt-remember-previous-conversations) explains the options and their limits. For automatic loading from files, Claude Code with an Obsidian vault reads context files natively. Claude Code needs a paid Claude plan.

Run one check after setup. Start a fresh session, ask "What are my current priorities?", and compare the answer with the file. If the answer is wrong, the file is not loading or the section is unclear. Fix the file before you depend on it.

A pass names the year-end cleanup for four clients, the outreach to 40 accounting firms, and the two new lessons, in that order. A fail lists general bookkeeping tasks, or it asks what you work on. That fail means the file did not load. A third result is correct identity with old priorities. It means the file loaded, but the current-state section is out of date.


## More reading on AI context file that briefs every session

- [Give AI a persistent context layer so each session starts from your business](/articles/ai-doesnt-remember-context)
- [Structure AI memory so each session makes the next one faster](/articles/#cluster-ai-memory)<!-- reading-origin:XSgvYXJ0aWNsZXMvYWktbWVtb3J5LWNvbXBvdW5kaW5nLWVmZmVjdCk= -->
- [Write one memory file and start Claude Code without any programming](/articles/ai-memory-for-non-technical-users)

----

```text
                  .|########||.                                       .|########||.                                       .|########||.
               |##||.      .||##|.                                 |##||.      .||##|.                                 |##||.      .||##|.
             |#|.              .|#|.                             |#|.              .|#|.                             |#|.              .|#|.
           |#|                    |#|                          |#|                    |#|                          |#|                    |#|
         .#|                        |#.                      .#|                        |#.                      .#|                        |#.
        .#.                          .#|                    .#.                          .#|                    .#.                          .#|
       |#.                            .#|                  |#.                            .#|                  |#.                            .#|
      |#             ......             #|                |#             ......             #|                |#             ......             #|
     .#           ||#########|           #|              .#           ||#########|           #|              .#           ||#########|           #|
    .#.         |######||######|.        .#.            .#.         |######||######|.        .#.            .#.         |######||######|.        .#.
    #.        .##|###|##|#|######|        .#            #.        .##|###|##|#|######|        .#            #.        .##|###|##|#|######|        .#
   ||        |##|#||||||||||||#||#|        ||          ||        |##|#||||||||||||#||#|        ||          ||        |##|#||||||||||||#||#|        ||
   #        |#||||||||||||||||||||#|        #.         #        |#||||||||||||||||||||#|        #.         #        |#||||||||||||||||||||#|        #.
  ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||
  #       .#||||||||||||||||||||||||#|       #        #       .#||||||||||||||||||||||||#|       #        #       .#||||||||||||||||||||||||#|       #
 ||   ....|||#||||||##|#|||#|#||##||||....|. ||      ||   ....|||#||||||##|#|||#|#||##||||....|. ||      ||   ....|||#||||||##|#|||#|#||##||||....|. ||
 #.  .  ....|#  ....#|||   ||| .#|||  ....#. .#      #.  .  ....|#  ....#|||   ||| .#|||  ....#. .#      #.  .  ....|#  ....#|||   ||| .#|||  ....#. .#
 #   .  ||||#| .#####||  . .#| .#|||  ||||#   #.     #   .  ||||#| .#####||  . .#| .#|||  ||||#   #.     #   .  ||||#| .#####||  . .#| .#|||  ||||#   #.
.|   |||||  #. |#|||||. ||  #. |#||. .|||||   ||    .|   |||||  #. |#|||||. ||  #. |#||. .|||||   ||    .|   |||||  #. |#|||||. ||  #. |#||. .|||||   ||
||   |....  #. ....|#.      |. ...|. ....||   ||    ||   |....  #. ....|#.      |. ...|. ....||   ||    ||   |....  #. ....|#.      |. ...|. ....||   ||
#.  .||||||##||||||##||####|||||||#||||||#|   .#    #.  .||||||##||||||##||####|||||||#||||||#|   .#    #.  .||||||##||||||##||####|||||||#||||||#|   .#
#    .||####|###########################|.     #    #    .||####|###########################|.     #    #    .||####|###########################|.     #
#      .#||||||.#.|| # |. ..# #| #|||||#|      #    #      .#||||||.#.|| # |. ..# #| #|||||#|      #    #      .#||||||.#.|| # |. ..# #| #|||||#|      #
#      .#|||||| ..  |# ## |#| ...#|#|||#|      #    #      .#|||||| ..  |# ## |#| ...#|#|||#|      #    #      .#|||||| ..  |# ## |#| ...#|#|||#|      #
#      .#|||#|# .# .#| #| ##|.#..#|||||#|      #    #      .#|||#|# .# .#| #| ##|.#..#|||||#|      #    #      .#|||#|# .# .#| #| ##|.#..#|||||#|      #
#      .#||||||############|######|||||#|      #    #      .#||||||############|######|||||#|      #    #      .#||||||############|######|||||#|      #
#   |...||#||||||#||||#|#||||||#|||||#||| |.|  #    #   |...||#||||||#||||#|#||||||#|||||#||| |.|  #    #   |...||#||||||#||||#|#||||||#|||||#||| |.|  #
#. .. ||||# .|||##|.  |#| .|| || .|||#. #|  # .#    #. .. ||||# .|||##|.  |#| .|| || .|||#. #|  # .#    #. .. ||||# .|||##|.  |#| .|| || .|||#. #|  # .#
|| |  ...||  ...##| |  #| .|. |. #####  .. .| ||    || |  ...||  ...##| |  #| .|. |. #####  .. .| ||    || |  ...||  ...##| |  #| .|. |. #####  .. .| ||
|| ||||| || ||||#|  .  |. |. |#. ||||| |#| || ||    || ||||| || ||||#|  .  |. |. |#. ||||| |#| || ||    || ||||| || ||||#|  .  |. |. |#. ||||| |#| || ||
.# |.....#|....|#.||||.|||##.|#|....||.#||.#. #.    .# |.....#|....|#.||||.|||##.|#|....||.#||.#. #.    .# |.....#|....|#.||||.|||##.|#|....||.#||.#. #.
 #.|||||||#############################| ||| .#      #.|||||||#############################| ||| .#      #.|||||||#############################| ||| .#
 ||       ##||#||#||||||#||#||#||#||##.      ||      ||       ##||#||#||||||#||#||#||#||##.      ||      ||       ##||#||#||||||#||#||#||#||##.      ||
  #       .#|||||||||#||#|||||||||||#|       #        #       .#|||||||||#||#|||||||||||#|       #        #       .#|||||||||#||#|||||||||||#|       #
  ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||
  .#        |#||||||||||||||||||||#|        #.        .#        |#||||||||||||||||||||#|        #.        .#        |#||||||||||||||||||||#|        #.
   ||        |#||||||||||||||||||#|        ||          ||        |#||||||||||||||||||#|        ||          ||        |#||||||||||||||||||#|        ||
    #.        .######|#|#########|        .#            #.        .######|#|#########|        .#            #.        .######|#|#########|        .#
    .#.         |#####||||#####|         .#.            .#.         |#####||||#####|         .#.            .#.         |#####||||#####|         .#.
     |#           ||########||           #.              |#           ||########||           #.              |#           ||########||           #.
      |#             ......             #|                |#             ......             #|                |#             ......             #|
       |#.                            .#|                  |#.                            .#|                  |#.                            .#|
        |#.                          .#.                    |#.                          .#.                    |#.                          .#.
         .#|                        |#.                      .#|                        |#.                      .#|                        |#.
           |#|                    |#|                          |#|                    |#|                          |#|                    |#|
            .|#|.              .|#|.                            .|#|.              .|#|.                            .|#|.              .|#|.
               |##||.      .||##|                                  |##||.      .||##|                                  |##||.      .||##|
                 .||########||.                                      .||########||.                                      .||########||.

Scale With Search  2026  [scalewithsearch.com](https://scalewithsearch.com)
```
