Skip to content

fix(agent): news-driven-cli-gap-analyzer non si auto-delega#50

Merged
aborruso merged 1 commit into
mainfrom
fix/agent-no-self-delegation
Jul 11, 2026
Merged

fix(agent): news-driven-cli-gap-analyzer non si auto-delega#50
aborruso merged 1 commit into
mainfrom
fix/agent-no-self-delegation

Conversation

@aborruso

Copy link
Copy Markdown
Member

Problema

L'agente news-driven-cli-gap-analyzer, quando lanciato, invece di eseguire il lavoro spawnava un clone di sé stesso via Agent tool, aspettando poi il risultato — un livello di inoltro inutile (osservato in una run reale). Causa: vede sé stesso nell'elenco degli agent-type disponibili e i blocchi <example> della propria description (che descrivono all'assistente principale quando lanciarlo) venivano imitati come istruzioni di ri-delega.

Fix

Aggiunto un Operating Principle esplicito in testa: l'agente esegue tutto direttamente nel proprio contesto, non usa mai il tool Agent (tantomeno per clonare sé stesso), e chiarisce che gli <example> sono per l'assistente principale, non per lui.

Nessun impatto sul codice o sui dati: modifica alla sola definizione dell'agente.

🤖 Generated with Claude Code

L'agente, vedendo sé stesso nell'elenco degli agent-type e gli <example>
della propria description (rivolti all'assistente principale), spawnava
un clone di sé invece di lavorare, creando un livello di inoltro inutile.
Aggiunto un Operating Principle esplicito: esegue tutto direttamente, mai
usare il tool Agent, gli <example> non sono istruzioni di ri-delega.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 11, 2026 06:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Questo PR corregge il comportamento dell’agente Claude news-driven-cli-gap-analyzer, evitando che si auto-deleghi (clonandosi) tramite l’Agent tool a causa dell’imitazione dei blocchi <example> presenti nella propria description.

Changes:

  • Aggiunto un Operating Principle esplicito che impone all’agente di eseguire il lavoro direttamente nel proprio contesto.
  • Chiarito che i blocchi <example> nella description sono istruzioni per l’assistente principale (quando lanciarlo), non per l’agente stesso.

@greptile-apps

greptile-apps Bot commented Jul 11, 2026

Copy link
Copy Markdown

Greptile Summary

This PR clarifies how the news-driven-cli-gap-analyzer agent should run.

  • Adds an operating principle telling the agent to work directly in its own context.
  • Prevents the agent from spawning another copy of itself through the Agent tool.
  • Clarifies that the frontmatter examples are for the main assistant, not for the agent itself.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed agent instruction.
  • The current agent workflow still uses its direct tools and does not require self-delegation.

Important Files Changed

Filename Overview
.claude/agents/news-driven-cli-gap-analyzer.md Adds a narrow prompt instruction to prevent self-delegation loops in the agent definition.

Reviews (1): Last reviewed commit: "fix(agent): news-driven-cli-gap-analyzer..." | Re-trigger Greptile

@aborruso
aborruso merged commit 6435612 into main Jul 11, 2026
2 checks passed
@aborruso
aborruso deleted the fix/agent-no-self-delegation branch July 11, 2026 07:07
aborruso added a commit that referenced this pull request Jul 11, 2026
… ricetta aic

Patch: raccoglie #49 (emptyHint via CLI), #52 (anti-refuso bill_number),
#53 (senato-vote-detail per tipo voto), ricetta sede question time aic, #50.
43 tool invariati, 137/137 test verdi.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants