Internal Agents Map

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.

Company
PostHog
Approach type
Agent
Human involvement
Autonomous
Interfaces
Github, Ci
Deployment stage
Scaled
Evidence strength
Detailed primary
Entry reviewed
Copy as MDAsk ChatGPT

How it works

stamphog-labeled pull request through gates, bot wait, LLM review, and verdict.

Label-triggered run start

An engineer adds the stamphog label to a non-draft pull request and the GitHub Action runs the review pipeline[Source 1, Source 3]

Wait out in-flight bot reviews

The run waits up to five minutes for allowlisted reviewer-bot reviews to finish and returns WAIT with the label kept when one is still in flight[Source 3]

LLM showstopper review

Claude reads the diff, repository files, discussion timeline, and reviewer signals to look for production breakage, security issues, and missed dependencies[Source 2, Source 3]

Risk-aware routing

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

Post the verdict

An approval is posted once as the StampHog app and counts toward branch protection; every other verdict updates one sticky comment with its reason and next steps[Source 1, Source 3]

Where people stay involved

People review, approve, or guide the agent’s work here.

  • Supervision level

    Exception-only

    A person returns when the system raises an exception.

    Level 5 of 5

    • eligible pull request → approval decision[Source 1]

How supervision levels work

Implementation details

Model
Claude through the Claude Agent SDK, with Read, Grep, and Glob tools[Source 3]
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[Source 3]
Sandbox
Not reportedThe pinned README documents the GitHub Action host and the reviewer's Read, Grep, and Glob tools but no isolation boundary for a run.
Tool access
Reads the diff and repository files plus trusted review-state, discussion, ownership, and reviewer signals[Source 3]
Knowledge
Repository-specific deny categories, size and risk tiers calibrated from prior human approvals, review guidance, and ownership data[Source 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[Source 3]
Credentials
A dedicated Anthropic organization secret and a StampHog GitHub App token whose approvals satisfy branch protection[Source 3]
Interfaces
  • github
  • ci
[Source 3]

Mechanisms

Auditable verdict bundle

Each run records PR metadata, classification, gate results, reviewer output, and the final verdict[Source 3]

Validation and failure handling

Authoritative safety gates

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[Source 3]

Reported observations

These results come from the sources. Notes below each result explain what it covers and any reported limits.

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[Source 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

Observed in July 2026

About this result
Category
Adoption output
Evidence type
Reported measurement
What it covers
StampHog-handled PRs per month and main-repository merged-PR approval share per quarter
Key observation

20% of PRs approved by StampHog in the July 28, 2026 report, at approximately $300 per month in tokens[Source 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

Observed in July 2026

About this result
Category
Adoption output
Evidence type
Reported measurement
What it covers
PostHog PRs approved by StampHog and its monthly token cost

Lessons

StampHog's deterministic eligibility gates remain authoritative; its model reviewer can impose stricter conditions but cannot relax those gates.[Source 3]

PostHog calibrated StampHog's thresholds and deny categories against repository history, including small changes with sensitive effects.[Source 3]

StampHog withholds approval on backend errors or pending reviewer-bot work and retains its label so a later push can retry.[Source 3]

Back to agents
Improve this record

Give your coding agent the context and instructions to prepare a source-backed update.

Paste the prompt into your coding agent, then describe the correction or add a public source.

Preview prompt

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
Question coverage and scope
purpose
Reported
workflow
Reported
human involvement
Reported
implementation
Reported
validation
Reported
observations
Reported
lessons
Reported
Research details for every claim on this page
  1. Summary
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this 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
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  4. Model
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  5. Interfaces
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  6. Tool access
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  7. Knowledge
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  8. Credentials
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  9. Context management
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  10. Authoritative safety gates
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  11. Risk-aware routing
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  12. Auditable verdict bundle
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  13. Label-triggered run start
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  14. Wait out in-flight bot reviews
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  15. LLM showstopper review
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  16. Post the verdict
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  17. Key observation

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

    Duplicate representation of Headline claim. Restates the monthly handled-PR count of the headline metric with the same period, scope, and qualifications.

    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
  18. Key observation

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

    Duplicate representation of Headline claim. Restates the quarterly main-repository approval share of the headline metric with the same period, denominator, and qualifications.

    Statement type
    Metric
    Provenance
    Reported
    Confidence
    Medium
    Confidence reason
    The source says roughly one in three merged PRs in the main repository during one quarter, without dating the quarter or giving the underlying counts.
    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
  19. Key observation
    Statement type
    Metric
    Provenance
    Reported
    Confidence
    Medium
    Confidence reason
    The July 28 report gives a 20% approval share and about $300 in monthly token cost, without defining the approval measurement period or repository coverage.
    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
  20. Lesson
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    High
    Confidence reason
    The pinned implementation documents that direction of authority explicitly. Passing a gate alone is not a model approval.
  21. Lesson
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    High
    Confidence reason
    The empirical-basis section names the historical PR sample and explains why size alone cannot determine eligibility.
  22. Lesson
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    High
    Confidence reason
    The usage section distinguishes ERROR and WAIT from substantive refusals, retaining the trigger label without granting approval.
  23. 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