feat(ci): autonomous issue-agent via Gitea Actions #38

Closed
developer wants to merge 1 commits from feature/issue-agent-actions into development
Owner

Autonomous issue worker, triggered natively by Gitea Actions on the
persistent runner (no webhook, no sandbox/netns issues).

How it works

  • Fires on issues (labeled, closed) and issue_comment (created).
  • A cheap filter step decides whether to act — so Claude (and its API
    cost) only runs on actionable events:
    • start: open issue, assigned to developer, labelled ready, not yet claude/working;
    • resume: a comment by the issue author on a claude/blocked issue;
    • cleanup: issue closed while carrying a claude/* label → close the matching feature/issue-<N>-* PR + delete the branch (deterministic, no LLM).
  • Anti-loop: events whose actor is developer (the agent's own label/comment actions) are ignored.
  • The agent runs Claude with --model opus --effort max per tools/issue-agent/PROTOCOL.md.

Safety

  • The agent can only ever open a PR — it never merges, never pushes to development/main. Worst case is a PR you decline.
  • In this CI runtime it opens the PR and exits (does not hog a runner slot watching CI); the PR's CI + your merge are the gate.

Required before it runs (repo → Settings → Actions)

  • Secret ANTHROPIC_API_KEY — Anthropic API key (billed per run).
  • Secret AGENT_GITEA_TOKEN — the developer PAT (write:issue + repository).
  • Optional vars ISSUE_AGENT_MODEL (default opus) / ISSUE_AGENT_EFFORT (default max).

Fires only once merged to development (the default branch).

🤖 Generated with Claude Code

Autonomous issue worker, triggered natively by Gitea Actions on the persistent runner (no webhook, no sandbox/netns issues). ## How it works - Fires on `issues` (labeled, closed) and `issue_comment` (created). - A cheap **filter** step decides whether to act — so Claude (and its API cost) only runs on actionable events: - **start**: open issue, assigned to `developer`, labelled `ready`, not yet `claude/working`; - **resume**: a comment by the issue author on a `claude/blocked` issue; - **cleanup**: issue closed while carrying a `claude/*` label → close the matching `feature/issue-<N>-*` PR + delete the branch (deterministic, no LLM). - **Anti-loop**: events whose actor is `developer` (the agent's own label/comment actions) are ignored. - The agent runs Claude with **`--model opus --effort max`** per `tools/issue-agent/PROTOCOL.md`. ## Safety - The agent can **only ever open a PR** — it never merges, never pushes to `development`/`main`. Worst case is a PR you decline. - In this CI runtime it opens the PR and exits (does not hog a runner slot watching CI); the PR's CI + your merge are the gate. ## Required before it runs (repo → Settings → Actions) - Secret `ANTHROPIC_API_KEY` — Anthropic API key (billed per run). - Secret `AGENT_GITEA_TOKEN` — the `developer` PAT (write:issue + repository). - Optional vars `ISSUE_AGENT_MODEL` (default `opus`) / `ISSUE_AGENT_EFFORT` (default `max`). Fires only once merged to `development` (the default branch). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
developer added 1 commit 2026-05-23 23:02:45 +00:00
Add `.gitea/workflows/issue-agent.yaml` + `tools/issue-agent/PROTOCOL.md`.
On issue label/comment/close events a cheap filter step decides whether to
act (anti-loop: ignores the bot's own actions; honours assigned-to-developer
+ `ready` / comment-on-`claude/blocked` / `closed`+`claude/*`), then runs
Claude (opus, effort=max) to work the issue per the protocol, or cleans up a
cancelled issue's branch/PR. Claude — and its API cost — only runs on
actionable events.

The agent can only ever open a PR (never merges, never pushes to
development/main); on cancel (issue closed) the matching feature branch/PR
is removed deterministically without the LLM.

Requires repo Actions secrets ANTHROPIC_API_KEY + AGENT_GITEA_TOKEN
(the `developer` PAT). Optional vars ISSUE_AGENT_MODEL / ISSUE_AGENT_EFFORT.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Author
Owner

Closing: superseded by the semi-auto, in-session model. No Anthropic API key is available (subscription billed via Apple), so the Actions-based agent cannot run. Parked here in history if API access ever appears.

Closing: superseded by the semi-auto, in-session model. No Anthropic API key is available (subscription billed via Apple), so the Actions-based agent cannot run. Parked here in history if API access ever appears.
developer closed this pull request 2026-05-23 23:39:38 +00:00

Pull request closed

Sign in to join this conversation.