Context
Mend’s product direction puts project context beside agent sessions and worktrees. The complete context-pack workflow is not shipped yet, so this page separates current inputs from planned work.
Available now
Section titled “Available now”A session can start with information and resources that already belong to the project, its organization, or its owner:
- repository files and instructions such as
AGENTS.md; - reference repositories the organization keeps and the project selects, read-only at
/workspace/ref/<name>; - organization folders the project selects, at
/workspace/home/<name>, read-only unless the project chose otherwise (see Folders); - your skill library and the project’s, delivered to the harness at launch (see Skills);
- a note in each harness’s own memory file (
~/.claude/CLAUDE.md,~/.codex/AGENTS.md) that names what is mounted and how to run Services. Mend rewrites only its own block, from the<!-- mend:workspace-note:begin … -->line to the<!-- mend:workspace-note:end -->line, at every launch and resume. What you or the agent write before or after it stays; - project configuration variables and secrets;
- personal provider accounts and dotfiles;
- your secret files, written into your own home before the agent starts and never captured, and your pi profile for pi sessions;
- your agent memory for the project: what Claude Code and Codex learned in your earlier sessions on it, saved back when the agent ends;
- other projects of the store, added to a running session with
mend repo add(see Several repositories in one session); - the previous process record and provider state when a session resumes.
Workspaces work on their own disk, so references and folders reach them as copies laid down beside
the worktree when the workspace starts: a reference as its tree at HEAD, without history, and a
folder as its files. A source over 64 MiB is left out with a warning, and the session still starts.
Host folders an operator declares on the machine are not delivered to these workspaces.
A session can also receive context with a turn:
- An image pasted into an attached terminal with
Ctrl+Vis stored in the session’s harness home (in a per-person workspace, in the saved directory of the person who pasted it, written as them), and its path is pasted for the agent to read. - A session started or followed up from Slack receives the request, then the thread: every message up to the mention, at most fifty messages or 20,000 characters, keeping the newest. Messages from people in the install’s Slack workspace are quoted with their author’s name and marked as Slack thread context, apart from the request; bots and people from outside the workspace are dropped. Screenshots in the request and in those messages are attached the same way as a pasted image. See Slack.
Mend records the workspace and repository state used for the session where the current contracts allow it, including which references and folders it received. These inputs are configuration and delivered resources. They are not yet a named, versioned context pack.
Planned context workflow
Section titled “Planned context workflow”The canonical product plan defines four additions:
- A context item is a file, document, note, URL, or previous handoff.
- A context pack is an editable named selection of those items for recurring work.
- A context snapshot freezes the exact selection supplied to one session.
- A handoff turns the end of a session into editable context for later work.
The schema has a place for a session’s context snapshot, but sessions are provisioned without one today. A future session will receive an immutable snapshot even when the reusable pack changes later. That will make the question “what did this agent know?” answerable from the session itself.
What not to assume
Section titled “What not to assume”Mend does not currently provide hidden context selection or a context library in the public product. Do not rely on those features until the UI, storage, and session attachment path ship. Agent memory is the harness’s own memory, kept per person per project; Mend carries it between sessions and does not choose what goes in it.
For current work, keep durable instructions in the repository, select references and folders explicitly, keep reusable instructions as skills, and use the session record when resuming related work.