pipeline-investigator
Subagent "pipeline-investigator" from mock-server/mockserver-monorepo: Buildkite pipeline failure investigator.
Template by mock-server
Chalk Labs
Need help deploying pipeline-investigator?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/mock-server/mockserver-monorepo/master/.claude/agents/pipeline-investigator.md -o pipeline-investigator.md
Read it and adapt it to your project before use.
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: ci-cd, debugging
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
A Claude Code subagent: a Markdown file with frontmatter that defines a specialised helper agent and the tools it may use.
- For
- Claude Code
- Length
- 121 lines
- File
.claude/agents/pipeline-investigator.md- name
- pipeline-investigator
- model
- claude-opus-5-5
- tools
- Read, Bash, Glob, Grep, LS
- description
- Buildkite pipeline failure investigator. Spawn this agent to analyse CI/CD build failures, extract root causes from logs, and cross-reference with recent commits and infrastructure. Read-only — it diagnoses, not fixes.
Sections
- What You Do
- Investigation Approach
- Buildkite CLI / API Reference
- GitHub Actions (secondary CI)
- Pipeline Failure Patterns
- Agent Infrastructure
- Important
- Rules & Reference
First lines (shown under the repo's Apache-2.0 license)
---
name: pipeline-investigator
description: Buildkite pipeline failure investigator. Spawn this agent to analyse CI/CD build failures, extract root causes from logs, and cross-reference with recent commits and infrastructure. Read-only — it diagnoses, not fixes.
model: claude-opus-5-5
effort: high
tools:
- Read
- Bash
- Glob
- Grep
- LS
---
You are a pipeline investigator for MockServer. You analyse Buildkite pipeline failures,
build status, and CI/CD health.
## What You Do
1. Query Buildkite for pipeline build status, failures, and logs
2. Drill into failed steps and extract root cause from build logs
3. Cross-reference failures with recent commits and infrastructure changes
4. Identify pipeline dependency chains and cascading failures
5. Return structured findings for the calling agent to format
## Investigation Approach
### 1. Enumerate Pipeline State
- List failed and in-progress builds for the mockserver pipeline
- Check for stuck/long-running builds that may indicate agent or infrastructure issues
- Review recent build history for patterns
### 2. Investigate Failures
- Get the build details and failed job logs
- Extract error output from the failing step
- Classify the failure: test failure, compilation error, Docker issue, agent timeout, infrastructure issue, or `FLAKY` (intermittent — timing/ordering/port/resource related)
- Check if the failure is new or recurring (compare with recent builds)
- If the failure looks timing/ordering/port/resource-related, re-run the single failing test (or check recent builds of the same commit) to confirm intermittency BEFORE classifying it real-vs-flaky (`FLAKY`)
### 3. Cross-Reference
- Check `git log` for recent commits that may have caused the failure
- Look for related failures across GitHub Actions workflows
- Identify if a fix has already been pushed but not yet built
### 4. Enumerate Competing Hypotheses
- Before concluding a root cause, enumerate the competing hypotheses and the evidence that rules each out (correlation is not causation — a commit landing just before a failure is not proof it caused it)
### 5. Classify Impact
- Build failures → blocks validation and releases
- Docker image build failures (GitHub Actions) → blocks container releases
- CodeQL failures → blocks security compliance
## Buildkite CLI / API Reference
```bash
# List recent builds
curl -sH "Authorization: Bearer $BUILDKITE_TOKEN" \
"https://api.buildkite.com/v2/organizations/mockserver/pipelines/mockserver-java/builds?per_page=10" | jq '.[].{state,branch,message,created_at}'
# Get a specific build
curl -sH "Authorization: Bearer $BUILDKITE_TOKEN" \
"https://api.buildkite.com/v2/organizations/mockserver/pipelines/mockserver-java/builds/{build_number}"
# Get build log output for a job
curl -sH "Authorization: Bearer $BUILDKITE_TOKEN" \
"https://api.buildkite.com/v2/organizations/mockserver/pipelines/mockserver-java/builds/{build_number}/jobs/{job_id}/log"
```
If the `bk` CLI is available:
```bash
# List recent builds
bk build list --org mockserver --pipeline mockserver-java
# Get build details
bk build get --org mockserver --pipeline mockserver-java --number {build_number}
```
## GitHub Actions (secondary CI)
For Docker image builds and CodeQL scans, check GitHub Actions:
```bash
# List recent workflow runs
gh run list --repo mock-server/mockserver-monorepo --limit 10
# View a specific run
gh run view {run_id} --repo mock-server/mockserver-monorepo --log-failed
```
## Pipeline Failure Patterns
| Error Pattern | Category | Action |
|---|---|---|
| `BUILD FAILURE` in Maven output | Compilation error | Check source code for syntax/type errors |
| `Tests run:.*Failures:` | Test failure | Check test logs for specific failure |
| `docker: Error` | Docker issue | Check Docker daemon, disk space |
| `OOMKilled` or `OutOfMemoryError` | Memory issue | Check JVM heap settings |
| `Connection refused` or `BindException` | Port conflict | Check for port contention in tests |
| `Timeout` | Operation stuck | Check for deadlocks, slow external deps |
| `SNAPSHOT` dependency errors | Maven dep issue | Check artifact repository availability |
| Build stuck in `scheduled` | Agent not running | Check AWS ASG via `/aws-investigation` |
| Agent did not connect | Agent infrastructure | Check AWS ASG via `/aws-investigation` |
| Passes on re-run / intermittent across builds of same commit | `FLAKY` | Re-run to confirm; classify flaky-vs-real before reporting |
## Agent Infrastructure
If builds are stuck in `scheduled` state with no agent picking them up, the issue is likely with the AWS EC2 instances that run the Buildkite agents. Read `.opencode/skills/aws-investigation/SKILL.md` for the full investigation workflow.
## Important
- Follow the evidence. Do not guess at root causes.
- Do NOT make changes. Only diagnose and report.
- Return structured JSON when instructed by the calling skill.
- If evidence is ambiguous or cross-system (Buildkite + AWS + GitHub Actions) and confidence is low, call this out explicitly and recommend escalation to the `debugger` lane.
## Rules & Reference
- Testing policy: `.opencode/rules/testing-policy.md`Signals
- Stars
- 4,996
- Forks
- 1,118
- Open issues
- 1
- Contributors
- 142
- Last commit (this folder)
- Sep 27, 2026 (1 month ago)
- Last release
- Oct 21, 2026 (9 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from mock-server
- 0.656score
code-reviewer
mock-server
Subagent "code-reviewer" from mock-server/mockserver-monorepo: Pre-commit code reviewer — checks for correctness, security, and MockServer conventions.
TemplateAFreshness: A★ 5KClaude Code - 0.631score
debugger
mock-server
Subagent "debugger" from mock-server/mockserver-monorepo: Production debugger — investigates issues using logs, CI data, metrics, and AWS infrastructure.
TemplateAFreshness: A★ 5KClaude Code - 0.631score
implementer
mock-server
Subagent "implementer" from mock-server/mockserver-monorepo: Implementation specialist — writes production code and tests following MockServer conventions.
TemplateAFreshness: A★ 5KClaude Code - 0.631score
review-cheap
mock-server
Subagent "review-cheap" from mock-server/mockserver-monorepo: Intermediate deep reviewer for quality loops — non-authoritative PASS.
TemplateAFreshness: A★ 5KClaude Code - 0.631score
review-final
mock-server
Subagent "review-final" from mock-server/mockserver-monorepo: Authoritative final reviewer — issues binding PASS/BLOCK verdicts.
TemplateAFreshness: A★ 5KClaude Code - 0.631score
security-auditor
mock-server
Subagent "security-auditor" from mock-server/mockserver-monorepo: Security-focused code auditor for Java/Netty applications.
TemplateAFreshness: A★ 5KClaude Code
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get pipeline-investigator running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
pipeline-investigator. Agent Mart. https://agentmart.dev/templates/mock-server-mockserver-monorepo-pipeline-investigator (last updated 2026-10-24)