Skip to content

fix: preserve runtime in background review clones#16006

Open
guantik-gm wants to merge 1 commit into
NousResearch:mainfrom
guantik-gm:fix/background-review-runtime-clone
Open

fix: preserve runtime in background review clones#16006
guantik-gm wants to merge 1 commit into
NousResearch:mainfrom
guantik-gm:fix/background-review-runtime-clone

Conversation

@guantik-gm

Copy link
Copy Markdown

Summary

  • preserve base_url, api_key, and api_mode when _spawn_background_review() forks a review agent
  • prevent named custom providers resolved to provider='custom' from degrading into a bare custom/main review clone
  • add regression coverage for memory, skill, and combined background-review modes

Problem

Gateway/main sessions using named custom providers are runtime-resolved to provider='custom' plus explicit runtime credentials. Background review cloned only model + provider, so the fork lost endpoint state and failed with:

  • resolve_provider_client: custom/main requested but no endpoint credentials found
  • Auxiliary background review failed: No LLM provider configured

Test Plan

  • pytest tests/run_agent/test_background_review_runtime_inheritance.py tests/run_agent/test_background_review_summary.py -q
  • minimal runtime repro: clone with only model + provider fails; clone with inherited runtime fields succeeds

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent loop, run_agent.py, prompt builder labels Apr 26, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to #7491, #2581, and #15884 — all address the same background review runtime inheritance issue. This PR adds additional regression test coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants