09-talk-helpers: handle flat-array JSON from openclaw 2026.5.20+#1
Open
teddashh wants to merge 1 commit into
Open
09-talk-helpers: handle flat-array JSON from openclaw 2026.5.20+#1teddashh wants to merge 1 commit into
teddashh wants to merge 1 commit into
Conversation
`openclaw agents list --json` now returns a top-level JSON array rather than
`{"agents":[...]}`. The old jq filter `.agents // [] | …` silently returned
empty on the new format, triggering the "fall back to defaults" path so only
talk-main / talk-maintainer / talk-hermes were generated — any newly added
subagent (e.g. peach1-network-setup) got no shortcut.
New filter accepts both shapes:
(if type == "array" then . else (.agents // []) end)
Should be PR'd to upstream openclaw-hermes-watcher.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
scripts/09-talk-helpers.shsilently falls back to a hardcoded default agent list (main,hermes-maintainer) on OpenClaw 2026.5.20+ becauseopenclaw agents list --jsonnow returns a top-level JSON array rather than the older{"agents":[…]}shape. The current jq filter.agents // [] | …evaluates to empty against the new format, triggering the "Could not parse — falling back to defaults" warn path. Result: any newly registered subagent (e.g. project subagents added viaopenclaw agents add) gets notalk-*shortcut.What this PR changes
One-file fix in
scripts/09-talk-helpers.sh. The jq filter now accepts both shapes:Also bumps the default fallback
agents_jsonfrom'{}'to'[]'so the new filter handles the no-CLI case gracefully.How I hit this
Discovered while standing up a new peach1 install (third node alongside vnic + castle1). After running
scripts/all.sh, the freshly registered project subagentpeach1-network-setuphad notalk-shortcut. Investigating turned up the silent jq fallback. Fix has been running on the peach1 fork (teddashh/openclaw-watcher-peach1@5259b46) —talk-peach1-network-setupnow generated correctly alongsidetalk-main/talk-maintainer/talk-hermes.Test plan
openclaw agents add foo --workspace /tmp/foo --non-interactive), then runbash scripts/09-talk-helpers.sh, confirm~/.local/bin/talk-foois created instead of the warn + default fallback.agents list --jsonreturns the old shape: confirm the script still works (filter is backwards-compatible via thetype == "array"branch).openclawisn't on PATH (graceful fallback via the post-filter[ -z "$agent_names" ]check).🤖 Generated with Claude Code