triage-failure
Investigate a specific failed benchmark task — read logs, identify root cause, check if known pattern, suggest fix.
Skill by sourcegraph
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/sourcegraph-triage-failure
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/triage-failure
What's inside
- Skill name
triage-failure- Description
- Investigate a specific failed benchmark task — read logs, identify root cause, check if known pattern, suggest fix. Triggers on triage, investigate failure, debug task, diagnose failure.
- License
- Apache-2.0
- Instructions
- 221 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Triage Failure
Investigate a failed benchmark task and produce a diagnosis.
## Input
User provides one of:
- Task path: `runs/official/pytorch_opus_.../baseline/.../sgt-005__hash/`
- Suite/config/task: `csb_sdlc_pytorch/baseline/sgt-005`
- Just a task name: `sgt-005` (will search for it)
- Or says "triage the most recent failure"
## Steps
### 1. Locate the task directory
If user gave a full path, use it directly. Otherwise, find it:
```bash
cd ~/CodeScaleBench
# If "most recent failure" — get failures from aggregate_status.py
python3 scripts/aggregate_status.py --failures-only --format json | python3 -c "
import sys, json
data = json.load(sys.stdin)
tasks = [t for t in data['tasks'] if t['status'] in ('errored', 'completed_fail', 'timeout')]
tasks.sort(key=lambda t: t.get('dir_mtime', ''), reverse=True)
if tasks:
t = tasks[0]
print(f'Task: {t[\"task_name\"]}')
print(f'Suite: {t[\"suite\"]}')
print(f'Config: {t[\"config\"]}')
print(f'Status: {t[\"status\"]}')
print(f'Dir: {t[\"task_dir\"]}')
else:
print('No failures found')
"
```
If user gave a task name, search for it:
```bash
# Find all dirs matching the task name
find runs/official -type d -name "*TASKNAME*" | head -10
```
### 2. Read key files in order
Read the files in the task directory to understand what happened:
```bash
TASK_DIR="<resolved path>"
# 1. result.json — primary source of truth
cat "$TASK_DIR/result.json" | python3 -m json.tool
# 2. status.json if it exists (from aggregate_status --write-status)
cat "$TASK_DIR/status.json" 2>/dev/null | python3 -m json.tool
# 3. Agent transcript (last 100 lines)
tail -100 "$TASK_DIR/agent/claude-code.txt" 2>/dev/null
# 4. Verifier output
cat "$TASK_DIR/verifier/test-stdout.txt" 2>/dev/null | tail -50
cat "$TASK_DIR/verifier/reward.txt" 2>/dev/null
# 5. Task log
cat "$TASK_DIR/../$(basename $TASK_DIR | sed 's/__.*//').log" 2>/dev/null | tail -50
```
### 3. Run error fingerprinting
```bash
python3 scripts/status_fingerprints.py "$TASK_DIR/result.json"
```
### 4. Classify the failure
Categorize into one of:
- **infrastructure**: API errors, rate limits, token refresh, network, Docker issues
- **timeout**: Task exceeded time limit (check if agent was stuck or task is inherently slow)
- **verifier_bug**: Error in the verifier/scorer script (KeyError, parse error, etc.)
- **task_setup**: Missing dependencies, git clone failures, Docker compose issues
- **agent_bug**: Agent produced invalid output format or took wrong approach
- **task_difficulty**: Agent tried but task is genuinely hard (completed_fail with effort)
- **flaky**: Passed in other configs or previous runs, failed now with no clear cause
- **mcp_related**: Failure specific to MCP-enabled configs
### 5. Check for known patterns
```bash
# Check error catalog
cat ~/CodeScaleBench/docs/ERROR_CATALOG.md
```
Cross-reference the error with known patterns in the catalog.
### 6. Produce diagnosis
Present findings in this format:
```
## Diagnosis: <task_name>
**Classification**: <category from step 4>
**Status**: errored / completed_fail / timeout
**Error**: <one-line summary of what went wrong>
**Root Cause**: <explanation of why it failed>
**Known Pattern?**: Yes (see ERROR_CATALOG.md#section) / No
**Evidence**:
- result.json exception: <type + message>
- Agent transcript: <relevant excerpt>
- Verifier output: <relevant excerpt>
**Suggested Fix**:
- File: <path to file that needs changing>
- Change: <description of the fix>
**Repro Command**:From sourcegraph/CodeScaleBench, Apache-2.0.
More from sourcegraph/CodeScaleBench
- 0.499score
validate-tasks
sourcegraph
Pre-flight validation of benchmark tasks before launching runs.
SkillDFreshness: D★ 37Claude Code +9 - 0.499score
cost-report
sourcegraph
Token and cost analysis per run, suite, and config.
SkillDFreshness: D★ 37Claude Code +9 - 0.499score
run-status
sourcegraph
Quick status check on the currently active benchmark run.
SkillDFreshness: D★ 37Claude Code +9 - 0.499score
sync-metadata
sourcegraph
Reconcile task metadata between selected_benchmark_tasks.json and task.toml files.
SkillDFreshness: D★ 37Claude Code +9 - 0.499score
whats-next
sourcegraph
Analyze current benchmark state and recommend what to work on next.
SkillDFreshness: D★ 37Claude Code +9 - 0.499score
check-infra
sourcegraph
Verify infrastructure readiness before launching benchmark runs — tokens, Docker, disk, credentials.
SkillDFreshness: D★ 37Claude Code +9 - 0.499score
compare-configs
sourcegraph
Compare benchmark results across agent configurations (baseline, SG_full).
SkillDFreshness: D★ 37Claude Code +9 - 0.499score
archive-run
sourcegraph
Archive old completed benchmark runs to save disk space and speed up scans.
SkillDFreshness: D★ 37Claude Code +9 - 0.499score
quick-rerun
sourcegraph
Run a single benchmark task locally to verify a fix.
SkillDFreshness: D★ 37Claude Code +9 - 0.495score
ir-analysis
sourcegraph
Compute information retrieval quality metrics (precision, recall, MRR, nDCG, MAP) comparing file retrieval across baseline and MCP configs against ground truth.
SkillDFreshness: D★ 37Claude Code +9 - 0.495score
repo-health
sourcegraph
Run the repo health gate before commit or push to reduce doc drift and keep branches clean.
SkillDFreshness: D★ 37Claude Code +9 - 0.495score
generate-report
sourcegraph
Generate the aggregate CSB evaluation report from completed Harbor runs.
SkillDFreshness: D★ 37Claude Code +9
Signals
- Stars
- 37
- Forks
- 5
- Open issues
- 0
- Last commit (this folder)
- Mar 17, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/sourcegraph/CodeScaleBench
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from sourcegraph
- 0.499score
archive-run
sourcegraph
Archive old completed benchmark runs to save disk space and speed up scans.
SkillDFreshness: D★ 37Claude Code +9 - 0.499score
quick-rerun
sourcegraph
Run a single benchmark task locally to verify a fix.
SkillDFreshness: D★ 37Claude Code +9 - 0.499score
check-infra
sourcegraph
Verify infrastructure readiness before launching benchmark runs — tokens, Docker, disk, credentials.
SkillDFreshness: D★ 37Claude Code +9 - 0.499score
compare-configs
sourcegraph
Compare benchmark results across agent configurations (baseline, SG_full).
SkillDFreshness: D★ 37Claude Code +9 - 0.499score
cost-report
sourcegraph
Token and cost analysis per run, suite, and config.
SkillDFreshness: D★ 37Claude Code +9 - 0.499score
run-status
sourcegraph
Quick status check on the currently active benchmark run.
SkillDFreshness: D★ 37Claude Code +9
Cite this page
triage-failure skill. Agent Mart. https://agentmart.dev/skills/sourcegraph-triage-failure (last updated 2026-10-24)