Conversation
lilly-luo
force-pushed
the
lilly/fix-stale-claude-subagent
branch
from
September 22, 2026 03:00
0557c1f to
a4cbaf9
Compare
lilly-luo
force-pushed
the
lilly/fix-stale-claude-subagent
branch
from
September 22, 2026 03:12
a4cbaf9 to
aca599c
Compare
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.
Problem
Claude Code 2.1.248's interactive plugin refresh replaces its agent registry without preserving definitions supplied through
--agents. Unity Gateway's routing hook then rewrites an ordinary Explore call to an agent name that Claude no longer recognizes. Built-in and plugin agents remain available.This is reproducible with one subagent call: complete a routed call, run
/reload-plugins --force, and repeat the call in the same TUI. The second call fails withAgent type 'ucode-route-glm-5-3-982d9f93' not found. Parallel spawning and nesting are unnecessary. Headless trials do not exercise the affected refresh path.Change
Register the existing per-model route definitions in a launch-scoped plugin, pass it through
--plugin-dir, and route to its qualified agent names. Claude reloads these definitions from disk during plugin refresh. Preserve caller--agentsarguments. No per-route model-discovery request is added.Generated plugins are never globally installed or passed to non-routed launches. Cleanup covers normal exit, plugin-generation failures, and process-start failures. Every Claude launch also removes abandoned plugin directories; a lease inherited by Claude prevents a concurrent non-routed launch from deleting an active session's definitions, including when the UG parent has exited. User plugins are preserved.
Existing Claude sessions need to restart after upgrading UG: hooks invoke the installed executable, and the new plugin-qualified names must match the registrations created at launch.
The diagnostic script now supports a real interactive before/reload/after experiment and checks actual tool errors, child completion notifications, and debug-log routing evidence. See
scripts/repro_stale_claude_subagent.mdfor commands and scope.For future affected sessions,
UG_CLAUDE_DEBUG_LOG_DIR="$HOME/ug-debug" isaacenables Claude's native--debug-filecapture through UG. Each launch creates a unique private log, reports its path to stderr, and retains it after exit. Explicit--debug-filewins. Capture is local only; it does not upload logs or recover earlier sessions. See the README for retrieval commands.Validation
registry_failure), plugin exit 0 (no_failure_observed).The live diagnostic uses a small fixed routing hook and inherited child models; it validates the registration mechanism, not Isaac's launcher, smart-router decisions, or production GLM inference. The affected user's reported UG version is
0.1.0+9858a84. To attribute that specific incident to automatic plugin refresh, inspect its debug logs forAuto-refreshing pluginsorrefreshActivePluginsbefore the first missing-agent error.