Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 23:30 UTC
Surface Claude CLI stderr in issue triage
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rahul Tarak committed
Apr 13, 2026 at 17:41 UTC
35228fb7b857224e157b58554d620e0c53625cbd
1 file changed
+20
-4
.github/workflows/issue-triage.yml
+20
-4
@@ -91,7 +91,10 @@ jobs:
91
ISSUE_TITLE: ${{ github.event_name == 'workflow_dispatch' && steps.issue-context.outputs.issue_title || github.event.issue.title }}
92
ISSUE_BODY: ${{ github.event_name == 'workflow_dispatch' && steps.issue-context.outputs.issue_body || github.event.issue.body }}
93
run: |
94
- set -euo pipefail
94
+ set -uo pipefail
95
+
96
+ which claude
97
+ claude --version || true
98
99
PROMPT=$(cat <<'EOF'
100
Read the issue title and body from the ISSUE_TITLE and ISSUE_BODY environment variables.
@@ -130,18 +133,31 @@ jobs:
133
EOF
134
)
135
136
+ set +e
137
claude -p "$PROMPT" \
138
--model claude-sonnet-4-6 \
139
--max-turns 10 \
140
--output-format json \
141
+ --dangerously-skip-permissions \
142
--append-system-prompt "Respond with ONLY a raw JSON object (no markdown fences, no prose) that matches the schema in /tmp/issue-triage-schema.json." \
138
- > /tmp/claude-response.json
139
-
143
+ > /tmp/claude-response.json 2> /tmp/claude-stderr.log
144
+ CLAUDE_EXIT=$?
145
+ set -e
146
+
147
+ echo "--- claude exit code: $CLAUDE_EXIT ---"
148
+ echo "--- claude stderr ---"
149
+ cat /tmp/claude-stderr.log || true
150
+ echo "--- end stderr ---"
151
echo "--- raw claude response ---"
141
- cat /tmp/claude-response.json
152
+ cat /tmp/claude-response.json || true
153
echo
154
echo "--- end raw ---"
155
156
+ if [ "$CLAUDE_EXIT" -ne 0 ]; then
157
+ echo "Claude CLI failed with exit code $CLAUDE_EXIT"
158
+ exit 1
159
+ fi
160
+
161
STRUCTURED=$(jq -r '.result' /tmp/claude-response.json)
162
163
# Strip optional ```json fences just in case