Scratch folders
Give each session a git-ignored folder for notes and scripts.
What it does
- Creates
.agents/scratch/<session-id>in the session's working directory when an agent starts. - Adds a
.gitignorecontaining*in.agents/scratch, so scratch files never reach git. - Tells the agent the folder path so plans, notes and throwaway scripts land there instead of your repo root.
How to use
- Install the plugin and start a session.
- Ask the agent to write plans, notes or helper scripts; it uses the scratch folder.
- Open
.agents/scratch/<session-id>in your project to read or reuse the files.
Settings you might change
None needed; defaults work.
Works with
dsh-session-handoffreuses the scratch folder path in its handoff flow; mountingdsh-scratch-diris not required for that.- Needs the host's working directory and system prompt services (included in DSH).
Good to know
- Folders are never cleaned up; delete old ones yourself.
- The hint is advisory. Nothing stops the agent from writing elsewhere.
- The
.gitignoreis created once; an existing one is left alone. - Model Experience: adds one system prompt sentence with the folder path, about 20 tokens. It contains the session id, so that part of the prompt differs per session.
Install
sh
dsh plugin --profile <web|desktop> add @lukstei/dsh-scratch-dir