All pages
Lesson 2.4 · Work with the agent · 12 min
Context and memory
Pinned files, notes, the scratchpad and what the agent remembers.
What the agent knows at the start of a turn decides how well it works. In this lesson you choose what goes into that context: pinned files, project notes, other tabs, and memory that lasts across conversations. Then you look at exactly what the model sees.
Time: 12 minutes · Works on: macOS app
Where context comes from
Each turn, TRMNLY assembles a context for the model from several sources. You switch each one on or off.
| Source | What it is |
|---|---|
| Pinned files | Files you chose to keep in front of the agent |
| Project README / docs | Files like AGENTS.md, CLAUDE.md and README.md from the project root |
| Memory index | What the agent has learned about you and the project |
| Project notes | The project's notepad from the Notes tab |
| Attached tabs | The title, folder and visible output of terminal tabs you attach |
Choose what's included
- Open the agent's gear menu and choose Scope (projects & tabs)….
- Under Include, turn on what you want: Pinned files, Project README / docs, Memory index, System-prompt addendum and Project notes.
- Under Attach tabs, pick terminal tabs whose output the agent should see. Each attached tab adds its title, working directory and a snapshot of its visible output.
- Under Projects in context, leave Current, or choose Pick… to add other projects the agent may work across.
These settings belong to the conversation, so each chat can have its own.
Pin a file
Pin the files the agent should always have, such as a schema or a style guide.
- Open the Files tab in the right sidebar.
- Select a file and use Pin to agent, either the pin button in the actions bar or the file's row.
- To review or remove pins, open the gear menu and choose Pinned files….
To include a file in one message only, type @ and its path in the
composer instead.
Write project notes
The Notes tab is a markdown notepad for the project. It's a good place for things the agent should know every turn: how to run the tests, which service is flaky, what you're working on this week.
- Choose More → Notes in the right sidebar.
- Write a few lines about the project.
- Make sure Project notes is on in the scope sheet.
- Ask the agent a question your notes answer.
A project can have several notes. The + button adds one and the dropdown switches between them; the active note is the one the agent reads.
Memory
Memory lasts across conversations. The agent saves facts as it works, and you can read and edit them.
- Open the gear menu and choose Memory….
- Browse what's saved. Memories come in four types:
- user: who you are and how you like to work.
- feedback: corrections and confirmations, things to repeat or avoid.
- project: current work, deadlines and constraints for this project.
- reference: pointers to outside systems, such as a dashboard.
- Edit or delete anything that's wrong.
To teach it something on purpose, tell it: Remember that our staging deploys run from the release branch.
The scratchpad
Each conversation also has a scratchpad, where the agent keeps working notes during a long task instead of repeating them every turn. Open it from the gear menu with Scratchpad… to see or edit what the agent has written.
See what the model sees
- Open the gear menu and choose What the model sees….
- The Context Inspector shows the exact context assembled for the next turn, block by block.
- Turn a source off in the scope sheet and open the inspector again to see it disappear.
Use the inspector when the agent seems to be missing something, or when a turn costs more than you expected.
Projects make this automatic
When a project is selected, project notes and project-type memories are scoped to that project, and the agent's shell commands get the project's env file. Switching projects switches what the agent knows.
Check yourself
- The agent answers a question using only your project notes.
- A file you pinned shows up in What the model sees….
- Memory… shows at least one memory, and you edited it.
Go further
- Agent — notes, scratchpad and memory
- Notes — multiple notes, search, and the notes tools
- Files — the file tree, preview and pinning
- Next lesson: Claude Code, Codex and Gemini