Start free
Guide Memory

How to give Cline better memory

Updated 5 min read

The short answer

Cline's own instructions state that its memory resets completely between sessions, so it keeps context by reading Memory Bank markdown files and Rules files back each task (Cline docs). Rules add persistent instructions across all conversations (Cline docs). For knowledge beyond the project, KnowMan offers a local stdio MCP server with tools such as kb_memories, kb_ask and kb_search over your saved reading, decisions and playbooks.

On this page9 sections
  1. What Cline remembers on its own
  2. Set up a Memory Bank
  3. Refresh memory before the context window fills
  4. Add Cline Rules for persistent instructions
  5. The cost of file-based memory
  6. Add long-term memory with KnowMan MCP
  7. Where KnowMan fits
  8. Use the hosted KnowMan server
  9. Questions people ask

What Cline remembers on its own

Cline does not carry memory from one session to the next. Its own Memory Bank instructions state that its memory resets completely between sessions and that after every reset it begins completely fresh, with the Memory Bank as its only link to previous work (Cline docs). The Memory Bank, a documentation methodology that turns Cline from a stateless assistant into a persistent development partner (Cline docs), provides that link. Through structured markdown files, Cline can remember project details across sessions, and those files are regular markdown files in your project that both you and Cline can access (Cline docs).

Set up a Memory Bank

Open Cline in your project and say "initialize memory bank". This creates the initial structure for a new project (Cline docs). The bank consists of core files and optional context files, all in Markdown format, that build on each other in a clear hierarchy (Cline docs). Two files do most of the work: activeContext.md holds current focus, recent changes and next steps, and updates most frequently, while progress.md tracks milestones and should be reviewed when resuming work (Cline docs). Later, say "follow your custom instructions" to tell Cline to read the Memory Bank and continue where you left off (Cline docs).

Refresh memory before the context window fills

Every AI model has a context window that limits how much information it can process at once (Cline docs). When the window fills up, ask Cline to "update memory bank" to document the current state before starting a new conversation. Updating the files before the window clears preserves important context and lets you continue in a fresh conversation (Cline docs). Cline recommends updating after significant milestones or direction changes, or every few sessions during active development (Cline docs). You can also let Auto Compact handle routine context management and reserve a manual "update memory bank" for important checkpoints (Cline docs).

Add Cline Rules for persistent instructions

Rules are markdown files that provide persistent instructions across all conversations (Cline docs). Instead of repeating the same preferences every time you start a new task, you define them once and Cline follows them automatically (Cline docs). Rules can be stored in your project workspace or globally on your system (Cline docs), and when both exist Cline combines them, with workspace rules taking precedence on conflict (Cline docs). Custom instructions apply globally across all projects, while a Rules file is project-specific, stored in your repo and easy to share with collaborators (Cline docs). Conditional rules can also activate Memory Bank instructions only when working with memory-bank/ files (Cline docs).

The cost of file-based memory

These features work, and they have documented limits. The Memory Bank instructions require Cline to read all memory bank files at the start of every task, something the instructions describe as not optional (Cline docs). Rules consume context tokens, and Cline advises avoiding lengthy explanations or pasting entire style guides (Cline docs). The Memory Bank itself holds project details in markdown files inside your project (Cline docs).

Add long-term memory with KnowMan MCP

KnowMan ships a standalone stdio MCP server, the package @knowman/mcp, started with npx -y @knowman/mcp on Node 22 or newer. It talks to KnowMan's HTTP API with a Bearer key in KNOWMAN_API_KEY, created at Settings > Connections > Connect an AI agent, or by running npx -p @knowman/mcp knowman login once. KnowMan documents configs for Claude Desktop, Claude Code and Cursor, not for Cline, and it also runs as a hosted server at https://api.knowman.io/mcp with OAuth sign-in or an API key. For the server itself, see the MCP server guide.

The server exposes tools for your saved library: kb_memories returns saved claims, decisions and playbooks, kb_ask answers questions with citations, and kb_search finds saved items by keyword or meaning, returning titles, URLs and metadata. kb_get_item, kb_save and kb_recent round out the set. See persistent memory for AI agents for the wider pattern.

Where KnowMan fits

Use both. Keep the Memory Bank for project state: it lives in your repo as regular markdown files that both you and Cline can access (Cline docs), and its instructions require Cline to read all memory bank files at the start of every task (Cline docs). Use KnowMan for knowledge that outlives one project: saved articles and links, tags, and memories holding claims, decisions and playbooks, queryable through kb_ask with citations. KnowMan is built for one person's library today, and there is no team plan yet. For more, see give your AI context and a knowledge base for AI agents.

Use the hosted KnowMan server

KnowMan also runs as a hosted MCP server at https://api.knowman.io/mcp, so a local Node process is optional. In clients that support remote MCP servers you add the server URL and sign in with OAuth: the client opens a KnowMan consent page, you approve, and access tokens refresh automatically.

You can also authenticate with an API key created in your KnowMan settings, sent as an Authorization: Bearer header. Then ask Cline to search or save, for example "search my KnowMan for ...".

The local stdio server, npx -y @knowman/mcp, stays available if you prefer to run it yourself; the open-source client lives at https://github.com/Essatt/knowman-mcp.

Questions people ask

Does Cline remember anything between sessions?

No. Cline's own Memory Bank instructions state that its memory resets completely between sessions (Cline docs). After every reset it begins completely fresh, and the Memory Bank is its only link to previous work (Cline docs).

How do I start a Memory Bank in Cline?

Say "initialize memory bank" and Cline creates the initial structure for a new project (Cline docs). Say "follow your custom instructions" to have it read the Memory Bank and continue where you left off, and "update memory bank" for a full documentation review and update (Cline docs).

What is the difference between Memory Bank and Rules?

Memory Bank files remember project details across sessions through structured markdown files (Cline docs), while Rules are markdown files that provide persistent instructions across all conversations (Cline docs). Custom instructions apply globally across all projects, while a Rules file is project-specific, stored in your repo for easy sharing (Cline docs). Conditional rules can also activate Memory Bank instructions only when working with memory-bank/ files (Cline docs).

Can Cline use KnowMan as memory?

KnowMan has no documented config for Cline. Its MCP server runs locally with npx -y @knowman/mcp, exposing kb_memories, kb_ask and kb_search over your saved reading, decisions and playbooks, and it also runs as a hosted server at https://api.knowman.io/mcp with OAuth sign-in or an API key.

Give Cline a memory that lasts

Try KnowMan Pro free for 14 days, no credit card. Create your account

Start free

Every new account starts with 14 days of Pro. No credit card.