Repository navigation
feat(agents): lazy-start stopped experts on first invocation - #2471
Open
huangcheng wants to merge 5 commits into
Open
huangcheng wants to merge 5 commits into
huangcheng wants to merge 5 commits into
Conversation
Stopped experts were raising harness KeyError and surfacing as a misleading model-call failure. Precheck runtime via get_agent, split AGENT_DISABLED, classify KeyError stream errors, and expose MCP error codes.
External MCP/dashboard calls should not require clients to understand Octop's start/stop state machine. ensure_loaded starts stopped agents on demand while leaving failed agents alone so configuration errors stay visible.
1 of 4 tasks
3 tasks done
Collaborator
🔍 Automated Review Findings
|
stream/resume_hitl now precheck via get_agent; SimpleNamespace fakes without it raised AttributeError and left serialization tests waiting forever (CI 6h).
Contributor
Author
|
@jubaoliang Same root cause as #2470: CI Test step hung at ~90% for 6h on stream/resume unit fakes missing |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AgentManager.ensure_loaded()and uses it fromstream/call/resume_hitland Agent MCPcall_expert/resume_expert.init_workspace=False, per-agent lifecycle lock).failedagents are not retried.stop()ped expert will come back on the next call (same as “open chat” implying use).Depends on
fix/agent-mcp-stopped-expert-errors) — this branch is stacked on top of it. Merge that first (or merge this after rebase once that lands).Test plan
uv run pytest tests/unit/agents/test_ensure_loaded.py tests/unit/agent_mcp -qcall_octop_expert→ expert becomesrunningand turn completesAGENT_FAILEDwithout a second start attempt