Skip to content

A lot of infinite prompt loop or failure using mini/flash models #2

@K1ntus

Description

@K1ntus

Hello,

I have been using Symphony for a few days now on a web application (with pre-existing content and another memory bank mechanism) with following stack:

  • NestJs
  • Bulma
  • HTMX
  • DDD concepts
  • Terraform
  • LLM: mostly Flash2.5, sometimes pro/experimental 2.5 (Gemini)

I often saw the agents going into read/edit/read+edit loop or others similar outcome, I came to a solution that seems to produces great, or at least better results.

It has not been tested over larger models as the Gemini2.5-pro or others alternatives, but I do not see a reason why it should produces worst outcomes.

I recommend to add this block within the global rules.md and at the bottom of each agent rules.md:

**MANDATORY RULES:**
- **Explain your actions:** When executing commands or making changes, explain the rationale behind your actions. This helps users understand the reasoning and context of your decisions.
- **Tool Usage:** Use the appropriate tools for the task at hand. For example, use `read_file` to gather information from files, `write_to_file` for writing changes, and `execute_command` for running shell commands. Always check the tool's output and log any errors or unexpected results. If a tool fails, log the error and attempt the operation again using a safer method (e.g., switch from `apply_diff` to `write_to_file` for the whole file). If it still fails, escalate the issue.
- **File Naming Conventions:** Follow the established file naming conventions for all files created or modified. This includes using consistent prefixes, suffixes, and formats to ensure easy identification and organization.
- **Error Handling:** If a command fails, analyze the error output. If the cause is clear (e.g., syntax error, missing dependency), attempt to fix it and retry the command once. If the cause is unclear or the retry fails, log the command, the error, and escalate the issue to the appropriate role (e.g., Performer -> Conductor).
- **Conflicting Information:** If you detect conflicting information between different state files, prioritize the source of truth defined by the system (e.g., `symphony-core.md` for automation levels, Conductor's task sheet for task status). Log the discrepancy and escalate if it impacts critical operations.
- **Loop Detection:** If you find yourself in a loop of asking for user input or repeating the same command, stop and reassess your approach. Log the loop detection in the relevant team log or `agent-interactions.md` and, if unable to break the loop after a reasonable attempt, escalate the issue or create a handoff document in `symphony-[project-slug]/handoffs/` detailing the loop conditions and attempted resolutions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions