Skip to content

Scratch folders ​

Give each session a git-ignored folder for notes and scripts.

@lukstei/dsh-scratch-dir

What it does ​

  • Creates .agents/scratch/<session-id> in the session's working directory when an agent starts.
  • Adds a .gitignore containing * 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 ​

  1. Install the plugin and start a session.
  2. Ask the agent to write plans, notes or helper scripts; it uses the scratch folder.
  3. 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-handoff reuses the scratch folder path in its handoff flow; mounting dsh-scratch-dir is 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 .gitignore is 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

Released under the MIT License.