Skip to content

fix(orchestration): use main agent inline when no sub-agents configured (#1463)#1489

Merged
bug-ops merged 2 commits intomainfrom
agent-router-fallback
Mar 9, 2026
Merged

fix(orchestration): use main agent inline when no sub-agents configured (#1463)#1489
bug-ops merged 2 commits intomainfrom
agent-router-fallback

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 9, 2026

Summary

  • Adds SchedulerAction::RunInline variant: when AgentRouter::route() returns None (no sub-agents configured), the scheduler emits RunInline instead of immediately marking the task Failed. The agent loop handles it by calling the main provider directly, recording a synthetic spawn, and sending the result via the event channel. Closes Orchestration: AgentRouter fails when no sub-agents configured #1463
  • Fixes /plan status always showing "awaiting confirmation" regardless of actual graph state — now matches on GraphStatus and returns the correct message per variant
  • Updates test_no_agent_routes_inline (was test_no_agent_marks_task_failed) to reflect new behavior
  • Adds tests: plan_confirm_no_subagents_executes_inline, plan_status_reflects_graph_status, plan_confirm_inline_provider_failure_sends_message

Test plan

  • cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins — 4928/4928 pass
  • cargo +nightly fmt --check — clean
  • cargo clippy --workspace --features full -- -D warnings — clean
  • Manual: /plan goal "Write hello world" + /plan confirm with no sub-agents configured → plan executes inline
  • Manual: /plan confirm → fail task → /plan status → shows "Plan failed. Use /plan retry..."

bug-ops added 2 commits March 9, 2026 21:47
…ed (#1463)

When available_agents is empty, RuleBasedRouter returns None and the
scheduler now emits SchedulerAction::RunInline instead of marking tasks
failed. The agent loop handles RunInline by calling the main provider
directly, recording a synthetic spawn, and sending the result via the
event channel.

Also fix /plan status always showing "awaiting confirmation" regardless
of actual graph state. handle_plan_status now matches on GraphStatus and
returns the appropriate message for each variant.
@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate tests Test-related changes bug Something isn't working size/L Large PR (201-500 lines) labels Mar 9, 2026
@bug-ops bug-ops merged commit 904afb5 into main Mar 9, 2026
18 checks passed
@bug-ops bug-ops deleted the agent-router-fallback branch March 9, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core zeph-core crate documentation Improvements or additions to documentation rust Rust code changes size/L Large PR (201-500 lines) tests Test-related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Orchestration: AgentRouter fails when no sub-agents configured

1 participant