Skip to content

fix(cli): accept agent_id and skip registration on empty id - #79

Merged
bfirestone merged 1 commit into
mainfrom
fix/agent-register-id
Sep 3, 2026
Merged

bfirestone merged 1 commit into
mainfrom
fix/agent-register-id

Conversation

@bfirestone

@bfirestone bfirestone commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

The PostToolUse hook pipes every Agent tool result into arc ai agent register --stdin. That command read the agent id only from tool_response.agentId. Named (addressable) agents report agent_id in the form name@session-xxx instead, and background launches report no id at all. Both cases sent an empty id and the server answered 400 "id is required" once per dispatch.

The payload struct now reads both spellings, with agentId taking precedence. When neither is present the command returns 0 without calling the server. That matches the existing silent skip for non-Agent tools and unresolvable projects.

Named agents report their id as agent_id and background launches report none. The register hook only read agentId, so both cases sent an empty id and the server answered 400 "id is required" on every dispatch.

Claude-Session: https://claude.ai/code/session_017tBKU2TAsU96uYChRGWhhq
@bfirestone
bfirestone merged commit c37b75c into main Sep 3, 2026
4 checks passed
@bfirestone
bfirestone deleted the fix/agent-register-id branch September 3, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant