SequentialAgent run_live mutates shared child LlmAgent configuration

Ouverte
#8,282 2 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 3 jours

@llalitkumarrr y travaille déjà.

Depuis le 23/11/2026.

  • #8286 par @houyunsun — ouverte
  • #8313 par @shengzhaowei — ouverte

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
25/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
python
Domaine
ai

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Python
Étoiles
22.3k
Forks
4.4k
Merge moyen
1 j 2 h
PR mergées (30 j)
6

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de google/adk-python

Toutes les issues de google/adk-python

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.