Source: https://internal-agents.com/agents/posthog-stamphog

# PostHog — 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.

- Approach type: Background agent
- Deployment stage: Scaled
- Autonomy: Autonomous
- Evidence strength: Detailed primary
- Status: Open sourced
- First reported year: 2026
- Work: Code review
- Interfaces: Github, Ci
- Invocation: Background, Event driven
- Entry reviewed: 2026-09-09

## Where people stay involved

- **eligible pull request → approval decision** — Exception only · Level 5

## Overview

### Summary

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.

Fact · Reported · High confidence · `posthog-stamphog--summary`

Confidence reason: A linked first-party source states the claim.

Evidence:

- Supports · [1] [Stop being the code review bottleneck](https://posthog.com/newsletter/code-review-tips) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-1/content.md) · Add a PR auto-stamper
- Supports · [3] [StampHog PR approval agent source code and documentation](https://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agent) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-3/content.md) · commit 988c9031bb93c74bafcdfb670c01497c79a4f644, tools/pr-approval-agent/README.md, How it works

## How it works

### Supporting component

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

Fact · Reported · High confidence · `posthog-stamphog--primitives-0`

Confidence reason: A linked first-party source states the claim.

Evidence:

- Supports · [3] [StampHog PR approval agent source code and documentation](https://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agent) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-3/content.md) · commit 988c9031bb93c74bafcdfb670c01497c79a4f644, tools/pr-approval-agent/README.md, How it works

### Supporting component

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

Fact · Reported · High confidence · `posthog-stamphog--primitives-1`

Confidence reason: A linked first-party source states the claim.

Evidence:

- Supports · [1] [Stop being the code review bottleneck](https://posthog.com/newsletter/code-review-tips) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-1/content.md) · Add a PR auto-stamper
- Supports · [3] [StampHog PR approval agent source code and documentation](https://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agent) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-3/content.md) · commit 988c9031bb93c74bafcdfb670c01497c79a4f644, tools/pr-approval-agent/README.md, LLM Review

### Supporting component

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

Fact · Reported · High confidence · `posthog-stamphog--primitives-2`

Confidence reason: A linked first-party source states the claim.

Evidence:

- Supports · [3] [StampHog PR approval agent source code and documentation](https://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agent) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-3/content.md) · commit 988c9031bb93c74bafcdfb670c01497c79a4f644, tools/pr-approval-agent/README.md, Evidence bundle

## Supervision evidence

### Operating model assessment

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

Inference · Catalog judgment · High confidence · `posthog-stamphog--operating-models-0`

Confidence reason: Eligible pull requests are approved automatically; risky or ambiguous cases are refused or routed to a human.

Qualifications:

- Observation date: 2026-07-09

Evidence:

- Supports · [1] [Stop being the code review bottleneck](https://posthog.com/newsletter/code-review-tips) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-1/content.md)

## 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

Fact · Reported · High confidence · `posthog-stamphog--architecture-harness`

Confidence reason: A linked first-party source states the claim.

Evidence:

- Supports · [3] [StampHog PR approval agent source code and documentation](https://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agent) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-3/content.md) · commit 988c9031bb93c74bafcdfb670c01497c79a4f644, tools/pr-approval-agent/README.md, How it works and Architecture

### Model

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

Fact · Reported · High confidence · `posthog-stamphog--architecture-model`

Confidence reason: A linked first-party source states the claim.

Evidence:

- Supports · [3] [StampHog PR approval agent source code and documentation](https://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agent) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-3/content.md) · commit 988c9031bb93c74bafcdfb670c01497c79a4f644, tools/pr-approval-agent/README.md, LLM Review

### Interfaces

github, ci

Fact · Reported · High confidence · `posthog-stamphog--architecture-interfaces`

Confidence reason: A linked first-party source states the claim.

Evidence:

- Supports · [3] [StampHog PR approval agent source code and documentation](https://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agent) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-3/content.md) · commit 988c9031bb93c74bafcdfb670c01497c79a4f644, tools/pr-approval-agent/README.md, Usage

### Tool access

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

Fact · Reported · High confidence · `posthog-stamphog--architecture-tool-access`

Confidence reason: A linked first-party source states the claim.

Evidence:

- Supports · [3] [StampHog PR approval agent source code and documentation](https://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agent) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-3/content.md) · commit 988c9031bb93c74bafcdfb670c01497c79a4f644, tools/pr-approval-agent/README.md, LLM Review

### Knowledge

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

Fact · Reported · High confidence · `posthog-stamphog--architecture-knowledge`

Confidence reason: A linked first-party source states the claim.

Evidence:

- Supports · [3] [StampHog PR approval agent source code and documentation](https://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agent) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-3/content.md) · commit 988c9031bb93c74bafcdfb670c01497c79a4f644, tools/pr-approval-agent/README.md, Tiers and Empirical basis

### Credentials

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

Fact · Reported · High confidence · `posthog-stamphog--architecture-credentials`

Confidence reason: A linked first-party source states the claim.

Evidence:

- Supports · [3] [StampHog PR approval agent source code and documentation](https://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agent) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-3/content.md) · commit 988c9031bb93c74bafcdfb670c01497c79a4f644, tools/pr-approval-agent/README.md, Usage and final verdict

### 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

Fact · Reported · High confidence · `posthog-stamphog--architecture-context-mgmt`

Confidence reason: A linked first-party source states the claim.

Evidence:

- Supports · [3] [StampHog PR approval agent source code and documentation](https://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agent) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-3/content.md) · commit 988c9031bb93c74bafcdfb670c01497c79a4f644, tools/pr-approval-agent/README.md, Usage and Evidence bundle

## 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

Metric · Reported · Medium confidence · `posthog-stamphog--headline-metric`

Confidence reason: PostHog reports two different windows in its July 9, 2026 article; exact monthly and quarterly boundaries are not supplied.

Qualifications:

- 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

Evidence:

- Supports · [1] [Stop being the code review bottleneck](https://posthog.com/newsletter/code-review-tips) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-1/content.md) · Preserved content.md, lines 105, 118

### Key observation

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

Metric · Reported · Medium confidence · `posthog-stamphog--key-metrics-0`

Confidence reason: July 9 is the report date; the source says last month without exact measurement boundaries.

Qualifications:

- 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

Evidence:

- Supports · [1] [Stop being the code review bottleneck](https://posthog.com/newsletter/code-review-tips) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-1/content.md) · Preserved content.md, lines 118

### Key observation

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

Metric · Reported · Medium confidence · `posthog-stamphog--key-metrics-1`

Confidence reason: A linked first-party source states the claim.

Qualifications:

- 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

Evidence:

- Supports · [1] [Stop being the code review bottleneck](https://posthog.com/newsletter/code-review-tips) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-1/content.md) · Preserved content.md, lines 105

### Key observation

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

Metric · Reported · Medium confidence · `posthog-stamphog--key-metrics-2`

Confidence reason: A linked first-party source states the claim.

Qualifications:

- 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

Evidence:

- Supports · [2] [10,000 PRs a month is easy: How devex is evolving at PostHog](https://posthog.com/blog/10k-prs-a-month) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-2/content.md) · Preserved content.md, lines 131

## Lessons and interpretation

### Lesson

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

Inference · Catalog judgment · High confidence · `posthog-stamphog--lessons-learned-0`

Confidence reason: The source code explicitly implements and documents this safety invariant.

Evidence:

- Supports · [3] [StampHog PR approval agent source code and documentation](https://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agent) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-3/content.md) · commit 988c9031bb93c74bafcdfb670c01497c79a4f644, tools/pr-approval-agent/README.md, How it works

### Lesson

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

Inference · Catalog judgment · High confidence · `posthog-stamphog--lessons-learned-1`

Confidence reason: The source code documents calibration against historical approval outcomes.

Evidence:

- Supports · [3] [StampHog PR approval agent source code and documentation](https://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agent) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-3/content.md) · commit 988c9031bb93c74bafcdfb670c01497c79a4f644, tools/pr-approval-agent/README.md, Tiers and Empirical basis

### Lesson

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

Inference · Catalog judgment · High confidence · `posthog-stamphog--lessons-learned-2`

Confidence reason: The source code explicitly documents fail-closed and retry behavior.

Evidence:

- Supports · [3] [StampHog PR approval agent source code and documentation](https://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agent) · [Preserved copy](https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-3/content.md) · commit 988c9031bb93c74bafcdfb670c01497c79a4f644, tools/pr-approval-agent/README.md, Usage

## Sources

1. [Stop being the code review bottleneck](https://posthog.com/newsletter/code-review-tips)
   - Corporate article · First party · Evidence
   - Original URL: <https://posthog.com/newsletter/code-review-tips>
   - Published: 2026-07-09 · Accessed: 2026-08-13 · Last verified: 2026-08-31
   - Preserved copy in the repository: <https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-1/content.md>
2. [10,000 PRs a month is easy: How devex is evolving at PostHog](https://posthog.com/blog/10k-prs-a-month)
   - Engineering blog · First party · Evidence
   - Original URL: <https://posthog.com/blog/10k-prs-a-month>
   - Published: 2026-07-28 · Accessed: 2026-08-13 · Last verified: 2026-08-31
   - Preserved copy in the repository: <https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-2/content.md>
3. [StampHog PR approval agent source code and documentation](https://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agent)
   - Source code · First party · Evidence
   - Original URL: <https://github.com/PostHog/posthog/tree/988c9031bb93c74bafcdfb670c01497c79a4f644/tools/pr-approval-agent>
   - Accessed: 2026-08-13 · Last verified: 2026-08-31
   - Preserved copy in the repository: <https://github.com/steel-experiments/internal-agents-map/blob/main/archive/sources/posthog-stamphog-source-3/content.md>
