From 876e9b1ae827c720aac47e8a5192a21f237372fb Mon Sep 17 00:00:00 2001 From: Sam Crauwels Date: Sat, 11 Apr 2026 10:46:00 +0200 Subject: [PATCH 1/4] ci(agentry): prime claude-code onboarding on headless runners Setting CLAUDE_CODE_OAUTH_TOKEN is not enough on a fresh runner: claude also checks ~/.claude.json for hasCompletedOnboarding and, when it's missing, tries to render the theme picker TUI. That aborts immediately with "Raw mode is not supported on the current process.stdin", which agentry surfaces as "agent execution failed: Exit code 1". See anthropics/claude-code#8938. Writing the flag before agentry runs lets -p mode skip onboarding entirely. --- .github/workflows/agentry-bug-fix.yaml | 6 ++++++ .github/workflows/agentry-code-review.yaml | 6 ++++++ .github/workflows/agentry-feature-implement.yaml | 6 ++++++ .github/workflows/agentry-triage.yaml | 6 ++++++ 4 files changed, 24 insertions(+) diff --git a/.github/workflows/agentry-bug-fix.yaml b/.github/workflows/agentry-bug-fix.yaml index 78580f3..b163ef0 100644 --- a/.github/workflows/agentry-bug-fix.yaml +++ b/.github/workflows/agentry-bug-fix.yaml @@ -24,6 +24,12 @@ jobs: python-version: '3.12' - name: Install Claude Code run: npm install -g @anthropic-ai/claude-code + - name: Prime Claude Code onboarding + # Without this, claude -p tries to render the theme picker TUI and + # aborts with "Raw mode is not supported" — see anthropics/claude-code#8938. + run: | + mkdir -p ~/.claude + echo '{"hasCompletedOnboarding": true}' > ~/.claude.json - name: Install agentry run: pip install "agentry @ git+https://github.com/norrietaylor/agentry.git" - name: Diagnose and fix bug diff --git a/.github/workflows/agentry-code-review.yaml b/.github/workflows/agentry-code-review.yaml index 8dcadf8..18f275a 100644 --- a/.github/workflows/agentry-code-review.yaml +++ b/.github/workflows/agentry-code-review.yaml @@ -23,6 +23,12 @@ jobs: python-version: '3.12' - name: Install Claude Code run: npm install -g @anthropic-ai/claude-code + - name: Prime Claude Code onboarding + # Without this, claude -p tries to render the theme picker TUI and + # aborts with "Raw mode is not supported" — see anthropics/claude-code#8938. + run: | + mkdir -p ~/.claude + echo '{"hasCompletedOnboarding": true}' > ~/.claude.json - name: Install agentry run: pip install "agentry @ git+https://github.com/norrietaylor/agentry.git" - name: Run code review diff --git a/.github/workflows/agentry-feature-implement.yaml b/.github/workflows/agentry-feature-implement.yaml index 179418a..fa1bc86 100644 --- a/.github/workflows/agentry-feature-implement.yaml +++ b/.github/workflows/agentry-feature-implement.yaml @@ -24,6 +24,12 @@ jobs: python-version: '3.12' - name: Install Claude Code run: npm install -g @anthropic-ai/claude-code + - name: Prime Claude Code onboarding + # Without this, claude -p tries to render the theme picker TUI and + # aborts with "Raw mode is not supported" — see anthropics/claude-code#8938. + run: | + mkdir -p ~/.claude + echo '{"hasCompletedOnboarding": true}' > ~/.claude.json - name: Install agentry run: pip install "agentry @ git+https://github.com/norrietaylor/agentry.git" - name: Implement feature diff --git a/.github/workflows/agentry-triage.yaml b/.github/workflows/agentry-triage.yaml index 9a634ec..99a386e 100644 --- a/.github/workflows/agentry-triage.yaml +++ b/.github/workflows/agentry-triage.yaml @@ -20,6 +20,12 @@ jobs: python-version: '3.12' - name: Install Claude Code run: npm install -g @anthropic-ai/claude-code + - name: Prime Claude Code onboarding + # Without this, claude -p tries to render the theme picker TUI and + # aborts with "Raw mode is not supported" — see anthropics/claude-code#8938. + run: | + mkdir -p ~/.claude + echo '{"hasCompletedOnboarding": true}' > ~/.claude.json - name: Install agentry run: pip install "agentry @ git+https://github.com/norrietaylor/agentry.git" - name: Run planning pipeline From 26de0ea8cdfee02f7cd79814677a790e8cabeb46 Mon Sep 17 00:00:00 2001 From: Sam Crauwels Date: Sat, 11 Apr 2026 10:49:01 +0200 Subject: [PATCH 2/4] ci(agentry): add claude auth diagnostic step (debug) --- .github/workflows/agentry-code-review.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/agentry-code-review.yaml b/.github/workflows/agentry-code-review.yaml index 18f275a..901ab97 100644 --- a/.github/workflows/agentry-code-review.yaml +++ b/.github/workflows/agentry-code-review.yaml @@ -29,6 +29,15 @@ jobs: run: | mkdir -p ~/.claude echo '{"hasCompletedOnboarding": true}' > ~/.claude.json + - name: Diagnose claude auth + env: + CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + run: | + set -x + claude --version + ls -la ~/.claude ~/.claude.json 2>&1 || true + echo 'say ok in one word' | claude -p --model claude-sonnet-4-20250514 --output-format json 2>&1 || rc=$? + echo "claude exit: ${rc:-0}" - name: Install agentry run: pip install "agentry @ git+https://github.com/norrietaylor/agentry.git" - name: Run code review From 4d46116a2ddef9bcc90f5f951df45fe22074bbd5 Mon Sep 17 00:00:00 2001 From: Sam Crauwels Date: Sat, 11 Apr 2026 10:51:51 +0200 Subject: [PATCH 3/4] ci(agentry): drop claude auth diagnostic --- .github/workflows/agentry-code-review.yaml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/agentry-code-review.yaml b/.github/workflows/agentry-code-review.yaml index 901ab97..18f275a 100644 --- a/.github/workflows/agentry-code-review.yaml +++ b/.github/workflows/agentry-code-review.yaml @@ -29,15 +29,6 @@ jobs: run: | mkdir -p ~/.claude echo '{"hasCompletedOnboarding": true}' > ~/.claude.json - - name: Diagnose claude auth - env: - CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} - run: | - set -x - claude --version - ls -la ~/.claude ~/.claude.json 2>&1 || true - echo 'say ok in one word' | claude -p --model claude-sonnet-4-20250514 --output-format json 2>&1 || rc=$? - echo "claude exit: ${rc:-0}" - name: Install agentry run: pip install "agentry @ git+https://github.com/norrietaylor/agentry.git" - name: Run code review From 90620038c056291dc4a349eceed74ea4f8c923ca Mon Sep 17 00:00:00 2001 From: Sam Crauwels Date: Sat, 11 Apr 2026 10:55:15 +0200 Subject: [PATCH 4/4] ci: retrigger agentry code-review with fresh oauth token