From 92495d0fc30f2bbb24adf69b016a220645868dc8 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Wed, 15 Apr 2026 17:15:32 +0000 Subject: [PATCH] fix: start Claude from ~/code to load root CLAUDE.md correctly Both issue-automation and postmortem pipelines were cd'ing into ~/code/infra before running Claude, missing the root CLAUDE.md with beads config and project-wide instructions. Now cd to ~/code and use relative agent paths from there. [ci skip] Co-Authored-By: Claude Opus 4.6 (1M context) --- .woodpecker/issue-automation.yml | 4 ++-- scripts/postmortem-pipeline.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.woodpecker/issue-automation.yml b/.woodpecker/issue-automation.yml index a4786a56..15ed2774 100644 --- a/.woodpecker/issue-automation.yml +++ b/.woodpecker/issue-automation.yml @@ -50,9 +50,9 @@ steps: echo "Labels: $ISSUE_LABELS" ssh -i /tmp/devvm-key -o StrictHostKeyChecking=no wizard@10.0.10.10 \ - "cd ~/code/infra && git pull --rebase && \ + "cd ~/code && git -C infra pull --rebase && \ ~/.local/bin/claude -p \ - --agent .claude/agents/issue-responder \ + --agent infra/.claude/agents/issue-responder \ --dangerously-skip-permissions \ --max-budget-usd 10 \ 'Process GitHub Issue #${ISSUE_NUM}: ${ISSUE_TITLE}. Labels: ${ISSUE_LABELS}. URL: ${ISSUE_URL}. Read the issue body via GitHub API, investigate, and take appropriate action.'" diff --git a/scripts/postmortem-pipeline.sh b/scripts/postmortem-pipeline.sh index 86cfd925..959e9fd2 100755 --- a/scripts/postmortem-pipeline.sh +++ b/scripts/postmortem-pipeline.sh @@ -53,8 +53,8 @@ echo "SSH key fetched" # 6. SSH to DevVM and run Claude Code headless TODOS=$(cat /tmp/todos.json) ssh -i /tmp/devvm-key -o StrictHostKeyChecking=no wizard@10.0.10.10 \ - "cd ~/code/infra && git pull && ~/.local/bin/claude -p \ - --agent postmortem-todo-resolver \ + "cd ~/code && git -C infra pull && ~/.local/bin/claude -p \ + --agent infra/.claude/agents/postmortem-todo-resolver \ --dangerously-skip-permissions \ --max-budget-usd 5 \ 'Implement the auto-implementable TODOs from $PM_FILE. Parsed TODO list: $TODOS'"