You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] MUT-021: Second project load can reuse the first project's agent module #69
Loading project B after project A in one process: from agent import VALUE in B’s adapter still resolved to A’s agent.py (sys.modules cache). Confirmed in audit: B factory returned "A". Sample AGENT_REF = "agent:support_agent" makes this the default module name.
Why it matters
Low for one-shot CLI. High for tests, notebooks, or any in-process multi-project runner. Wrong agent silently under test.
Audit: two temp projects loaded sequentially; second factory returned the first project’s value.
Reproduction
Audit in-process sequential load. Not independently re-run in this filing pass; loader still uses bare import_module(module_name) on current main.
Expected behavior
Each project root loads its own agent module (or uniquely named modules). Loading B after A returns B’s factory.
Suggested implementation direction
Unique module names per project root, or isolate/pop sys.modules entries you loaded. Avoid breaking AGENT_REF = "agent:support_agent" for one-shot CLI.
Acceptance criteria
Sequential load of two temp projects with agent.py returning different markers yields the second project’s marker.
Sample mutiny run / mutiny test still work.
Unit test in adapter loader tests.
No change to Hosted observe-only (does not load customer adapters).
Scope
mutiny_openai_agents/loader.py (+ tests). Out of scope: demo_agent process globals (MUT-046, skipped — Hosted concurrency=1).
Opened PR #119 to fix this issue. Sequential project loads now resolve the correct agent and clear stale project imports. Added seven regression tests; all 663 tests pass.
Activity
BasilZafar11 commentedon Oct 11, 2026
Opened PR #119 to fix this issue. Sequential project loads now resolve the correct agent and clear stale project imports. Added seven regression tests; all 663 tests pass.
#119
docs: index #59 and #69 as shipped after #98, #119