Skip to content

Commit 275bc74

Browse files
mrjfclaude
andcommitted
Pre-create agentic-wiki directory outside sandbox
mkdir inside the sandbox bash allowlist doesn't work reliably. Move directory creation to a pre-step that runs before the agent. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 04196dc commit 275bc74

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

workflows/agentic-wiki-writer.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ steps:
2121
cp "$GITHUB_EVENT_PATH" /tmp/gh-aw/event.json
2222
echo "Event payload staged to /tmp/gh-aw/event.json"
2323
cat /tmp/gh-aw/event.json
24+
- name: Create agentic-wiki directory
25+
run: mkdir -p .github/agentic-wiki
2426
tools:
2527
bash:
2628
- "find * -type f -not -path '*/node_modules/*' -not -path '*/.git/*'"
2729
- "tree *"
2830
- "wc *"
29-
- "mkdir -p .github/agentic-wiki"
3031
repo-memory:
3132
branch-name: memory/agentic-wiki
3233
description: "Source file mappings, content hashes, and file summaries for incremental wiki regeneration"
@@ -84,8 +85,8 @@ You are a wiki generator for this repository. Your job is to produce high-qualit
8485

8586
**CRITICAL: Sandbox constraints.** Read this carefully — violating these will cause permission errors.
8687

87-
- **Allowed bash commands:** Only `find`, `tree`, `wc`, `mkdir -p .github/agentic-wiki`, and read-only commands (`cat`, `ls`, `head`) work. All other bash commands (`git`, `echo >`, `touch`, `cp`, `tee`, `node`, `python`, `install`) will be denied.
88-
- **Creating files:** Use the `write` tool. The only `mkdir` allowed is `mkdir -p .github/agentic-wiki`. Do NOT try to mkdir any other path.
88+
- **Allowed bash commands:** Only `find`, `tree`, `wc`, and read-only commands (`cat`, `ls`, `head`) work. All other bash commands (`git`, `echo >`, `touch`, `cp`, `tee`, `node`, `python`, `install`, `mkdir`) will be denied.
89+
- **Creating files:** Use the `write` tool. The `.github/agentic-wiki/` directory is pre-created before your session starts. Do NOT try to mkdir any path.
8990
- **Wiki page output:** Do NOT write wiki pages to disk. Do NOT create output directories. Construct all page content as strings and pass them to the `push-wiki` safe-output as JSON. See Step 3f.
9091
- **Repo info for source links:** Do NOT use `git` commands. Read `.git/config` with `cat` to find the remote URL. The default branch is `main`.
9192
- **Repo memory path:** Do NOT hardcode the repo-memory path. Discover it by running `ls /tmp/gh-aw/repo-memory/` to find the directory name, then use that path. It is typically `/tmp/gh-aw/repo-memory/default/`. All memory files must be flat (no subdirectories) — you cannot mkdir inside repo-memory.

0 commit comments

Comments
 (0)