Component
Agent (Python runtime)
Describe the feature
Prevent the agent from setting integration trigger labels that would re-fire webhooks and spawn duplicate tasks (infinite loop / cost blow-up).
Known trigger surfaces today:
| Integration |
Default trigger |
Set by |
| Jira |
bgagent label |
User / automation |
| Linear |
bgagent label |
User / automation |
| Future GitHub label channel |
TBD (e.g. bgagent) |
User only |
Enforcement:
- PreToolUse / Cedar hard-deny on issue-write tools when
labels includes the configured trigger label for that task's source integration.
- Allowlist of agent-set labels: progress/status labels only (e.g.
agent:implementing, agent:pr-created, agent:error) — configurable per integration in Blueprint.
- Fail-closed if task metadata does not include
trigger_label when issue-write tools are allowed.
Use case
Linear and Jira processors fire on label added events. If the agent posts comments and accidentally (or via prompt injection) re-applies the trigger label, the platform may enqueue another full task against the same issue — unbounded cost and race conditions.
Proposed solution
- Extend task hydration context with
trigger_label and allowed_agent_labels from repo Blueprint / integration mapping.
- Add Cedar policy module
builtin/trigger_label_governance or extend deterministic PreToolUse regex guards for MCP update_issue / label payloads.
- Mirror check in Jira/Linear outbound clients if agents call REST directly.
- Tests: agent policy tests + handler tests for webhook processor dedup (label must be newly added, not re-saved — already true for Jira; document same for agent writes).
- Document operator guidance: restrict who can apply trigger labels on public repos.
Other information
Acknowledgements
Component
Agent (Python runtime)
Describe the feature
Prevent the agent from setting integration trigger labels that would re-fire webhooks and spawn duplicate tasks (infinite loop / cost blow-up).
Known trigger surfaces today:
bgagentlabelbgagentlabelbgagent)Enforcement:
labelsincludes the configured trigger label for that task's source integration.agent:implementing,agent:pr-created,agent:error) — configurable per integration in Blueprint.trigger_labelwhen issue-write tools are allowed.Use case
Linear and Jira processors fire on label added events. If the agent posts comments and accidentally (or via prompt injection) re-applies the trigger label, the platform may enqueue another full task against the same issue — unbounded cost and race conditions.
Proposed solution
trigger_labelandallowed_agent_labelsfrom repo Blueprint / integration mapping.builtin/trigger_label_governanceor extend deterministic PreToolUse regex guards for MCPupdate_issue/ label payloads.Other information
docs/guides/JIRA_SETUP_GUIDE.md, Linear mapping construct, (orchestration): scheduled and pull-request-native task triggers #389 (platform trigger expansion), RFC: Event-Driven Governance and Actions #230 (event governance RFC).jira-webhook-processor.ts/linear-webhook-processor.ts(ingress dedup does not stop agent write-back).Acknowledgements