SequentialAgent run_live mutates shared child LlmAgent configuration

Aperta
#8,282 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

@llalitkumarrr ci sta già lavorando.

Dal 23/11/2026.

  • #8286 di @houyunsun — aperta
  • #8313 di @shengzhaowei — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
ai

Direzione di ricerca

The mutation happens in SequentialAgent._run_live_impl in src/google/adk/agents/sequential_agent.py (around lines 199-212), where the task_completed tool and completion instruction are added to each child LlmAgent. Read that method first, then write a regression that runs run_live and run_async on the same sequential agent and checks the child's tools and instruction are unchanged afterward. Done means the shared agent is not modified by a live run. PR #8286 is already open against this, so check it before starting.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

core request clarification

SequentialAgent._run_live_impl adds the task_completed tool and completion instruction by mutating each child LlmAgent in place (src/google/adk/agents/sequential_agent.py:199-212). A Runner can reuse the same agent tree across live and ordinary runs, so a live run changes persistent configuration observed by later run_async calls. Concurrent live and non-live runs can also read and write tools and instruction at the same time.

Please consider making the completion tool and instruction invocation-local, or otherwise avoiding mutation of the shared LlmAgent.

This is separate from #7224, which addressed invocation-scoped code-execution state in Runner. The related Go port has the same shared-state race in google/adk-go#2294; its fix uses an invocation-local live-agent overlay rather than mutating the shared agent.

A useful regression should run run_live alongside run_async on the same sequential agent and assert that the child agent's tools and instruction remain unchanged after the live invocation.

Lingua principale
Python
Stelle
22.3k
Fork
4.4k
Merge medio
1g 2h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di google/adk-python

Tutte le issue di google/adk-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.