# 15 Cowork File Io

> §2.7. In Cowork, hook side effects (file writes) don't reach the shell sandbox. Only stdout/additionalContext flows through. This probe writes a canary file from a hook (via the inline command below) then tries to read it from Bash tool.

- Skill: `kazukinagata/15-cowork-file-io` (Agent Skill)
- Install (CLI): `npx skillmds@latest add kazukinagata/15-cowork-file-io`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kazukinagata/15-cowork-file-io/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: kazukinagata (https://skillmd.com/u/kazukinagata)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/kazukinagata/15-cowork-file-io

---


# 15-cowork-file-io

§2.7 — Cowork で hook 内 file write が届かない。

## step 1: alive-check と canary 確認

```bash
proj="${CLAUDE_PROJECT_DIR:-$PWD}"
ver="${VERIFIER_VERSION_DIR:-v-unknown}"
sid="${CLAUDE_SESSION_ID:-no-sid}"
out_dir="$proj/findings/$ver/$sid"
mkdir -p "$out_dir"
{
  printf '[15-BODY %s] tag=alive-check\n' "$(date -Iseconds)"
  printf '[15-BODY] file-io-canary files in /tmp:\n'
  ls -la /tmp/file-io-canary-*.txt 2>&1
} | tee -a "$out_dir/probe.log"
echo
echo "=== probe.log: 15-FM-hook lines (proves hook was called) ==="
grep "15-FM-hook" "$out_dir/probe.log" 2>&1
```

完了して exit、`./scripts/assert.sh 15`。

