conductor-oss/conductor · error · IllegalArgumentException

Named slots ``planner=`` and ``fallback=`` are only valid wi

Error message

Named slots ``planner=`` and ``fallback=`` are only valid with ``strategy=Strategy.PLAN_EXECUTE``. Agent '{}' has strategy='{}'. Either set ``strategy=Strategy.PLAN_EXECUTE`` or pass the sub-agents via ``agents=[…]`` instead.

What it means

Error "Named slots ``planner=`` and ``fallback=`` are only valid with ``strategy=Strategy.PLAN_EXECUTE``. Agent '{}' has strategy='{}'. Either set ``strategy=Strategy.PLAN_EXECUTE`` or pass the sub-agents via ``agents=[…]`` instead." thrown in conductor-oss/conductor.

Source

Thrown at agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/compiler/AgentCompiler.java:160

                            || config.getPlanner() != null
                            || config.getFallback() != null;
            boolean hasTools = config.getTools() != null && !config.getTools().isEmpty();

            AgentConfig.Strategy strategy = config.getStrategy();

            // Named slots (``planner=``/``fallback=``) are PLAN_EXECUTE-only.
            // Every other strategy compiler iterates ``config.getAgents()``
            // directly without consulting the named slots; the dispatch fix
            // that broadened ``hasAgents`` admits planner-only configs into
            // those compilers, which then NPE on ``config.getAgents().size()``.
            // Reject the cross-product here with a clear migration message
            // rather than letting it die with an opaque stack trace deep
            // inside compileSequential / compileParallel / compileHandoff
            // / compileHybrid / etc.
            boolean hasNamedSlots = config.getPlanner() != null || config.getFallback() != null;
            boolean isPlanExecute = strategy == AgentConfig.Strategy.PLAN_EXECUTE;
            if (hasNamedSlots && !isPlanExecute) {
                throw new IllegalArgumentException(
                        "Named slots ``planner=`` and ``fallback=`` are only valid with "
                                + "``strategy=Strategy.PLAN_EXECUTE``. Agent '"
                                + config.getName()
                                + "' has strategy='"
                                + (strategy == null ? "(unset → handoff)" : strategy.toValue())
                                + "'. Either set ``strategy=Strategy.PLAN_EXECUTE`` or pass the "
                                + "sub-agents via ``agents=[…]`` instead.");
            }

            // Strategy-led dispatch: an explicit non-handoff multi-agent
            // strategy (PLAN_EXECUTE, SEQUENTIAL, PARALLEL, ROUTER, SWARM,
            // ROUND_ROBIN, RANDOM, MANUAL) always routes to MultiAgentCompiler.
            // Previously a non-empty ``tools`` field silently rerouted to
            // ``compileHybrid``, which only knows handoff semantics — the
            // declared strategy was dropped on the floor. Hybrid is reserved
            // for the handoff case (the only one it actually implements).
            boolean isMultiAgentStrategy =
                    strategy != null && strategy != AgentConfig.Strategy.HANDOFF;

View on GitHub (pinned to cf7c3e4a8a)

Solutions

  1. Set strategy=Strategy.PLAN_EXECUTE on the agent when using planner= and fallback= named slots.
  2. Or drop planner=/fallback= and pass sub-agents via agents=[...] for non plan-execute strategies.

When it happens

Trigger: Thrown at agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/compiler/AgentCompiler.java:160 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14). Data as JSON: /api/errors/624ffb303e58afae. Report an issue: GitHub.