[BUG] pull_request.count ignores successful Gitea PR creation via tea CLI

Status Open
Reported on v2.1.289
Maintainer reply None cached
Activity 0 comments · opened Oct 5, 2026

Preflight Checklist

  • [x] I searched existing issues and open PRs for tea, Gitea, pull_request.count, and PR telemetry; no matching report was found.
  • [x] This is a single bug report: Gitea PR creation through the tea CLI is not recognized by the native PR counter.
  • [x] I checked the latest official Claude Code distribution, 2.1.289.

What's Wrong?

Successful Bash tool invocations of the Gitea CLI's PR-creation commands are not recognized by the claude_code.pull_request.count instrumentation:

  • tea pr create
  • tea pull create
  • tea pulls create

The tool activity can be present while the PR counter has no corresponding series. This makes native PR telemetry incomplete for teams using Gitea, even when Claude executes their PR-creation command.

This is an application-side recognition gap: if Claude never calls the counter increment for the command, changing the OpenTelemetry Collector or the dashboard cannot recover the missing event.

What Should Happen?

A successful PR creation performed by Claude through the tea CLI should increment the native PR counter, consistently with recognized gh pr create and glab mr create commands. Please support tea's command aliases, or document this coverage limitation explicitly if the exclusion is intentional.

The current monitoring documentation describes the counter as covering PR/MR creation through shell commands or MCP tools:
https://code.claude.com/docs/en/monitoring-usage#pull-request-counter

Steps to Reproduce

  1. Use Claude Code 2.1.289 in a disposable Gitea repository with a configured tea login and an existing pushed branch that can be opened as a PR.
  2. Enable a working OpenTelemetry metrics export and verify that other Claude metrics arrive at the collector. For example, with an OTLP/HTTP receiver:

``bash
export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_METRICS_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4318
``

Use the protocol, endpoint, and authentication appropriate to your own collector.

  1. Ask Claude to execute this command through its Bash tool, substituting the disposable repository and branch:

``bash
tea pr create --repo <owner>/<repo> --head <pushed-branch> --base main --title "Telemetry reproduction"
``

  1. Verify that the command succeeded and the PR exists in Gitea. Allow the configured metrics export interval to elapse, and inspect raw claude_code.pull_request.count for the same Claude session rather than relying on a dashboard aggregate.
  2. Repeat in separate disposable branches/sessions with tea pull create and tea pulls create.
  3. Compare with a successful gh pr create or glab mr create operation on a corresponding disposable GitHub/GitLab repository. The recognized commands increment the PR counter; the tea commands are missing from recognition.

Error Messages / Evidence

The additional deterministic evidence is an isolated replay of the actual PR-recognition function extracted from the official installed 2.1.289 distribution. Only external telemetry/PR-linking effects were stubbed; this was not a patched client, and no model request, real PR creation, or network call was performed by the replay. Consequently this table demonstrates the recognizer's behavior, not a new end-to-end live-session run:

| Synthetic Bash command | Exit code supplied | PR counter increments |
| --- | ---: | ---: |
| gh pr create --title sample | 0 | 1 |
| glab mr create --title sample | 0 | 1 |
| tea pr create --title sample | 0 | 0 |
| tea pull create --title sample | 0 | 0 |
| tea pulls create --title sample | 0 | 0 |

Each case supplied the same synthetic Gitea PR URL as stdout. The detector gates on successful exit, recognizes the gh/glab command forms plus certain REST-command forms, and has no tea-specific branch. Independent inspection of the official 2.1.283 distribution showed the same missing tea command coverage.

Actual Bash tool observations motivated the investigation; private repository names, user identities, session IDs, prompts, credentials, and production logs are intentionally omitted from this public report.

Claude Model

Not model-dependent in the isolated instrumentation replay; no model call was made.

Is this a regression?

I don't know. I have not established a previous version in which tea PR creation was recognized.

Last Working Version

Unknown.

Claude Code Version

2.1.289 (latest official distribution at the time of reporting); also inspected 2.1.283.

Platform

Other: isolated bundled-instrumentation replay, independent of model/API provider. The end-to-end procedure above requires a normally configured Claude session and collector.

Operating System

macOS, arm64.

Terminal/Shell

Non-interactive Node.js VM for the isolated replay; the affected command path is Claude's Bash tool.

Additional Information

Related historical coverage report: https://github.com/anthropics/claude-code/issues/45776 concerned MCP-created PRs/MRs; the changelog later added that coverage in 2.1.129. This report concerns the distinct tea CLI path.

Suggested acceptance cases: successful tea pr create, tea pull create, and tea pulls create each record one creation; failed invocations record none; quoted command mentions and retries must not become duplicate PR creations. No modification to user workflows or the installed client binary should be required.

View original on GitHub ↗