claude-memory/graph/fixes/fix-issue-poller-infinite-loop-prs-returned-as-issues-by-git-c1a50f.md
2026-03-03 15:25:57 -06:00

2.7 KiB

id type title tags importance confidence created updated relations
c1a50fb8-9084-439d-a156-872bedb9013b fix Fix: Issue-poller infinite loop — PRs returned as issues by gitea-mcp list_repo_issues
issue-poller
gitea
gitea-mcp
paper-dynasty-database
automation
bug
claude-scheduled
infinite-loop
0.9 0.8 2026-03-03T21:24:58.158715+00:00 2026-03-03T21:25:56.958675+00:00
target type direction strength edge_id
b27fb831-811e-4103-b5f1-3c36d5b1ad20 RELATED_TO outgoing 0.91 bbaaa41b-f240-4965-8c7a-60a52fd16ad0
target type direction strength edge_id
b27fb831 RELATED_TO outgoing 0.89 f54dc1cf-3e7f-4dd0-90ea-6c96aed9c444
target type direction strength edge_id
4321bee8-105e-4fc8-b645-964d1234c966 RELATED_TO outgoing 0.88 6c40dc03-9bd1-4e73-9c1c-a66a3a9248b3
target type direction strength edge_id
78841477-74c0-430a-8a69-9df80602bd6f CAUSES outgoing 0.95 91b7efa3-57e4-44e9-8ea7-a5e64f0329f1
target type direction strength edge_id
436e133f-2c31-488a-9810-fb6ca5b45250 CAUSES outgoing 0.9 b6ee1850-88c1-4860-b757-b07e1d7fb855
target type direction strength edge_id
91e8d0c6-74c0-472f-b123-d30123bfd009 CAUSES outgoing 0.95 c250081e-5695-4789-b483-395a3f8645ea
target type direction strength edge_id
c4b2f42d-b443-447f-8a05-bba099e06036 RELATED_TO outgoing 0.85 b64edf24-dae5-4ce0-b94a-6fda0a60ef30

Issue-Poller Infinite Loop Bug

Project

claude-scheduled / issue-poller automation

Problem

The issue-poller had an infinite loop where PRs created by the worker were picked up as new "issues" on subsequent poll cycles, causing a chain of recursive PR creation:

Issue #25 → PR #35 → PR #36 → PR #37 → PR #39

Each new PR was "fixing" the previous one as if it were an open issue.

Root Cause

The mcp__gitea-mcp__list_repo_issues MCP tool does NOT expose a type parameter. The underlying Gitea REST API supports ?type=issues to filter server-side, but the MCP wrapper silently ignores it. As a result, PRs and issues are returned together, and the poller treated every open PR as an unhandled issue.

Fix

Replaced the Haiku+MCP call for listing issues with a direct curl call to the Gitea REST API:

curl -s -H "Authorization: token $GITEA_TOKEN" \
  "https://git.manticorum.com/api/v1/repos/{owner}/{repo}/issues?state=open&type=issues"

The ?type=issues parameter filters PRs server-side, returning only true issues.

Alternative (MCP path)

If forced to use MCP, filter client-side by checking item["pull_request"] — it is null for real issues and a dict for PRs.

Affected Repo

paper-dynasty-database on git.manticorum.com