---
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-10-09"
---
## Site navigation

- [Scale With Search](https://scalewithsearch.com/)
- Real estate
  - Real estate
    - [Real estate](https://scalewithsearch.com/for/real-estate)
- Work
  - Start here
    - [Send your brief](https://scalewithsearch.com/work#send-your-brief)
    - [Prepare your six-question brief](https://scalewithsearch.com/work#prepare-your-six-question-brief)
  - Build
    - [Site build, content library with SEO, signal desk](https://scalewithsearch.com/work)
- For your business
  - Trades and home services
    - [Auto body and collision shops](https://scalewithsearch.com/for/auto-body-and-collision-shops)
    - [Foundation and home repair contractors](https://scalewithsearch.com/for/foundation-and-home-repair)
    - [Garage door and fencing contractors](https://scalewithsearch.com/for/garage-door-and-fencing-contractors)
    - [HVAC contractors](https://scalewithsearch.com/for/hvac-contractors)
    - [Janitorial and commercial cleaning companies](https://scalewithsearch.com/for/janitorial-and-commercial-cleaning)
    - [Locksmiths](https://scalewithsearch.com/for/locksmiths)
    - [Moving companies](https://scalewithsearch.com/for/moving-companies)
    - [Pest control companies](https://scalewithsearch.com/for/pest-control-companies)
    - [Plumbing and electrical contractors](https://scalewithsearch.com/for/plumbing-and-electrical-contractors)
    - [Restoration and water or fire damage companies](https://scalewithsearch.com/for/restoration-and-water-fire-damage)
    - [Roofing companies](https://scalewithsearch.com/for/roofing-companies)
    - [Towing companies](https://scalewithsearch.com/for/towing-companies)
    - [Tree services and landscaping companies](https://scalewithsearch.com/for/tree-services-and-landscaping)
    - [Solar installers](https://scalewithsearch.com/for/solar-installation)
    - [General contractors](https://scalewithsearch.com/for/general-contractors-and-construction)
    - [Paving, concrete, and flooring contractors](https://scalewithsearch.com/for/paving)
  - Practices and professional services
    - [Bookkeeping and tax practices](https://scalewithsearch.com/for/bookkeeping-and-tax-practices)
    - [Dental practices](https://scalewithsearch.com/for/dental-practices)
    - [Family and criminal defense law firms](https://scalewithsearch.com/for/family-and-criminal-defense-law-firms)
    - [Med spas and aesthetics practices](https://scalewithsearch.com/for/med-spas-and-aesthetics)
    - [Personal injury law firms](https://scalewithsearch.com/for/personal-injury-law-firms)
    - [Veterinary clinics](https://scalewithsearch.com/for/veterinary-clinics)
    - [Gyms and fitness studios](https://scalewithsearch.com/for/fitness)
    - [Therapy and outpatient health practices](https://scalewithsearch.com/for/therapy-and-outpatient-health)
    - [Medical billing companies](https://scalewithsearch.com/for/medical-billing)
    - [Insurance agencies](https://scalewithsearch.com/for/insurance-agencies)
    - [Financial advisors](https://scalewithsearch.com/for/financial-advisors)
    - [Property management companies](https://scalewithsearch.com/for/property-management)
    - [Recruiting and staffing agencies](https://scalewithsearch.com/for/recruiting-and-staffing)
    - [Architects and interior designers](https://scalewithsearch.com/for/architects-and-interior-designers)
    - [Logistics and supply chain companies](https://scalewithsearch.com/for/logistics-and-supply-chain)
  - Agencies, MSPs, and manufacturing
    - [IT and managed service providers](https://scalewithsearch.com/for/it-and-managed-service-providers)
    - [Machine shops and precision manufacturers](https://scalewithsearch.com/for/machine-shops-and-precision-manufacturing)
    - [Marketing agencies and freelancers](https://scalewithsearch.com/for/marketing-agencies-and-freelancers)
    - [SEO agencies and consultants](https://scalewithsearch.com/for/seo-agencies-and-consultants)
    - [Small manufacturers and fabricators](https://scalewithsearch.com/for/small-manufacturers-and-fabricators)
  - Restaurants, shops, studios, and nonprofits
    - [Restaurants and hospitality businesses](https://scalewithsearch.com/for/restaurants-and-hospitality)
    - [Retail stores and ecommerce sellers](https://scalewithsearch.com/for/retail-and-ecommerce)
    - [Photographers, event planners, and travel agents](https://scalewithsearch.com/for/photographers)
    - [Churches and nonprofits](https://scalewithsearch.com/for/churches-and-nonprofits)
  - [All industries](https://scalewithsearch.com/for/)
- Learn
  - For your office
    - [Office job guides](https://scalewithsearch.com/guides/)
    - [Browser calculators](https://scalewithsearch.com/tools/)
  - Start here
    - [How it works](https://scalewithsearch.com/how-it-works)
    - [Free Starter Kit](https://scalewithsearch.com/kit/business-memory-starter-kit.zip)
    - [Synthetic specimen](https://scalewithsearch.com/specimen/working-session-specimen.zip)
  - Guides
    - [The Complete Guide to Business Memory for AI Agents](https://scalewithsearch.com/articles/business-memory-for-ai-agents-guide)
    - [The Complete Small-Business Guide to AI Agent Governance](https://scalewithsearch.com/articles/ai-agent-governance-guide-small-business)
    - [The Complete Guide to Leaving Vendor AI Memory](https://scalewithsearch.com/articles/leaving-vendor-ai-memory-guide)
  - Articles by cluster
    - [Business memory](https://scalewithsearch.com/articles/business-memory-for-ai-agents-guide)
    - [Agent governance](https://scalewithsearch.com/articles/ai-agent-governance-guide-small-business)
    - [Migration and ownership](https://scalewithsearch.com/articles/leaving-vendor-ai-memory-guide)
  - For machines
    - [llms.txt](https://scalewithsearch.com/llms.txt)
    - [llms-full.txt](https://scalewithsearch.com/llms-full.txt)
    - [Machine view](https://scalewithsearch.com/?view=machine)
- Company
  - Evidence
    - [Proof](https://scalewithsearch.com/proof)
  - Company
    - [About](https://scalewithsearch.com/about)

# Build an AI context file that briefs the model before every session.

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 gives it to the model at the start of each session.

The file is plain text. You write it once, and you update it when your work changes.

## What a context file is

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

Think of a capable assistant with complete amnesia. Every morning, the assistant reads a briefing document before work. The document says who you are, what you work on, how you want things done, and which mistakes to avoid.

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. At the start of a conversation, the window holds the provider's system instructions and your first message.

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

This distinction matters. 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. You pre-load the session; you do not change the model.

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

A context file needs organization. Random facts create noise. Structured facts give the model something it can apply.

### Start with identity

The model needs to know who it works with. Use a few lines that shape every response. 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 prevent repeated mistakes:

```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
```

### Add the domain knowledge

Add the facts that the model cannot know about your work:

```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. Models tend to use facts at the start and end of a long input better than facts in the middle. Use headings and lists so each fact is easy to locate.

Update the file when circumstances change. If priorities shifted last week and the file still lists the old ones, the model works toward the old goals.

Make preferences specific. "Write professionally" means different things in different contexts. "Use short sentences. No jargon. Include specific numbers." gives the model constraints it can follow.

Include examples. When you want a particular output style, show it. Models match an example more reliably than an abstract description.

Layer the context. One large file becomes hard to maintain. Use a master file for universal preferences, project files for project detail, and client files for client requirements.

## 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 explicit 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. 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 a previous version. Product memory offers limited history.

The tradeoff is setup effort. Built-in memory works with no setup but gives you little control. A context file needs work up front and then scales with the business.

## Keep the file current with a weekly pass

A context file is a snapshot. The identity section changes rarely. The current-state section changes every week, and it is the section most people forget.

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.

The pass takes about five minutes. Date the file at the top each time, such as `last_verified: 2026-09-25`. 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. Treat the file like any other data you send to the provider. Keep passwords, API keys, and sensitive client records out of it. The article on [what client data belongs in AI agent memory](/articles/client-data-in-ai-agent-memory) sets those limits.

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

Start small. Create a file with three sections: who you are, what you work on, and how you want responses formatted. Use it for your most important conversations first.

In ChatGPT, 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.

Here is a pass and a fail for the sample file above. 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.


## Related: AI memory

- [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/ai-memory-compounding-effect)
- [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)
```
