Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Sandbox allowWrite includes cth-hook.cjs and session settings.json

Closed
#100 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 2 days

@agentvivekkumar is already working on this.

Since Oct 10, 2026.

Assessment

This issue has not been assessed yet.

Description

Summary

sandboxWritableDirs() returns the agent directory, the hive root, and any extra directories. hookSettings() copies that list into sandbox.filesystem.allowWrite.

<hive>/bin/cth-hook.cjs is under the hive root. <agent dir>/settings.json is under the agent directory. Both are inside the write list.

harnessGuard.ts checks Write, Edit, MultiEdit, and NotebookEdit. It does not judge a shell command. This issue does not claim that editing the hook removes an OS sandbox the process has already loaded.

Why this matters

The hook file is run from disk on the next tool call. The settings file holds the sandbox rules for the next start.

Evidence
  • sandboxWritableDirs() and hookSettings() in src/main/hive.ts
  • isPlumbing() in src/main/harnessGuard.ts
  • test/auto-mode-sandbox.test.cjs, which currently expects the hive root on allowWrite
Change

Remove bin/cth-hook.cjs and settings.json from every agent write path.

Keep write access for protocol files:

  • inbox/ and outbox/
  • memory/inbox.md
  • memory/handoff.md
  • tasks.json
  • board.md for Michael

ALLOW_TEMP_WORKERS is false, so spawn-requests/ is not required in this build.

Do not treat a move of settings.json into private/ as done until Claude can still read --settings. private/ is on the deny-read list.

Test plan
  • allowWrite includes the protocol paths above.
  • For Michael, allowWrite includes board.md.
  • allowWrite does not include bin/cth-hook.cjs.
  • allowWrite does not include settings.json.
  • An agent can still move a message to inbox/.done.

Checkout: main at 0ef922bac25d6aad226243c72a0a7f142cfacfec.

Dominant language
TypeScript
Stars
273
Forks
211
Avg merge
2d 9h
Merged PRs (30d)
359

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from agentvivekkumar/dontbemichael

All issues in agentvivekkumar/dontbemichael

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.