Procedural Memory
Semantic memory holds what an agent knows. Procedural memory holds how the agent does things: the steps, the rules, and the habits that decide its behavior. For a tester, this is the memory that you change when you edit a system prompt, a CLAUDE.md file, or a skill.
7 min read7 মিনিটে পড়া যায় · 7 sections7টি সেকশন · 4 sources4টি সোর্স · updated Nov 2026আপডেট: Nov 2026
Rules load once, skills load on demandরুল সবসময় লোড হয়, স্কিল দরকারে
Compare what CLAUDE.md and a skill cost in each session, then change how many sessions are releases.প্রতি সেশনে CLAUDE.md আর একটা স্কিলের খরচ তুলনা করুন, তারপর কয়টা সেশন রিলিজ তা বদলান।
You’ll learnআপনি শিখবেন
- CLAUDE.md loads in every sessionCLAUDE.md প্রতি সেশনে লোড হয়
- A rule in CLAUDE.md is not enforcedCLAUDE.md-এর রুল জোর করা নয়
- A hook can block an actionহুক একটা কাজ আটকাতে পারে
- A long procedure costs tokens everywhereলম্বা procedure সব জায়গায় টোকেন খরচ করে
- A skill loads only when usedস্কিল শুধু ব্যবহার হলে লোড হয়
In plain words
Procedural memory is long-term memory for the skills of tasks Source 2সোর্স 2. In the tutorial's words, it holds the "how", not the "what". A person often shows a skill by doing it and cannot easily put it into words Source 2সোর্স 2.
In an AI agent, procedural memory has two forms. One form is implicit: it is in the weights of the language model. The other form is explicit: it is in the code of the agent Source 1সোর্স 1. Together, they decide how the agent acts.
The name "procedural memory" in this module follows the infographic "7 Types of Agent Memory". Research papers group memory in a different way. The CoALA paper has a working memory and three long-term memories: episodic, semantic, and procedural Source 1সোর্স 1. Compare this page with semantic memory (facts) and episodic memory (past events).
সহজ English
Procedural memory is long-term memory for the skills of a task Source 2সোর্স 2. In the tutorial's words, it is about "how to do it", not "what is true". People often show a skill by doing it. They cannot always explain it in words Source 2সোর্স 2.
An AI agent has this memory in two places. Some of it is hidden inside the model weights. Some of it is written in the agent's code Source 1সোর্স 1. Both decide what the agent does.
This module uses the names from the infographic "7 Types of Agent Memory". Research papers sort memory in other ways. The CoALA paper has a working memory and three long-term memories: episodic, semantic, and procedural Source 1সোর্স 1. See also semantic memory (facts) and episodic memory (past events).
বাংলা ব্যাখ্যা
Procedural memory হলো কাজের দক্ষতার long-term memory Source 2সোর্স 2। Tutorial-এর ভাষায়, এটা "কীভাবে করতে হয়" ধরে রাখে, "কী সত্য" নয়। মানুষ অনেক সময় কাজটা করে দেখিয়ে দক্ষতা প্রমাণ করে, কিন্তু মুখে সহজে বোঝাতে পারে না Source 2সোর্স 2।
AI agent-এ procedural memory দুই রকম। একটা implicit: language model-এর weights-এর ভেতরে থাকে। অন্যটা explicit: agent-এর code-এ লেখা থাকে Source 1সোর্স 1। দুটো মিলে agent কীভাবে কাজ করবে তা ঠিক করে।
এই module-এ নামগুলো "7 Types of Agent Memory" infographic থেকে নেওয়া। Research paper-গুলো memory অন্যভাবে ভাগ করে। CoALA paper-এ একটা working memory আর তিনটা long-term memory আছে: episodic, semantic, আর procedural Source 1সোর্স 1। তুলনার জন্য semantic memory (তথ্য) আর episodic memory (আগের ঘটনা) দেখুন।
Where it comes from
In psychology. The APA dictionary defines procedural memory as long-term memory for the skills of particular tasks Source 2সোর্স 2. Skilled performance shows this memory. It is often separate from the ability to describe the skill in words Source 2সোর্স 2.
In cognitive architectures. Cognitive architectures such as Soar also use the term. In Soar, procedural memory stores the production system: the set of rules that act on working memory and decide the agent's behavior Source 1সোর্স 1.
In language agents. The CoALA paper takes this idea to agents built on large language models. It names two forms. The first form is implicit knowledge in the LLM weights. The second form is explicit knowledge in the agent's code Source 1সোর্স 1. The designer must write the first procedural memory, so that the agent can start Source 1সোর্স 1.
Two models, one overlap. CoALA puts the model weights under procedural memory Source 1সোর্স 1. The infographic has a separate type for the weights: parametric memory. So the two models split the same thing in different ways. On this page, the focus is the explicit part: code, prompts, and instruction files.
সহজ English
In psychology. The APA dictionary says procedural memory is long-term memory for the skills of a task Source 2সোর্স 2. You show this memory when you do the task well. Often you cannot explain the skill in words Source 2সোর্স 2.
In cognitive architectures. Soar is a cognitive architecture, a design for AI systems. In Soar, procedural memory is a set of rules. The rules look at working memory and decide what the agent does Source 1সোর্স 1.
In language agents. The CoALA paper uses the same idea for agents built on large language models. It names two forms. One form is hidden in the model weights. The other form is written in the agent's code Source 1সোর্স 1. The designer must write the first version, so the agent can start at all Source 1সোর্স 1.
Two models, one overlap. CoALA counts the model weights as procedural memory Source 1সোর্স 1. The infographic gives the weights their own type: parametric memory. So the two models cut the same thing differently. This page looks mostly at the written part: code, prompts, and instruction files.
বাংলা ব্যাখ্যা
মনোবিজ্ঞানে। APA dictionary অনুযায়ী procedural memory হলো নির্দিষ্ট কাজের দক্ষতার long-term memory Source 2সোর্স 2। কাজটা দক্ষতার সঙ্গে করলেই এই memory দেখা যায়। অনেক সময় দক্ষতাটা কথায় বোঝানোর ক্ষমতা এর থেকে আলাদা থাকে Source 2সোর্স 2।
Cognitive architecture-এ। Soar-এর মতো cognitive architecture-ও এই শব্দ ব্যবহার করে। Soar-এ procedural memory হলো production system: কিছু rule, যেগুলো working memory-র ওপর কাজ করে agent-এর আচরণ ঠিক করে Source 1সোর্স 1।
Language agent-এ। CoALA paper এই ধারণা LLM-ভিত্তিক agent-এ নিয়ে আসে। এখানে দুই রকম আছে। প্রথমটা LLM weights-এর ভেতরের implicit জ্ঞান। দ্বিতীয়টা agent-এর code-এ লেখা explicit জ্ঞান Source 1সোর্স 1। Agent চালু করতে designer-কেই প্রথম procedural memory লিখে দিতে হয় Source 1সোর্স 1।
দুই model, একই জিনিস। CoALA model weights-কে procedural memory-তে রাখে Source 1সোর্স 1। Infographic-এ weights-এর জন্য আলাদা type আছে: parametric memory। তাই দুই model একই জিনিস ভিন্নভাবে ভাগ করে। এই পাতায় মূলত লেখা অংশটা দেখা হবে: code, prompt, আর instruction file।
How an agent gets it
An agent gets explicit procedural memory from text and code that a person writes. Tutorial's own view: in Claude Code, three places act as procedural memory. The Anthropic docs do not use the term "procedural memory" for them.
CLAUDE.md files. These are Markdown files. They give Claude persistent instructions for a project, a personal workflow, or a whole organization Source 3সোর্স 3. Claude reads them as context. They are not enforced configuration Source 3সোর্স 3. To block an action whatever Claude decides, use a PreToolUse hook Source 3সোর্স 3.
Skills. A skill holds a procedure. The docs advise a skill when you paste the same checklist or multi-step procedure again and again. They also advise one when a section of CLAUDE.md has become a procedure and not a fact Source 4সোর্স 4. A skill's body loads only when Claude uses the skill Source 4সোর্স 4. CLAUDE.md content does not work this way Source 4সোর্স 4.
Agent code. The CoALA paper counts the agent's own code as explicit procedural memory Source 1সোর্স 1. The designer writes it before the first run Source 1সোর্স 1.
written by a person loaded
CLAUDE.md ─────────────────────────────► every session (as context)
skill ─────────────────────────────► only when the skill is used
agent code ─────────────────────────────► runs as the agent's control flowThis diagram is the tutorial's own summary of the points above.
সহজ English
An agent gets its written "how to" knowledge from text and code that people write. Tutorial's own view: in Claude Code, three places work like procedural memory. The Anthropic docs do not call them "procedural memory".
CLAUDE.md files. These are Markdown files with lasting instructions for a project, for one person's way of working, or for a whole company Source 3সোর্স 3. Claude reads them as context. They are not hard rules Source 3সোর্স 3. If an action must always be blocked, use a PreToolUse hook Source 3সোর্স 3.
Skills. A skill holds a set of steps. The docs say: make a skill when you keep pasting the same checklist or steps into chat, or when a part of CLAUDE.md has turned into steps and not a fact Source 4সোর্স 4. The body of a skill loads only when Claude uses it Source 4সোর্স 4. CLAUDE.md does not work this way Source 4সোর্স 4.
Agent code. The CoALA paper counts the agent's own code as written procedural memory Source 1সোর্স 1. The designer writes it before the agent starts Source 1সোর্স 1.
written by a person loaded
CLAUDE.md ─────────────────────────────► every session (as context)
skill ─────────────────────────────► only when the skill is used
agent code ─────────────────────────────► runs as the agent's control flowThe diagram is the tutorial's own summary.
বাংলা ব্যাখ্যা
Agent তার explicit procedural memory পায় মানুষের লেখা text আর code থেকে। Tutorial-এর নিজের মত: Claude Code-এ তিনটা জায়গা procedural memory-র মতো কাজ করে। Anthropic docs এগুলোকে "procedural memory" বলে না।
CLAUDE.md file। এগুলো Markdown file। এগুলো একটা project, আপনার নিজের workflow, বা পুরো organization-এর জন্য Claude-কে স্থায়ী instruction দেয় Source 3সোর্স 3। Claude এগুলো context হিসেবে পড়ে। এগুলো enforced configuration নয় Source 3সোর্স 3। Claude যা-ই ঠিক করুক, কোনো action আটকাতে চাইলে PreToolUse hook ব্যবহার করুন Source 3সোর্স 3।
Skill। একটা skill একটা procedure ধরে রাখে। Docs বলে: আপনি যদি একই checklist বা multi-step procedure বারবার chat-এ paste করেন, অথবা CLAUDE.md-এর কোনো অংশ তথ্যের বদলে procedure হয়ে যায়, তখন skill বানান Source 4সোর্স 4। Skill-এর body শুধু তখনই load হয়, যখন Claude skill-টা ব্যবহার করে Source 4সোর্স 4। CLAUDE.md এভাবে কাজ করে না Source 4সোর্স 4।
Agent code। CoALA paper agent-এর নিজের code-কে explicit procedural memory ধরে Source 1সোর্স 1। প্রথম run-এর আগে designer এটা লেখেন Source 1সোর্স 1।
written by a person loaded
CLAUDE.md ─────────────────────────────► every session (as context)
skill ─────────────────────────────► only when the skill is used
agent code ─────────────────────────────► runs as the agent's control flowএই diagram ওপরের কথাগুলোর tutorial-এর নিজের সারাংশ।
A real-life example
This example is the tutorial's own illustration. It is not from a source.
A QA team uses Claude Code in a test automation repository. The team writes three rules in the project CLAUDE.md:
- Run the unit tests with `npm test` before you say a task is done.
- Put new Playwright tests in `tests/e2e/`.
- Never change a snapshot file to make a test pass.These rules are procedural memory in the tutorial's sense: they tell the agent how to work, not what is true. Claude gets them as context in each session Source 3সোর্স 3. The third rule is important, but CLAUDE.md does not enforce it Source 3সোর্স 3. If the team must block snapshot edits in every case, a PreToolUse hook is the right tool Source 3সোর্স 3.
Later, the team has a long release checklist. They move it from CLAUDE.md into a skill. Now the checklist loads only when someone asks for a release, and it costs almost nothing in other sessions Source 4সোর্স 4.
To confirm that the CLAUDE.md file loaded, a tester runs /context all in a session and looks at the Memory files list Source 3সোর্স 3.
সহজ English
This example is the tutorial's own. It is not from a source.
A QA team uses Claude Code in their test automation project. They put three rules in the project CLAUDE.md:
- Run the unit tests with `npm test` before you say a task is done.
- Put new Playwright tests in `tests/e2e/`.
- Never change a snapshot file to make a test pass.In this tutorial's view, these rules are procedural memory: they say how to work, not what is true. Claude gets them as context in each session Source 3সোর্স 3. The third rule matters a lot, but CLAUDE.md does not force it Source 3সোর্স 3. If the team must always block snapshot changes, they should use a PreToolUse hook Source 3সোর্স 3.
Later the team has a long release checklist. They move it out of CLAUDE.md and into a skill. Now it loads only when someone asks for a release, so it costs almost nothing the rest of the time Source 4সোর্স 4.
To see if CLAUDE.md loaded, a tester runs /context all and looks at the Memory files list Source 3সোর্স 3.
বাংলা ব্যাখ্যা
এই উদাহরণ tutorial-এর নিজের। এটা কোনো source থেকে নেওয়া নয়।
একটা QA team তাদের test automation repository-তে Claude Code ব্যবহার করে। Team-টা project-এর CLAUDE.md-এ তিনটা rule লেখে:
- Run the unit tests with `npm test` before you say a task is done.
- Put new Playwright tests in `tests/e2e/`.
- Never change a snapshot file to make a test pass.Tutorial-এর অর্থে এই rule-গুলো procedural memory: এগুলো বলে কীভাবে কাজ করতে হবে, কী সত্য তা নয়। প্রতিটা session-এ Claude এগুলো context হিসেবে পায় Source 3সোর্স 3। তৃতীয় rule-টা গুরুত্বপূর্ণ, কিন্তু CLAUDE.md এটা enforce করে না Source 3সোর্স 3। সব অবস্থায় snapshot পরিবর্তন আটকাতে হলে PreToolUse hook ঠিক উপায় Source 3সোর্স 3।
পরে team-এর একটা লম্বা release checklist হয়। তারা এটা CLAUDE.md থেকে সরিয়ে একটা skill-এ রাখে। এখন checklist-টা শুধু release চাইলে load হয়, অন্য session-এ প্রায় কোনো খরচ হয় না Source 4সোর্স 4।
CLAUDE.md load হয়েছে কি না দেখতে একজন tester session-এ /context all চালান আর Memory files তালিকা দেখেন Source 3সোর্স 3।
Common mistakes
Treating instructions as hard rules. CLAUDE.md content is context, not enforced configuration Source 3সোর্স 3. A rule in it can still be broken. Use a hook when an action must never happen Source 3সোর্স 3.
Writing very long instruction files. The docs give a target of under 200 lines for each CLAUDE.md file. Longer files use more context and Claude follows them less well Source 3সোর্স 3. Move long procedures into a skill, so that they load only when needed Source 4সোর্স 4.
Leaving conflicting rules. If two instructions contradict each other, Claude may pick one of them arbitrarily Source 3সোর্স 3. A tester may then see behavior that changes from run to run.
Expecting code to cover every case. Agent code is easy to read and extend. But it is often brittle in the face of stochasticity (unpredictable situations), and it handles only the situations that the designer expected Source 1সোর্স 1.
Letting the agent rewrite its own procedures without checks. An agent can change its own procedural memory. This is much riskier than a write to episodic or semantic memory. It can add bugs, or it can let the agent work against the designer's intent Source 1সোর্স 1.
সহজ English
Thinking instructions are hard rules. CLAUDE.md is context, not a rule that is forced Source 3সোর্স 3. Claude can still break a rule in it. Use a hook when something must never happen Source 3সোর্স 3.
Very long instruction files. The docs say to aim for less than 200 lines in each CLAUDE.md file. Longer files use more context, and Claude follows them less well Source 3সোর্স 3. Move long step lists into a skill, so they load only when needed Source 4সোর্স 4.
Rules that fight each other. If two instructions say opposite things, Claude may pick either one Source 3সোর্স 3. Then the behavior may change from one run to the next.
Expecting code to handle everything. Agent code is easy to read and to add to. But it often breaks when things are unpredictable, and it only covers the cases the designer thought of Source 1সোর্স 1.
Letting the agent rewrite its own steps with no checks. An agent can change its own procedural memory. This is much riskier than changing its episodic or semantic memory. It can add bugs, or the agent can go against what the designer wanted Source 1সোর্স 1.
বাংলা ব্যাখ্যা
Instruction-কে কঠিন rule ভাবা। CLAUDE.md-এর লেখা context, enforced configuration নয় Source 3সোর্স 3। তাই এর rule-ও ভাঙতে পারে। কোনো action কখনোই না হতে দিতে চাইলে hook ব্যবহার করুন Source 3সোর্স 3।
খুব লম্বা instruction file লেখা। Docs প্রতিটা CLAUDE.md file 200 লাইনের নিচে রাখার লক্ষ্য দেয়। লম্বা file বেশি context খরচ করে, আর Claude সেগুলো কম মেনে চলে Source 3সোর্স 3। লম্বা procedure skill-এ সরিয়ে নিন, যাতে দরকার হলেই শুধু load হয় Source 4সোর্স 4।
পরস্পরবিরোধী rule রেখে দেওয়া। দুটো instruction একে অপরের উল্টো হলে Claude যেকোনো একটা বেছে নিতে পারে Source 3সোর্স 3। তখন আপনি হয়তো প্রতি run-এ ভিন্ন আচরণ দেখবেন।
ভাবা যে code সব case সামলাবে। Agent code পড়া আর বাড়ানো সহজ। কিন্তু অনিশ্চিত/অপ্রত্যাশিত পরিস্থিতিতে এটা প্রায়ই ভেঙে যায়, আর designer যেসব অবস্থা আগে ভেবেছিলেন শুধু সেগুলোই সামলায় Source 1সোর্স 1।
যাচাই ছাড়া agent-কে নিজের procedure বদলাতে দেওয়া। Agent নিজের procedural memory বদলাতে পারে। এটা episodic বা semantic memory-তে লেখার চেয়ে অনেক বেশি ঝুঁকির। এতে bug ঢুকতে পারে, বা agent designer-এর উদ্দেশ্যের বিরুদ্ধে কাজ করতে পারে Source 1সোর্স 1।
What a tester can check
Procedural memory is text and code that a person can read, so a tester can test it like any other configuration.
Tutorial advice
These test ideas are the tutorial's own advice.
- Repeat the run. Give one rule in the system prompt or CLAUDE.md. Run the same task many times and count how often the agent follows the rule. A rule that is only context can fail sometimes.
- Plant a conflict. Add two rules that contradict each other. Record which one the agent follows in each run, then remove the conflict.
- Check that the file loaded. Before you report a broken rule, confirm that the instruction file is in the session.
- Trigger a skill, then avoid it. Send a request that matches a skill and check that it loads. Send an unrelated request and check that it does not load.
- Rerun the old prompts. After the agent or a person edits the instructions, run the old regression prompts again and compare the results.
সহজ English
Procedural memory is text and code that people can read. So a tester can test it like any other settings file.
Tutorial advice
These test ideas are the tutorial's own advice.
- Run it many times. Put one rule in the system prompt or CLAUDE.md. Run the same task again and again. Count how often the agent obeys. A rule that is only context can fail now and then.
- Add a conflict on purpose. Write two rules that say opposite things. Note which one wins in each run. Then remove the conflict.
- Make sure the file loaded. Before you report a broken rule, check that the instruction file is in the session.
- Call a skill, then don't. Ask for something that matches a skill and check that it loads. Ask for something else and check that it stays unloaded.
- Run the old prompts again. After anyone changes the instructions, run the old test prompts again and compare.
বাংলা ব্যাখ্যা
Procedural memory হলো মানুষের পড়ার মতো text আর code। তাই একজন tester এটাকে অন্য যেকোনো configuration-এর মতোই test করতে পারেন।
Tutorial advice
এই test idea-গুলো tutorial-এর নিজের পরামর্শ।
- বারবার চালান। System prompt বা CLAUDE.md-এ একটা rule দিন। একই কাজ অনেকবার চালান আর গুনুন agent কতবার rule মানে। শুধু context হিসেবে থাকা rule মাঝে মাঝে ভাঙতে পারে।
- ইচ্ছা করে conflict রাখুন। পরস্পরবিরোধী দুটো rule লিখুন। প্রতি run-এ কোনটা মানা হলো লিখে রাখুন, তারপর conflict সরিয়ে দিন।
- File load হয়েছে কি না দেখুন। Rule ভাঙার report দেওয়ার আগে নিশ্চিত হোন যে instruction file-টা session-এ আছে।
- Skill চালু করুন, তারপর এড়িয়ে যান। Skill-এর সঙ্গে মেলে এমন request দিন আর দেখুন skill load হয় কি না। অন্য request দিন আর দেখুন সেটা load হয় না।
- পুরোনো prompt আবার চালান। Agent বা কেউ instruction বদলালে পুরোনো regression prompt-গুলো আবার চালিয়ে ফল মিলিয়ে দেখুন।
Key words
| Term | Meaning |
|---|---|
| Procedural memory | Long-term memory for skills: how to do a task, not what is true. |
| Implicit procedural memory | Skills stored in the LLM weights (CoALA). The infographic calls the weights parametric memory. |
| Explicit procedural memory | Skills written in the agent's code (CoALA). In the tutorial's view, also prompts and instruction files. |
| Production system | In Soar, the set of rules that act on working memory and decide behavior. |
| CLAUDE.md | A Markdown file with persistent instructions for Claude Code. Claude reads it as context. |
| Skill | A Claude Code extension that holds a procedure. Its body loads only when it is used. |
PreToolUse hook | A hook that can block a tool action whatever Claude decides. |