Skip to content

feat(orchestrator): migrate spawn_agent to spawn_with_fallback#722

Merged
AlexMikhalev merged 1 commit intomainfrom
task/55-spawn-fallback
Mar 26, 2026
Merged

feat(orchestrator): migrate spawn_agent to spawn_with_fallback#722
AlexMikhalev merged 1 commit intomainfrom
task/55-spawn-fallback

Conversation

@AlexMikhalev
Copy link
Copy Markdown
Contributor

Summary

  • Migrates all spawn_agent call sites to use spawn_with_fallback
  • Consolidates agent spawning through the fallback-enabled path
  • Deprecates or removes the old spawn_agent function
  • Improves agent reliability via automatic CLI fallback

Test plan

  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo fmt --all --check passes
  • cargo test --workspace passes

Refs #55

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

#55

- Add SpawnRequest struct to terraphim_spawner with primary/fallback fields
- Add spawn_with_fallback method that tries primary provider first, then falls back
- Add circuit_breakers field to AgentOrchestrator for future circuit breaker integration
- Migrate spawn_agent to build SpawnRequest and use spawn_with_fallback
- Pass fallback_provider and fallback_model from AgentDefinition when configured
- All tests pass, clippy clean, cargo fmt applied
@AlexMikhalev AlexMikhalev merged commit 3fa1b44 into main Mar 26, 2026
12 checks passed
@AlexMikhalev AlexMikhalev deleted the task/55-spawn-fallback branch March 26, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant