← All implementations

PostHog · Background agent

StampHog

A GitHub-label-triggered PR approval agent that applies fail-closed deterministic safety gates, asks an LLM to check for showstoppers, autonomously approves eligible changes, and refuses or escalates the rest.

1 Supports3 Supports

Approach type
Background agent
Work
Code review
Human involvement
Autonomous
Invocation
Background, Event driven
Interfaces
Github, Ci
Deployment stage
Scaled
Evidence strength
Detailed primary
Entry reviewed

How it works

The workflow the sources report for this implementation.

Draft state, conflicts, requested changes, sensitive paths, size ceilings, and risk tiers can block AI approval; the LLM may tighten but never loosen a gate

3

Eligible changes can be approved while risky, ambiguous, or insufficiently assured changes are refused or escalated to a suitable human reviewer

1 Supports3 Supports

Each run records PR metadata, classification, gate results, reviewer output, and the final verdict

3

Where people stay involved

  • eligible pull request → approval decisionException only · Level 5

Level 5 for eligible pull request → approval decision; human attention boundary: exception-only.

1

Observation date
2026-07-09

Implementation details

Harness

A GitHub Action invokes a Python pipeline that fetches and classifies a PR, applies hard gates, waits for in-flight reviewer bots, runs an LLM review, and posts a verdict

3

Model

Claude through the Claude Agent SDK, with Read, Grep, and Glob tools

3

Interfaces

github, ci

3

Tool access

Reads the diff and repository files plus trusted review-state, discussion, ownership, and reviewer signals

3

Knowledge

Repository-specific deny categories, size and risk tiers calibrated from prior human approvals, review guidance, and ownership data

3

Credentials

A dedicated Anthropic organization secret and a StampHog GitHub App token whose approvals satisfy branch protection

3

Context management

Each run emits a versioned JSON evidence bundle retained as a CI artifact for 30 days; a sticky GitHub comment carries non-approval verdict history and labels preserve retry state

3

Reported results and limitations

The catalog records what the sources report, with the scope and the denominator of every figure. A qualification below limits the figure it sits under.

Reported metrics

Headline claim

Handled 1,600 PRs in the previous month, as reported on July 9, 2026; roughly one in three merged main-repository PRs received its final approval during the reported quarter

1

Reported by
PostHog
Scope
Monthly PRs handled autonomously and quarterly final approvals in the main repository
Denominator
Merged main-repository PRs for the quarterly share; absolute handled PRs for the monthly count
Method
Company-reported production usage
Observation date
2026-07
Key observation

1,600 PRs handled autonomously in the previous month, as reported on July 9, 2026

1

The source does not report the denominator of this figure.

Reported by
PostHog
Scope
PRs handled autonomously in the previous month, as reported on July 9, 2026; exact boundaries unspecified
Method
Company-reported production usage
Observation date
2026-07-09
Key observation

Roughly one in three PRs merged into PostHog's main repository received StampHog's final approval during the reported quarter

1

Reported by
PostHog
Scope
Main-repository merged PRs receiving StampHog final approval during the reported quarter
Denominator
Merged PRs in the main repository
Method
Company-reported production usage
Observation date
2026-07
Key observation

20% of PRs approved by StampHog in the July 28, 2026 report, at approximately $300 per month in tokens

2

Reported by
PostHog
Scope
PostHog PRs approved by StampHog and monthly token cost in the July 28, 2026 report
Denominator
PostHog PRs in the report's scope
Method
Company-reported production usage and token spend
Observation date
2026-07

Lessons and interpretation

Use deterministic controls for known risks and allow the LLM to make approval stricter, never more permissive

3

Calibrate thresholds and deny categories from repository history rather than treating small diffs as inherently safe

3

Fail closed and preserve retry state when dependencies, credentials, or concurrent reviewer bots are unavailable

3

Sources and research details

Citations link to the original publisher. Each source also keeps a preserved copy in the repository, so a changed or removed page stays checkable.

  1. Stop being the code review bottleneckhttps://posthog.com/newsletter/code-review-tipsCorporate article · First party · Last source verification: 2026-08-31
  2. 10,000 PRs a month is easy: How devex is evolving at PostHoghttps://posthog.com/blog/10k-prs-a-monthEngineering blog · First party · Last source verification: 2026-08-31
  3. StampHog PR approval agent source code and documentationhttps://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agentSource code · First party · Last source verification: 2026-08-31
Research details for every claim on this page
  1. Summary
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    High
    Confidence reason
    A linked first-party source states the claim.
  2. Headline claim
    Statement type
    Metric
    Provenance
    Reported
    Confidence
    Medium
    Confidence reason
    PostHog reports two different windows in its July 9, 2026 article; exact monthly and quarterly boundaries are not supplied.
    Reported by
    PostHog
    Scope
    Monthly PRs handled autonomously and quarterly final approvals in the main repository
    Denominator
    Merged main-repository PRs for the quarterly share; absolute handled PRs for the monthly count
    Method
    Company-reported production usage
    Observation date
    2026-07
  3. Harness
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    High
    Confidence reason
    A linked first-party source states the claim.
  4. Model
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    High
    Confidence reason
    A linked first-party source states the claim.
  5. Interfaces
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    High
    Confidence reason
    A linked first-party source states the claim.
  6. Tool access
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    High
    Confidence reason
    A linked first-party source states the claim.
  7. Knowledge
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    High
    Confidence reason
    A linked first-party source states the claim.
  8. Credentials
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    High
    Confidence reason
    A linked first-party source states the claim.
  9. Context management
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    High
    Confidence reason
    A linked first-party source states the claim.
  10. Supporting component
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    High
    Confidence reason
    A linked first-party source states the claim.
  11. Supporting component
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    High
    Confidence reason
    A linked first-party source states the claim.
  12. Supporting component
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    High
    Confidence reason
    A linked first-party source states the claim.
  13. Key observation
    Statement type
    Metric
    Provenance
    Reported
    Confidence
    Medium
    Confidence reason
    July 9 is the report date; the source says last month without exact measurement boundaries.
    Reported by
    PostHog
    Scope
    PRs handled autonomously in the previous month, as reported on July 9, 2026; exact boundaries unspecified
    Denominator
    Not reported
    Method
    Company-reported production usage
    Observation date
    2026-07-09
  14. Key observation
    Statement type
    Metric
    Provenance
    Reported
    Confidence
    Medium
    Confidence reason
    A linked first-party source states the claim.
    Reported by
    PostHog
    Scope
    Main-repository merged PRs receiving StampHog final approval during the reported quarter
    Denominator
    Merged PRs in the main repository
    Method
    Company-reported production usage
    Observation date
    2026-07
  15. Key observation
    Statement type
    Metric
    Provenance
    Reported
    Confidence
    Medium
    Confidence reason
    A linked first-party source states the claim.
    Reported by
    PostHog
    Scope
    PostHog PRs approved by StampHog and monthly token cost in the July 28, 2026 report
    Denominator
    PostHog PRs in the report's scope
    Method
    Company-reported production usage and token spend
    Observation date
    2026-07
  16. Lesson
    Statement type
    Inference
    Provenance
    Catalog judgment
    Confidence
    High
    Confidence reason
    The source code explicitly implements and documents this safety invariant.
  17. Lesson
    Statement type
    Inference
    Provenance
    Catalog judgment
    Confidence
    High
    Confidence reason
    The source code documents calibration against historical approval outcomes.
  18. Lesson
    Statement type
    Inference
    Provenance
    Catalog judgment
    Confidence
    High
    Confidence reason
    The source code explicitly documents fail-closed and retry behavior.
  19. Operating model assessment
    Statement type
    Inference
    Provenance
    Catalog judgment
    Confidence
    High
    Confidence reason
    Eligible pull requests are approved automatically; risky or ambiguous cases are refused or routed to a human.
    Observation date
    2026-07-09