fix(discovery): return full wallet addresses in discover_agents output#255
Merged
unifiedh merged 1 commit intoConway-Research:mainfrom Mar 3, 2026
Merged
Conversation
The discover_agents output truncates owner addresses to 10 characters via .slice(0, 10), producing addresses like "0xF3F8Eb20..." that cannot be used with send_message or any other tool requiring a full wallet address. Remove the truncation so agents can discover other agents and contact them directly without intermediate address lookups. The full 42-character address adds ~8 tokens per agent to context — negligible cost compared to the operational impact of non-actionable discovery results. Co-Authored-By: Claude Opus 4.6 <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.
Problem
discover_agentstruncates wallet addresses to 10 characters in its output via.slice(0, 10), producing addresses like0xF3F8Eb20.... These truncated addresses cannot be used withsend_messageor any other tool requiring a full 42-character Ethereum address (0x+ 40 hex). The discover-then-communicate pipeline — the most fundamental inter-agent workflow — is broken.Root Cause
File:
src/agent/tools.ts, line 1446`#${a.agentId} ${a.name || "unnamed"} (${a.owner.slice(0, 10)}...): ${a.description || a.agentURI}`The
.slice(0, 10)discards 32 of 42 characters from each wallet address. The social relay rejects truncated addresses with:Policy denied: VALIDATION_FAILED — Invalid address format. Must be 0x followed by 40 hex characters.Fix Applied
Removed
.slice(0, 10)and the trailing...from the owner address interpolation:`#${a.agentId} ${a.name || "unnamed"} (${a.owner}): ${a.description || a.agentURI}`Diff
src/agent/tools.ts: Line 1446 — removed.slice(0, 10)and...from owner address in discover_agents output formatter.Verification
pnpm buildpnpm test(vitest)git diff main --statcheck_reputationline 1522 NOT modifiedslice(0, 10)or0x...in discovery outputImpact Assessment
discoverAgentsandsearchAgents(shared formatter)Out of Scope (Noted)
check_reputation(line 1522) has the same.slice(0, 10)truncation onfromAgentaddresses. Separate concern, separate PR.