Zed Agent Memory: Keep Context Across Coding Sessions
Use Zed’s supported instructions, project files, and thread tools to preserve useful context. Test a new session instead of assuming old conversations follow you.
Updated 5 min read
To keep useful context across Zed coding sessions, save durable guidance in supported instruction files and record unfinished work in a short project handoff. Check a genuinely new thread before assuming that a previous conversation has become reusable memory.
Start by identifying whether you are using Zed Agent or an external assistant inside Zed, because their configuration can differ. fenbs can keep reviewed project decisions and progress outside the editor when the same work also involves other AI apps.
How do you establish a reliable starting point?
- Identify the agent selected in the Agent Panel. Write down whether the thread uses Zed Agent, an External Agent, or a terminal-based assistant.
- Inspect the project’s existing instruction files before adding another one. Find the file your selected agent actually reads.
- Add one short, verified instruction, such as the required test command or an approved project constraint. Include the reason when it affects later choices.
- Save a separate handoff with the current task, files changed, checks completed, unresolved questions, and next step.
- Open a fresh thread and ask the assistant to identify the instruction and handoff source before continuing the work.
Zed’s Instructions documentation (opens in a new tab) describes always-on personal and project guidance for Zed Agent. It also warns that external agents can read instructions through their own systems. A file that works for the built-in agent is therefore something to test again when you switch agents.
Which instructions does Zed Agent load?
Zed supports personal AGENTS.md instructions and project instruction files. Personal instructions apply across projects; project guidance overrides conflicting personal guidance. Keep broad preferences personal and put repository-specific constraints with the project.
There is a practical trap: the documented project loader uses the first matching filename in its compatibility list. Earlier files such as .rules can take priority over AGENTS.md. Check that list before diagnosing an ignored instruction by repeatedly adding stronger language to the wrong file.
Keep the active instruction short: what must be true, when it applies, and where its evidence lives. For example, “Use the shared form validator for public forms; see the implementation in packages/forms.” That gives the assistant a concrete check instead of the vague command to follow project conventions.
Do not use your permanent instructions as a diary of yesterday’s edits. The agent memory guide explains why durable guidance and temporary working context need different treatment.
What survives in a thread, and what needs a handoff?
A previous thread can help you find earlier work, but it is not a substitute for a reviewed project summary. Zed’s Agent Panel guide (opens in a new tab) documents Thread History and New From Summary, which creates a fresh Zed Agent thread seeded with a conversation summary. Availability can vary for external agents.
Use history to recover what happened. Use a handoff to say what matters now. A discussion may contain three proposed solutions, while the handoff should identify the selected solution, who approved it, and which check remains unfinished.
- Current task: describe the outcome still being worked toward, with a reference to its source.
- Completed work: list actual changes and the files that contain them.
- Verification: distinguish checks that passed, failed, and have not been run.
- Next action: give the smallest useful step, including any approval or missing evidence it depends on.
Read any generated summary before reusing it. If it says “tests pass” when the previous thread only proposed running them, correct it. A compact false statement can be more misleading than a long conversation. Shared unfinished work can also be recorded in fenbs Where we left off.
How do you test continuity in a fresh thread?
Choose a fact that is specific enough to verify and harmless enough to use as a test. For a sample website, it might be that the approved contact page has no phone-number field. Save the instruction with its design source and record the unfinished implementation check.
- Open a new thread for the intended project. For the first test, avoid starting from a summary that already contains the answer.
- Ask, “What contact-page constraint applies, and which file establishes it?” Confirm that the assistant names the active source.
- Ask what should happen next and compare its answer with your handoff. A correct rule alone does not prove progress was carried forward.
- Revise the example constraint, remove the obsolete active instruction, and repeat in another new thread.
This tests reading and correction without requiring a code change. If it fails, record whether the file was absent, inaccessible, ignored, or misinterpreted. Those failures require different fixes. Designing a broader storage system belongs to agent memory architecture; this check only establishes your own project’s continuity.
Why can two agents in the same editor know different things?
Zed’s Parallel Agents documentation (opens in a new tab) describes independent threads with their own context and history. A second thread being visible in the same sidebar does not mean it received the first thread’s decisions. Give each thread the reviewed starting record it needs.
Differences can also come from the selected assistant. Zed’s External Agents guide (opens in a new tab) explains that an external agent usually controls its own tools and settings. Confirm the active agent, project location, and instruction source before comparing answers.
When two threads worked on related tasks, reconcile the resulting facts before saving a shared summary. One thread’s planned change may already have been replaced by the other’s completed work. Never combine both summaries without checking the current files and the human-approved decision.
How should you fix stale or unsafe saved guidance?
Locate the active source before changing the wording. Check whether an earlier compatibility file is taking precedence, whether the rule belongs to personal guidance, and whether an old handoff still repeats it. Update the current record and mark superseded conclusions clearly.
Keep credentials and private customer records out of broadly reusable instructions. Link to an approved source instead of copying sensitive details into every session. Outside documents may contain instructions, but their text should not automatically gain authority over your project; read the agent memory security guide for that distinction.
When a correction affects several assistants, update the shared decision first and then refresh the local summary that points to it. Avoid leaving two active rules that disagree and expecting a future thread to infer which one the owner meant.
How to do this with fenbs
- Create a free account and add the project you want to continue across editors and AI apps.
- Record approved constraints in Decisions and rules, then add verified explanations as AI context notes.
- Add the current task on the kanban board and save the unfinished checks and next step in Where we left off.
- Maintain this record through the web app, or use a supported connected assistant that reads the project context and saves progress.
This is a deliberate handoff alongside Zed, rather than automatic synchronization of editor threads. fenbs is not the right fit for recovering Zed chat history or for someone who only needs one local instruction file. See the AI memory hub for related ways to preserve work.
Carry the reviewed work beyond the editor
Save the approved rule, current task, and unfinished check in fenbs before you change tools. A supported connected assistant can start from that shared record, so the next session has a concrete next action instead of a pasted transcript.
Create a free accountFree for one person · No credit card · Works with Claude, ChatGPT, Cursor and more