Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Surface Claude CLI stderr in issue triage

Rahul Tarak35228fb7b857
diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml
index b66b337fc..922570a8a 100644
--- a/.github/workflows/issue-triage.yml
+++ b/.github/workflows/issue-triage.yml
@@ -91,7 +91,10 @@ jobs:
ISSUE_TITLE: ${{ github.event_name == 'workflow_dispatch' && steps.issue-context.outputs.issue_title || github.event.issue.title }}
ISSUE_BODY: ${{ github.event_name == 'workflow_dispatch' && steps.issue-context.outputs.issue_body || github.event.issue.body }}
run: |
- set -euo pipefail
+ set -uo pipefail
+
+ which claude
+ claude --version || true
PROMPT=$(cat <<'EOF'
Read the issue title and body from the ISSUE_TITLE and ISSUE_BODY environment variables.
@@ -130,18 +133,31 @@ jobs:
EOF
)
+ set +e
claude -p "$PROMPT" \
--model claude-sonnet-4-6 \
--max-turns 10 \
--output-format json \
+ --dangerously-skip-permissions \
--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." \
- > /tmp/claude-response.json
-
+ > /tmp/claude-response.json 2> /tmp/claude-stderr.log
+ CLAUDE_EXIT=$?
+ set -e
+
+ echo "--- claude exit code: $CLAUDE_EXIT ---"
+ echo "--- claude stderr ---"
+ cat /tmp/claude-stderr.log || true
+ echo "--- end stderr ---"
echo "--- raw claude response ---"
- cat /tmp/claude-response.json
+ cat /tmp/claude-response.json || true
echo
echo "--- end raw ---"
+ if [ "$CLAUDE_EXIT" -ne 0 ]; then
+ echo "Claude CLI failed with exit code $CLAUDE_EXIT"
+ exit 1
+ fi
+
STRUCTURED=$(jq -r '.result' /tmp/claude-response.json)
# Strip optional ```json fences just in case