diff --git a/astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py b/astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py index 6d43a78ec..b571f2ba5 100644 --- a/astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py +++ b/astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py @@ -417,8 +417,8 @@ class InternalAgentSubStage(Stage): skipped_initial_system = False for message in all_messages: if message.role == "system" and not skipped_initial_system: - continue # skip all system messages until the first non-system message - skipped_initial_system = True + skipped_initial_system = True + continue # skip first system message if message.role in ["assistant", "user"] and getattr( message, "_no_save", None ):