Skip to content

Propose comment-triggered agents ("tag an agent") — tracking #159 - #160

Open
k5s-bot[bot] wants to merge 1 commit into
mainfrom
propose-comment-triggered-agents-159
Open

Propose comment-triggered agents ("tag an agent") — tracking #159#160
k5s-bot[bot] wants to merge 1 commit into
mainfrom
propose-comment-triggered-agents-159

Conversation

@k5s-bot

@k5s-bot k5s-bot Bot commented Jul 25, 2026

Copy link
Copy Markdown

What

Files the ticket asked for: a way to trigger agents via comments and to
"tag" a specific agent from a comment. Creates tracking issue #159 and adds
a grounded proposal doc (docs/proposals/comment-triggered-agents.md).

This PR adds documentation only — no behavior change. It exists so the
proposal is reviewable in-repo alongside the issue; the actual implementation
should follow once a direction is chosen on #159.

Why it doesn't work today (grounded in the code)

  • parseGithubEvent (apps/integration-gateway/src/webhooks/github.ts) only
    makes issues.labeled / pull_request.labeled actionable;
    issue_comment.created{ kind: "ignored" }. Commenting never runs an
    agent (documented in docs/integrations-gateway.md).
  • IntegrationRoute.spec.match keys on { source, event, action, labelName }
    only (crd-integration-route-registry.ts, ADR 0024) — no mention/command
    selector and no @handle → Agent resolution, so a comment can't address a
    specific agent.
  • GitHub-App accounts generally can't be assignees (ADR 0024 rejected "assign
    the bot" for this), so @mention-style tagging needs real design.

Proposed solutions (see the doc for full tradeoffs)

  • A (recommended): slash-command grammar (/agent <name> …) → extend
    IntegrationRoute.match with event: "issue_comment" — reuses the existing
    deterministic CRD dispatch.
  • B: @mention handle → Agent resolver (annotation/metadata.name);
    composes with A.
  • C: mentionable bot + reaction-based ack (👀→🚀→✅) as the re-trigger/idempotency gesture.
  • D: baseline — keep comments a no-op, lean on the existing session page.

Plus cross-cutting concerns: loop prevention (senderIsBot drop + required
prefix), identity gating (reuse identityResolver.resolve), comment-id dedupe,
and fast 202 ack.

Closes #159 is intentionally not used — the issue tracks the implementation;
this PR only lands the proposal.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Cp7xF4sPhZ59pTUg72Kg9j

Comments are currently a hard no-op (parseGithubEvent ignores
issue_comment.created) and IntegrationRoute.match has no mention/command
selector, so there is no way to trigger or address a specific agent from a
comment. Add a proposal doc framing the problem and options (slash-command
route, @mention->Agent resolver, reaction-based bot mention, session-page
baseline) with a recommendation and cross-cutting safety concerns.

Tracking: #159

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cp7xF4sPhZ59pTUg72Kg9j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trigger agents via issue/PR comments — no way to "tag" an agent today

1 participant