Memory and context
The agent by default does not remember anything between tasks, and the model’s context window is finite. Pulse solves both problems: it accumulates knowledge about the project and itself compresses the conversation history.
Repository memory
For each repository, Pulse maintains a memory file in memory/<name>-<hash>.md (repository folder name and short path hash - identical names do not collide). The results of tasks, solutions and agreements go there: “tokens are not in localStorage”, “migrations only through alembic”, “this module is being rewritten, do not touch it”.
- Who writes. The architect of the swarm is himself, based on the results of the wave: his final answer without a block of tasks is added to memory. You use the “to memory” button in the sessions column.
- Who is reading? An excerpt (about 3000 characters) is included in the first turn of each new session in this repository and in the architect’s brief.
- Where to look and correct. In the task: “Repository memory · N” under the notes. In settings: Repositories → Memory. This is regular Markdown, edit by hand.
How memory becomes shared
The memory is located in the Pulse data folder, that is, on one machine. You can share it in two ways - they do not replace each other, and each is included separately in Settings → Repositories → General.
Via team project (cloud)
The repository memory becomes shared within the team project to which the repository is linked with a fingerprint. Publication is a person’s choice; a person resolves discrepancies (take the common one, leave his own, combine). Requires a cloud login and a project with this repository.
File in the repository itself
The same memory text is placed in a Markdown file next to the code. It travels with the repository, gets included in the regular review and is visible to those who do not have Pulse installed; You don’t need a cloud or a team project for this.
Handler in the main process (registerRepoMemoryFileIpc, src/main/memory/repoMemoryFile.ts) registered from src/main/ipc.ts - next to registerTeamMemoryIpc (since 0.30.28), so the section is in the window and works. The module cannot register itself intentionally: each channel of the main process passes assertTrustedIpc, and the trusted window is known only
ipc.ts — registration bypassing this check would open the writing of files to your repository to any frame that can reach it. Contract inspection of the bridge (ipcContract.test.ts) crashes if this registration is removed.
- You choose the place. There is no default: until the path is named, the file does not exist. The window offers
docs/pulse-memory.md,.pulse/memory.mdandPULSE_MEMORY.md, but none of them are substituted in advance. The path must be inside the repository and end with.md;.., absolute paths and.git/are rejected by words. - Pulse only writes the file. It's up to you to add it to git, commit it, and push it.
- The new entry arrives on its own. The result of the task from the swarm architect ends up in both memory and the file; You don't need to open settings for this.
- Someone else's edits are not overwritten. The file arrives by merging and is edited by hand. If one side has changed, Pulse carries the change silently (nothing to lose). If both ruled, it shows the headers of the records that each side does not have, and waits for a choice: merge, take from the file, leave your own.
- A regular git conflict is still a regular git conflict. Pulse does not interfere with the merging of branches and does not parse conflict markers - but also does not read the file with them: for now
<<<<<<<and>>>>>>>on the spot, the reconciliation stops and talks about it. Otherwise, both versions mixed together would have gone to the agent in the first turn under the guise of knowledge about the project. - Shutting down returns as it was. The file that no one has changed since our entry is removed (the deletion commit is yours). What is changed by someone else’s hand remains, and this is said in words.
- Limit - 256 KB, the same as shared memory in the cloud. The file size is checked before reading: the file in the repository can be replaced by anyone, and the memory goes to the agent as the first turn.
Vault for swarm roles 24/7: not yet connected
.pulse/memory/ — different memory: files in the repository for the seven roles of the swarm 24/7, and not the repository memory from the section above and the Markdown file you have not selected to synchronize it. Reading has been implemented for it CONSTRAINTS.md and relevant journal entries
instincts, memory isolation from cold-read reviewers and recording use after a successful response from the model. This is the code packages/pulse-memory and runRoleTurn in packages/pulse-agents.
In the current application, swarm turns do not cause runRoleTurn. The swarm from the window sends tasks through src/main/swarm/coordinator.ts → SessionManager; swarm server 24/7 imports from
@pulse/agents only the role registry for auditing. Contract session performer
AgentExecutor not yet connected to the queue handler. Therefore, the real progress of the role does not load instincts from Vault and does not record use. Creation .pulse/memory/ in itself does not change this. The repository memory and task notes from the sections above continue to run along their path.
To connect Vault to swarm 24/7, you need a local-executor with a lifecycle
AgentExecutor: handler TaskQueue.work creates a role session, its first turn uses
runRoleTurn with the repository root and task. Current runRoleTurn returns the complete response, so to stream tokens and cancel its inference call, you need to adapt it; repetition and report must also go through the same executor. Connecting to a swarm in the Pulse window is a separate option: adapter in SessionManager must explicitly map window roles to roles @pulse/agents, the cold-read model and policy. Add memory text to
memberFirstTurn not enough: it will bypass diff checks and accounting use, and a direct call
runRoleTurn next to the current one runTurn will execute the second request to the model.
Sign of a ready connection - production call runRoleTurn from the selected artist and end-to-end test of the first turn: suitable instinct got into context use written only after a successful response, and the cold-read reviewer did not receive the role memory. Before such a call, package tests check the library, not the behavior of the application.
Task notes
The “Notes” block in the sessions column is free text about a specific task: what should not be touched, where is the style, what tests to run. Goes into the context of the first turn of each session of this task and each member of the swarm. Unlike memory, it lives only within the task.
Instructions Versions
Instructions for the variants of the agent and swarm members are stored with history: version number, date, difference to the current text, full text, “Return” button. The session shows which version was sent to the agent with the first turn. This allows you to honestly compare: “he did better on v2 than on v3” - and return.
Context compression
The built-in agent (local model, GigaChat) monitors the size of the history in the context window from the model card:
- On 75 % window compression is turned on, the goal is to return to 50%.
- First, the tool leads in the old passages are trimmed (the full text of the file was needed then, not now).
- Then the old turns (except for the last two) are collapsed into one summary: what the user asked for, what tools were called and with what, what files were changed, how it ended.
- If this is not enough, a hard trimming of recent turns is performed, then everything except the current turn is included in the summary.
The fresh result of the tool is never touched, the “call → result” pairs are not broken, there is only one summary and it is added. A line like this appears in the transcript: “Context compressed: 3 turns compressed into a summary, output of 2 tools reduced (≈28k → ≈9k tokens out of 32k).”
Token scores are calibrated based on server responses: Pulse compares its score to prompt_tokens
and adapts to the model tokenizer.
For external agents (Claude Code, Codex, Kimi, OpenCode), the context is managed by the agent itself - Pulse only shows the filling in the chip.
What is stored where
| What | Where |
|---|---|
| Repository memory | memory/<name>-<hash>.md in the data folder |
| Agreement to maintain a memory file in the repository | pulse-memory-repo-file.json in the data folder |
| The memory file itself in the repository | the path inside the repository that you named |
| Task notes | inside pulse-tasks.json |
| History of instructions | pulse-settings.json, section promptHistory |
| Conversation history | transcripts/<sessionId>.jsonl — full, without compression; Only what is sent to the model is compressed |