Skip to content

[Bug]: Plan stuck indefinitely #839

@Material-Scientist

Description

@Material-Scientist

Operating System

Linux

Run Mode

Docker

App Version

0.15.0

Bug Description

When trying to create a plan (e.g. to simplify dependencies), the plan is stuck indefinitely in the running agents tab. This happens with every local model I use.

Steps to Reproduce

  1. Create backlog for a bunch of features
  2. Go to graph view
  3. Click on Plan
  4. Tell AI to simplify
  5. Stuck indefinitely...

Expected Behavior

It shouldn't be stuck.

Actual Behavior

It's stuck. Local AI shows no activity/load. automaker-server also sits idly.

Screenshots

Image Image

Relevant Logs

Additional Context

Full Nomad job:

job "automaker" {
  group "automaker-server" {
    network {
      mode = "bridge"
      port "envoy-metrics" {}
    }
    constraint {
      attribute = "${attr.cpu.arch}"
      operator  = "regexp"
      value     = "arm64"
    }
    volume "automaker" {
      type            = "csi"
      read_only       = false
      source          = "automaker"
      access_mode     = "single-node-writer"
      attachment_mode = "file-system"
    }
    service {
      name     = "automaker-server"
      port     = "3008"
      meta {
        envoy_metrics_port = "${NOMAD_HOST_PORT_envoy_metrics}" # make envoy metrics port available in Consul
      }
      tags = [
				"traefik.http.routers.automaker-server.middlewares=https-headers@file",
      ]
      connect {
        sidecar_service {
          proxy {
            transparent_proxy {
              exclude_outbound_ports = [53,8600,443]
              exclude_outbound_cidrs = ["172.26.64.0/20","127.0.0.0/8"]
            }
            expose {
              path {
                path = "/metrics"
                protocol = "http"
                local_path_port = 9102
                listener_port = "envoy-metrics"
              }
            }
          }
        }
      }
      check {
        expose = true
        type     = "http"
        path     = "/api/health"
        interval = "15s"
        timeout  = "1s"
      }
    }
    task "automaker-server" {
      driver = "docker"
      config {
        image   = "node:latest"
        #command = "sh"
        entrypoint = ["/bin/sh"]
        args = [
          #"-c",
          "/local/init.sh"
          #"npm cache clean --force && npm install -g @anthropic-ai/claude-code && npm install -g @musistudio/claude-code-router && exec ccr start"
        ]
        volumes = [
          "local/init.sh:/local/init.sh",
          "local/custom-config.json:/root/.config/opencode/opencode.json",
          "local/AGENTS.md:/root/.config/opencode/AGENTS.md",
          "local/coder/AGENTS.md:/root/.config/opencode/agents/coder/AGENTS.md",
          "local/researcher/AGENTS.md:/root/.config/opencode/agents/researcher/AGENTS.md",
        ]
        #work_dir = "/repo"
      }
      volume_mount {
        volume      = "automaker"
        destination = "/root/data"
        read_only = false
      }        
      template {
        destination = "local/init.sh"
        data = <<EOH
#!/bin/bash
# 1. Clone the repository
git clone https://github.com/AutoMaker-Org/automaker.git
npm install -g opencode-ai
cd automaker

# 2. Install dependencies
npm install

# 3. Build shared packages (can be skipped - npm run dev does it automatically)
#npm run build

# 4. Start Automaker
npm run dev:server
# Choose between:
#   1. Web Application (browser at localhost:3007)
#   2. Desktop Application (Electron - recommended)
EOH
      }
      template {
        destination = "secrets/.env"
        env = true
        data = <<EOH
CORS_ORIGIN=https://automaker.service.consul,https://automaker-server.service.consul,http://localhost:3008
__VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS=automaker-server.virtual.consul          
DATA_DIR=/root/data
IS_CONTAINERIZED=true
OPENCODE_EXPERIMENTAL_RLM_REPL=true
#HTTPS_PROXY=http://username:{{ key "secrets/firecrawl/proxy.pw" }}@192.168.178.87:3128
#https_proxy=http://username:{{ key "secrets/firecrawl/proxy.pw" }}@192.168.178.87:3128        
EOH
      }
      template {
        destination = "local/custom-config.json"
        data = <<EOH
{
  "$schema": "https://opencode.ai/config.json",
  "default_agent": "plan",
  "plugin": [],
  "mcp": {
    "web": {
      "type": "remote",
      "url": "http://n8n.virtual.consul/mcp/8cc2af19-111a-45a5-a282-1548f1ea2892",
      "enabled": true
    }
  },
  "permission": {
    "edit": {
      "*": "deny",
      "/root/.local/share/opencode/storage/projects/*": "allow"
    },
    "glob": {
      "*": "deny",
      "pattern=/root/.local/share/opencode/storage/projects/*": "allow"
    },
    "list": {
      "*": "deny",
      "/root/.local/share/opencode/storage/projects/*": "allow"
    },
    "write": {
      "*": "deny",
      "/root/.local/share/opencode/storage/projects/*": "allow"
    }
  },
  "provider": {
    "llama.cpp": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "llama-server",
      "options": {
        "baseURL": "http://local-ai.virtual.consul/v1",
        "timeout": 900000
      },
      "models": {
        "Qwen3.5-122B-A10B-GGUF": {
          "id": "Qwen3.5-122B-A10B-GGUF",
          "name": "Qwen3.5-122B-A10B-GGUF",
          "tool_call": true,
          "reasoning": true,
          "limit": {
            "context": 64000,
            "output": 64000
          }
        }
      }
    },
    "nvda-llama.cpp": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "nvda-llama-server",
      "options": {
        "baseURL": "http://local-ai-nvda.virtual.consul/v1",
        "timeout": 900000
      },
      "models": {
        "NVDA-MiniMax-M2.5-UD-IQ1_S-GGUF": {
          "id": "NVDA-MiniMax-M2.5-UD-IQ1_S-GGUF",
          "name": "NVDA-MiniMax-M2.5-UD-IQ1_S-GGUF",
          "tool_call": true,
          "reasoning": true,
          "limit": {
            "context": 32000,
            "output": 32000
          }
        },
        "NVDA-Qwen3.5-35B-A3B-abliterated-GGUF": {
          "id": "NVDA-Qwen3.5-35B-A3B-abliterated-GGUF",
          "name": "NVDA-Qwen3.5-35B-A3B-abliterated-GGUF",
          "tool_call": true,
          "reasoning": true,
          "limit": {
            "context": 64000,
            "output": 64000
          }
        }
      }
    }
  },
  "agent": {
    "plan": {
      "description": "Planning agent - delegates to specialized sub-agents",
      "mode": "primary",
      "model": "llama-server/Qwen3.5-122B-A10B-GGUF",
      "temperature": 0.9,
      "tools": {
        "read": false,
        "write": false,
        "edit": false,
        "bash": false,
        "grep": false,
        "glob": false,
        "list": false,
        "webfetch": false,
        "patch": false,
        "todoread": true,
        "todowrite": true,
        "question": true
      },
      "prompt": "{file:./AGENTS.md}",
    },
    "coder": {
      "description": "Coding sub-agent with full tool access",
      "mode": "subagent",
      "model": "nvda-llama-server/NVDA-Qwen3.5-35B-A3B-abliterated-GGUF",
      "temperature": 0.2,
      "tools": {
        "read": true,
        "write": true,
        "edit": true,
        "bash": true,
        "grep": true,
        "glob": true,
        "list": true,
        "webfetch": false,
        "patch": true,
        "todoread": true,
        "todowrite": false,
        "question": false
      },
      "prompt": "{file:./agents/coder/AGENTS.md}",
    },
    "code-reviewer": {
      "description": "Reviews code for best practices and potential issues",
      "mode": "subagent",
      "model": "nvda-llama-server/NVDA-MiniMax-M2.5-UD-IQ1_S-GGUF",
      "prompt": "You are a code reviewer. Focus on security, performance, and maintainability.",
      "tools": {
        "write": false,
        "edit": false
      },
    },
    "researcher": {
      "description": "Web search sub-agent with read-only access",
      "mode": "subagent",
      "model": "nvda-llama-server/NVDA-MiniMax-M2.5-UD-IQ1_S-GGUF",
      "tools": {
        "read": true,
        "write": false,
        "edit": false,
        "bash": false,
        "grep": true,
        "glob": true,
        "list": true,
        "webfetch": true,
        "patch": false,
        "todoread": true,
        "todowrite": false,
        "question": false
      },
      "prompt": "{file:./agents/researcher/AGENTS.md}",
      "steps": 50
    }
  },
  "instructions": ["AGENTS.md"]
}
EOH
      }
      template {
        destination = "local/AGENTS.md"
        data = <<EOH
# Main AGENTS.md
- Use Opencode tools only: read, write, edit, list, glob, grep, bash, task, todowrite, todoread.
- Do NOT call non-existent tools like Repo_browser.*.
- Prefer `edit` for modifying existing files; use `read` to inspect before editing.
- For any search engine queries, and extracting specific info from pages, utilize the web MCP server.
- When needing research, delegate to the `researcher` sub-agent.
- When needing coding tasks, delegate to the `coder` sub-agent.
EOH
      }
      template {
        destination = "local/coder/AGENTS.md"
        data = <<EOH
# Coder Agent Instructions
- You have full tool access for code development tasks.
- Use `read` to inspect files before editing.
- Use `edit` for modifications, `write` for new files.
- Run `bash` commands for building, testing, etc.
- Write tests before finishing any task.
- If you need to look up documentation, delegate to `researcher`.
EOH
      }
      template {
        destination = "local/researcher/AGENTS.md"
        data = <<EOH
# Researcher Agent Instructions
- You have web fetch capabilities for research tasks.
- Use `webfetch` to search the web and extract information.
- Do NOT modify any files - your role is read-only.
- Use `grep` and `glob` to search existing code if needed.
- Provide findings to the calling agent without making changes.
EOH
      }  
      resources {
        cpu = 1024
        memory = 2048
        memory_max = 4096
      }
    }
  }
  group "automaker-ui" {
    network {
      mode = "bridge"
      port "envoy-metrics" {}
      #port "automaker" {
      #  static = 3007
      #  to = 3007
      #}   # host side port
    }
    constraint {
      attribute = "${attr.cpu.arch}"
      operator  = "regexp"
      value     = "arm64"
    }
    service {
      name     = "automaker"
      port     = "3007"
      meta {
        envoy_metrics_port = "${NOMAD_HOST_PORT_envoy_metrics}" # make envoy metrics port available in Consul
      }
      tags = [
				"traefik.http.routers.automaker.middlewares=https-headers@file",
      ]
      connect {
        sidecar_service {
          proxy {
            transparent_proxy {
              exclude_outbound_ports = [53,8600,443]
              exclude_outbound_cidrs = ["172.26.64.0/20","127.0.0.0/8"]
            }
            expose {
              path {
                path = "/metrics"
                protocol = "http"
                local_path_port = 9102
                listener_port = "envoy-metrics"
              }
            }
          }
        }
      }
      #check {
      #  expose = true
      #  type     = "http"
      #  path     = "/api/health"
      #  interval = "15s"
      #  timeout  = "1s"
      #}
    }
    task "automaker-ui" {
      driver = "docker"
      config {
        image   = "node:latest"
        #command = "sh"
        entrypoint = ["/bin/sh"]
        args = [
          #"-c",
          "/local/init.sh"
          #"npm cache clean --force && npm install -g @anthropic-ai/claude-code && npm install -g @musistudio/claude-code-router && exec ccr start"
        ]
        volumes = [
          "local/init.sh:/local/init.sh"
        ]
        #work_dir = "/repo"
      }
      template {
        destination = "local/init.sh"
        data = <<EOH
#!/bin/bash
# 1. Clone the repository
git clone https://github.com/AutoMaker-Org/automaker.git
cd automaker

# 2. Install dependencies
npm install

# 3. Build shared packages (can be skipped - npm run dev does it automatically)
npm run build

# 4. Start Automaker
cd /automaker/apps/ui
npx vite --host 0.0.0.0 --port 3007 --debug
#npm run dev:web -- --host=0.0.0.0
# Choose between:
#   1. Web Application (browser at localhost:3007)
#   2. Desktop Application (Electron - recommended)
EOH
      }    
      resources {
        cpu = 1024
        memory = 1024
        memory_max = 4096
      }
      template {
        destination = "secrets/.env"
        env = true
        data = <<EOH
#NODE_ENV=development
APP_ENV=production
VITE_SERVER_URL=https://automaker-server.service.consul
VITE_DEV_SERVER_URL=https://automaker-server.service.consul
__VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS=automaker.service.consul
ASSET_URL=https://automaker.service.consul
APP_URL=https://automaker.service.consul
VITE_SKIP_ELECTRON=true
VITE_LOG_LEVEL=debug
LOG_LEVEL=debug
CORS_ORIGIN=https://automaker.service.consul,https://automaker-server.service.consul,http://localhost:3007
HOST=0.0.0.0          
IS_CONTAINERIZED=true
#HTTPS_PROXY=http://username:{{ key "secrets/firecrawl/proxy.pw" }}@192.168.178.87:3128
#https_proxy=http://username:{{ key "secrets/firecrawl/proxy.pw" }}@192.168.178.87:3128        
EOH
      }
    }
  }
}

Checklist

  • I have searched existing issues to ensure this bug hasn't been reported already
  • I have provided all required information above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions