Repository navigation
feat(agents): expose configured descriptions in agents_list - #75225
shannon0430 wants to merge 51 commits into
Conversation
|
Codex review: blocked before merge. What this changesThis PR adds bounded configured descriptions to authorized agents_list results. Example: The allowed research agent has description " Finds and synthesizes evidence ".
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains This PR remains a focused implementation of missing discovery behavior, with no actionable code defects found; maintainer acceptance of existing-description visibility remains unresolved. Reviewed head: Decision needed
Before merge
FindingsNone. Agent review detailsHow this fits togetherThe built-in discovery tool reads configured agent entries and existing spawn-target policy, then returns ordered agent metadata to the requesting model. flowchart LR
A[Agent configuration] --> C[Agents list tool]
B[Spawn target policy] --> C
C --> D[Description text budgets]
D --> E[Authorized agent results]
E --> F[Requesting model]
Technical reviewBest possible solution: Retain the existing discovery owner and bounded projection, subject to an explicit decision on exposing descriptions configured before upgrade. Do we have a high-confidence way to reproduce the issue? Current main accepts agent descriptions but omits them from the discovery schema and returned entries; the contributor also records five failing focused cases with main's implementation and eleven passing cases with the candidate. Is this the best way to solve the issue? Extending the existing on-demand result is a small, coherent implementation that reuses roster policy and text-budget helpers without adding an automatic prompt catalog. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 153168fd09e4. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +38, Tests +285, Docs +6, Other +4. Total +333 across 10 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (36 earlier review cycles; latest 8 shown)
Reviewed November 29, 2026, 8:35 AM ET / 13:35 UTC (Revision 37). |
|
Updated to address the docs gap from ClawSweeper. Changes made on latest head
Validation: pnpm exec oxfmt --check --threads=1 docs/gateway/config-agents.md docs/tools/subagents.md
pnpm config:docs:check
pnpm exec vitest run src/agents/openclaw-tools.agents.test.ts src/agents/tools/agents-list-tool.test.ts src/config/zod-schema.agent-defaults.test.ts src/config/schema.test.tsAll passed locally. |
|
CI looks flaky on the latest head rather than related to this docs/config-agent change. Current head: The remaining red check is from I reran the named test locally on this head and it passed: pnpm exec vitest run --config test/vitest/vitest.ui.config.ts ui/src/ui/navigation.browser.test.tsResult: 1 file passed / 11 tests passed. Could a maintainer please rerun the failed CI job for this PR? |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Triage update after the stale marker: This PR is still relevant, but it is now partially superseded by current Checked current
So the request from #7490 is not fully shipped yet: config parsing is partly handled, but runtime discovery still cannot see each agent's configured description. The right next action is not to close this as stale/obsolete; it is to refresh or replace this PR with a smaller patch focused on:
The current branch is also |
fe1abe0 to
2248576
Compare
|
Refreshed this PR against current Current head: What changed now:
Local validation on the refreshed branch: pnpm exec oxfmt --check --threads=1 src/agents/tools/agents-list-tool.ts src/agents/tools/agents-list-tool.test.ts src/agents/openclaw-tools.agents.test.ts docs/tools/subagents.md docs/gateway/config-agents.md test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/discord-group-codex-message-tool.md test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-direct-codex-message-tool.md test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-heartbeat-codex-tool.md
pnpm exec vitest run src/agents/openclaw-tools.agents.test.ts src/agents/tools/agents-list-tool.test.ts
pnpm prompt:snapshots:check
pnpm config:docs:check
node scripts/run-oxlint.mjs src/agents/openclaw-tools.agents.test.ts src/agents/tools/agents-list-tool.ts src/agents/tools/agents-list-tool.test.tsResults:
GitHub now reports the PR as |
|
Follow-up on the failing
Local validation after the fix: |
e366fe7 to
4fa2de5
Compare
…-20261114 # Conflicts: # test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/discord-group-codex-message-tool.md.diff # test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-direct-codex-message-tool.md
|
Integrated pinned current Current-head verification passed: all six prompt snapshots are current, the focused @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
# Conflicts: # test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/discord-group-codex-message-tool.md.diff # test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-direct-codex-message-tool.md
|
Integrated pinned current Exact head: Focused exact-head proof: 11 @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Resolved the actual prompt-fixture conflicts in For the red-on-base gap noted in the current review: the same 11 tests with official main's implementation fail in 5 cases (6 pass), then all 11 pass after restoring the PR implementation. Restoration was byte-checked. This supplements the focused regression evidence; it does not claim native Gateway/provider/delivery acceptance or maintainer adoption. The latest PR description retains those scope limits. |
|
Current exact head remains The branch comment and PR description already record the canonical prompt regeneration plus red-on-base evidence: the same 11 focused tests fail 5 cases with main's implementation and pass all 11 with the PR implementation. No authored feature or test code changed in that integration. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Updated the focused evidence for @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Validated the current exact head
The remaining product adoption decision is unchanged. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Agent configuration accepts descriptions, but
agents_listomits them. A requester choosing an allowed subagent cannot see the operator-authored capability summary. Fixes #7490.Why This Change Was Made
Expose bounded, nonblank descriptions only in on-demand discovery. Preserve the complete authorized roster, ordering, resolved model/runtime metadata, and existing child-agent restrictions. Each description is limited to 512 UTF-16 units without splitting a surrogate pair, with a shared 4096 CJK-aware weighted-unit budget. Later description text may be shortened or omitted; agent rows remain.
User Impact
Names, descriptions and existing model/runtime metadata remain available together. Documentation at the current per-agent-entry and subagent-discovery owners describes model visibility and excludes secrets or tenant-sensitive material. There is no new configuration, authorization, persistence, provider, or automatic prompt-roster mechanism.
Existing nonblank descriptions would become model-visible to already-authorized discoverers after upgrade without an operator editing configuration. That disclosure choice requires the maintainer decision below; the spawn allowlist alone does not establish prior operator expectations.
Evidence
Current conflict integration - 2026-11-07
Current head:
750690e3c9433c1df8af5419617893664d95e44b; previous head:a35853664c4ac3d9f1941f90200e93fbea9baa27; pinned official main:aa75d20870ac22affa7c94975210c8ad8b5e4efa.GitHub and the native merge both confirmed a real generated-file conflict. This ordinary merge resolves it through the existing generator. The native prompt-snapshot owner regenerates and verifies all six outputs. Its seven-case owner test passes. All seven authored production, test, allocation and documentation inputs remain byte-identical to the previously accepted head. Only generated snapshots/catalogs changed; the agents_list description is retained. Earlier behavioral and native Gateway evidence retains its measured scope.
The exact prepared-base test-line ratchet and whitespace checks pass. Counter: Test lines OK: 6563185; ceiling: 6563189; slack: 4. Shared budgets, allocations, assertions, timeouts and behavior are retained. Resolved output passes the publication secret gate; unchanged authored inputs retain prior reviewed proof. This mechanical integration does not require a new behavioral review.
The first native CI 42374591897, attempt 1, completed SUCCESS on this exact head: 48 successful jobs, 27 skipped, no failed or pending job. All three required statuses (CI gate, dependency review and security-sensitive review) are SUCCESS on this head. Earlier successful runs remain prior-head evidence. No workflow rerun, duplicate review request or adoption ping was submitted. Maintainer product adoption, official distribution and employee acceptance remain separate.
Earlier validated author head:
02db206611aaf040ab37ea819889b8264483914b. It normally merges CI-green head1c771bb8with official main0372963434f6a0b79394dbe330abde2ae34f2a89to resolve one new generated Discord-delta conflict that arose while the prior CI was running.556aa634merged repaired headce374565with main4c35e950and resolved two fixtures; it passed 34 focused tests / 3 files and the six-artifact check. The current merge resolves only the later Discord delta, passes 13 snapshot-owner tests and the canonical six-artifact check, and has an independent generated-resolution review plus zero-finding secret gate.ce374565, including removal of the retired heartbeat setting. The two corrected subagent fixture files are byte-identical to CI-green1c771bb8. No production behavior, authorization, assertion, timeout or CI routing was changed by these integrations.556aa634exposed the existing subagent progress fixture: it expected optional external silence from a public completion cohort. The exact same-order Bun file replay reproduced 1 failed / 25 passed; it was not dismissed as a flake. The correction binds the current requester incarnation as native spawn does and chooses private/parent completion for that optional-silence case. Production public/internal visible-reply requirements and every retire-count assertion are preserved.1c771bb8: 26 / 26 same-order Bun tests passed, plus the exact case passed separately. Type-aware lint, format, diff check, independent parent review, fresh scoped Codex review and zero-finding secret gate passed. The private review snapshot is not a public ancestor.1c771bb8completed SUCCESS: 83 jobs, 56 successful / 27 skipped / zero failed, including the real Gateway E2E and previously failing fixture lane. All current checks and both ci-gate contexts were terminal success/skip/neutral. That success is attributed to its own head; later main introduced the new generated conflict now resolved above.39910370654completed SUCCESS on02db2066: 81 jobs, 54 successful / 27 skipped / zero failed. Gateway E2E, the corrected fixture lane, UI, types, lint and both ci-gate contexts passed. Latest-check readback: 75 success / 52 skipped / 1 neutral, zero failure or pending. An older PR-context attempt was cancelled and superseded by its successful current attempt; it is not a product CI failure. Prior local Gateway proof atce374565and earlier failed/cancelled/successful heads remain historical evidence.d3359fe448d37a56e4f9e38451832e6088f4842eat 2026-10-23 06:26:52 UTC returned exit0 / zero conflicts. No freshness-only merge was made. No new post-push review request or non-author comment was present at final review readback.Prior validation (historical)
Current author head:
bb51672d391105ad3b06ae1336ce1c1d1f5ee97e. Integrated official main79262d0571694dbf083b7d1bf5a206cc8fb93936with an ordinary merge to resolve the named cached-title CI failure. It contains the adopted repairs #178510 and #178474. The existing feature patch is preserved; earlier validation below is attributed to prior headf729bed82a2cbe2419ecfe49d0d913fd11caac58.for...ofassertions; no assertion changed.extensions/qa-lab/src/agents-list-descriptions.e2e.test.ts.auto/implicitdiscovery metadata remain intact.labelcleanup option in the new proof (TS2353). It is removed; the canonicaltest/tsconfig/tsconfig.extensions.test.jsonnow passes. This does not change runtime cleanup or assertions. Prior-head CI 39421952171 completed. Canonicalcheck-test-types, all five core-test type shards and the other product/static/test leaves succeeded. The only failed leaf is UI cold-load case 118626035515, plus its dependent aggregate. It is the same intermittent failure recorded on official main6a2e9a1f9ea002b14e2847e8ca89e2b90c37f59d, main job 118557975798:expected 'New session' to be 'Synthetic cold-load conversation'. No new or unclassified failed leaf remains.Captured public Gateway proof output
The following is the captured stdout from the existing successful Gateway run, copied with ANSI escapes and duplicate reporter lines removed. It is not a newly generated result summary. Only fixed proof fields and the test result are retained; no credential, endpoint, IP address, configuration dump, or conversation text is included. The HTTP response bodies were not separately saved. The committed scenario's assertions check the exact full/restricted agent IDs, bounded description strings, omitted fields and metadata before emitting
AGENTS_DESCRIPTION_PROOF.The capture precedes the final removal of an unused unsupported cleanup label option. That one-line type fix leaves production code, response assertions and runtime cleanup unchanged; the current-head canonical test-type gates pass. This capture claims the compiled candidate tree's public Gateway behavior, not an employee runtime or official package upgrade.
Reproduce the public entry proof after installing dependencies:
Current mechanical integration (2026-11-18)
Exact head:
bb9061c336b0a97619502dca6da8ede1badc9618. Integrated pinned officialmainf7c6804343843245d8ab6f37a91675ecc257a7b9with a normal merge. The two conflicting prompt snapshots were regenerated bypnpm prompt:snapshots:gen; the focusedagents-list-tool.test.tssuite passed on this tree. The authored implementation and behavior contract remain unchanged. The PR difference against the pinned main and the commit message passed secret and whitespace gates. An unchanged upstream changelog whitespace diagnostic is outside this PR's authored difference.Previous live/product proof remains limited to its recorded head and scope. Current-head native CI and maintainer adoption are separate; no workflow approval or duplicate hosted re-review was requested for this mechanical integration.
Remaining Maintainer Decision
Should bounded operator-authored descriptions become model-visible within existing authorized discovery, including descriptions configured before upgrade? This branch makes that narrow proposal ready to assess; it does not assume approval.
#148757 also overlaps discovery and adds a prompt roster. Please choose one implementation owner. This PR keeps on-demand discovery separate from automatic prompt injection and does not add that broader behavior.
Adopted official cached-title repair and prior integration
The title repair is adopted upstream through #178510 (
58c3f35e0e1894bc837871e5ca58b47be78031f2) and #178474 (fe739f62fcfa1f91dfaa25f7a710292da190822c). Duplicate #178478 is closed and #178470 is resolved. This branch consumes those official main commits; it adds no separate UI patch.The feature patch-id is unchanged across this merge. The full-index feature diff and all 10 feature file contents are byte-identical to the prior validated head. 14 focused integration tests passed; applicable prior canonical review and real-owner proof are retained. On the same official UI sources, the original synthetic cached-tail Chromium case passed with en-US/CPU4 (6.831 s case, 21.85 s wrapper), retaining the official pending-hydration/first-title assertions and the original title/scroll checks. Local diagnostic setup was restored exactly after testing. No assertions, timeout, CI routing or runtime configuration were changed by this contribution.
Prior integration CI: 39469313363 completed SUCCESS on
bb51672d391105ad3b06ae1336ce1c1d1f5ee97e: all 83 jobs terminal, 57 successful / 26 skipped / 0 failed. All eight UI E2E shards and finalopenclaw/ci-gatepassed. No additional feature or private runtime correction was needed.Current agents_list integration and proof scope
Current published head
ee264d4ea5b3252ddb51898dde5ed1aec7ae5442, treea4bb784548cc50b8cb2f0440110442ec00dc97d2, official integration basea6c11850723c4c47fa30eba37d7a58dff9ef8ec4.Integrate only minimal official cap ownera6c11850723c4c47fa30eba37d7a58dff9ef8ec4 (#185886), resolving sole actual scalar conflict while retaining6300000. No new budget mechanism, unmerged proposal head or whole latest tip merge.25 feature/caller/generator/golden/mock inputs unchanged,3 mock owners official-exact;162 prior focused cases and applicable canonical/lint/format proof reused. Official lock only changed UI Mermaid-to-Pele graph; independent owned frozen install passes, root test importer unchanged. Fresh types and staged counter pass:6287428 total,12572 bounded slack. Comparator/growth/assertions unchanged. Full-candidate immutable P0-P2 review scoped-clean/findings0; diff/gitleaks clean. Frozen candidate modeled against fixed32679f5ac9f9e429673364a87421b51a232c5d8f:exit0/conflicts[], basea6c. Source model is not hosted CI acceptance. Owned proof draft updated and93bb native historical only. No reflex native/canonical/large proof rerun, private package/product repair or runtime effect. Parent retains publication and exact-head hosted CI/review.
The three duplicate mock/ACK fallback changes are retired in favor of official #185840 source. Earlier93bb native before/after cases remain historical cause evidence; they are not claimed as whole-current-tree native proof. Current feature assertions, authorization boundaries and canonical generated fixtures are qualified by the recorded unchanged input bindings, focused integration checks and this head's CI. No assertions, comparison rules or scope guards were weakened.
This exact published head subsequently passed hosted CI and additional review; old-head failures remain historical, not relabeled success.
{"currentHeadHostedCi": "success"}Current main integration — 2026-10-27
Resolved the single shared-budget conflict by integrating official ancestor a6c, retaining the documented6300000 proposal (#185911). Feature, caller, prompt/golden and official #185840 mock/ACK inputs remain byte-identical across25 bindings;162 prior focused cases and canonical/lint/format proof are reused within that scope. The official renderer lock change was reconciled by a frozen install, with the selected root importer unchanged. Current targeted types, staged counter (6287428/6300000), fixed32679 merge model and immutable independent P0-P2 review pass. Prior93bb native evidence remains historical. No assertions or authority boundaries were weakened.
Integration base:
a6c11850723c4c47fa30eba37d7a58dff9ef8ec4. Current PR head:ee264d4ea5b3252ddb51898dde5ed1aec7ae5442.This exact head passed the hosted CI gate, including dependency and security-sensitive review. All current check lanes completed without failures. Previous-head results are not counted as this head's CI proof.
The existing maintainer adoption decision remains open. No downstream runtime or modified package was distributed.
Validation refresh (2026-11-15)
Merged official main
2e1b61901c5d139dd4b40e00eb3ca326a0ef9b89normally and resolved both prompt-fixture conflicts with the canonicalgenerate-prompt-snapshots.ts --write, followed by--check. Feature implementation and its test file remain byte-identical to08bc752d6f6422e7a1676dea466a9e949fa4aed4.Added the missing red-on-base evidence without changing the tests: with official main's
agents-list-tool.ts, the current 11 tests produced 5 failures and 6 passes; restoring the candidate implementation produced 11 passes. The original implementation was restored and its bytes verified before committing. This is owning-tool and generated-fixture evidence, not a native Gateway, provider, or delivery claim. Native CI for the new head still requires its own readback.Current upstream integration
Merged upstream main
8802e8885de1into4efba7e93935. Regenerated the prompt snapshots. The roster and prompt-snapshot suites passed. Hosted CI awaits maintainer approval (0 jobs).