← Back to PRs

#9127: fix(doctor): clarify default agent labeling

by ridermw open 2026-02-04 22:19 View on GitHub →
commands stale
## Summary - Show `(default)` label only for agents that have `default: true` explicitly set in config - Previously the label was shown for the first agent in the list regardless of config, which confused multi-agent users about which agent handles unrouted messages - Added `isExplicitDefault` flag to `AgentHealthSummary` to distinguish between explicit `default: true` and implicit fallback-to-first Fixes #8947 ## Test plan - [x] `pnpm build && pnpm check && pnpm test` passes (207/207 tests) - [ ] `openclaw doctor` shows `(default)` only for the agent with `default: true` - [ ] `openclaw agents list` reflects explicit default correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR refines how “(default)” is displayed for multi-agent setups by distinguishing between the *effective* default agent (fallback-to-first behavior) and an agent explicitly marked with `default: true` in config. Concretely: - `AgentSummary` now includes `isExplicitDefault`, and `openclaw agents list` uses it to render the “(default)” tag. - `health` snapshots and `openclaw doctor`/health output now carry `isExplicitDefault` through `AgentHealthSummary` and use it when printing agent labels. - Tests were updated to assert explicit vs implicit default handling. Overall this aligns the CLI/UI labeling with config intent while preserving the existing `isDefault` semantics for routing behavior. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk. - Changes are narrowly scoped to labeling/summary output, preserve existing `isDefault` routing semantics, and add a separate `isExplicitDefault` signal that is only consumed in the updated output paths. No other parts of the repo reference these types, so API ripple is contained. - No files require special attention <!-- greptile_other_comments_section --> <sub>(5/5) You can turn off certain types of comments like style [here](https://app.greptile.com/review/github)!</sub> <!-- /greptile_comment -->

Most Similar PRs