You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Entire's factoryai-droid hooks for PreToolUse and PostToolUse fail with exit code 1 on every invocation. This produces noisy error output in the Droid CLI on every tool call while Entire receives no data.
PreToolUse error:
HOOKS PreToolUse → Task
└─ Script: entire hooks factoryai-droid pre-tool-use
└─ Result : Exit code: 1
stderr:
failed to capture pre-task state: tool_use_id is required
PostToolUse error:
HOOKS PostToolUse → Task
└─ Script: entire hooks factoryai-droid post-tool-use
└─ Result : Exit code: 1
stderr:
failed to parse hook event: failed to parse hook input: json: cannot unmarshal string into Go struct field postToolHookInputRaw.tool_response of type struct { AgentID string "json:\"agentId\"" }
Impact on Droid Missions
This is especially painful during Droid Missions — Factory's orchestrated multi-subagent workflow feature. Missions spawn multiple parallel Task (subagent) tool calls, and each one triggers the failing PreToolUse hook. With a mission running 5-10+ subagents, this means:
10-20+ failing hook executions per mission cycle
Each failing hook adds latency to the already-parallelized workflow
The cumulative slowdown dramatically degrades the automated/agentic experience
The constant error output makes it hard to follow what the mission is actually doing
tool_response type mismatch: Entire expects tool_response to be a structured object with an agentId field (struct { AgentID string }), but Droid sends tool_response as a plain string (the raw tool output text). This causes the Go JSON unmarshal error.
What happened?
Entire's
factoryai-droidhooks forPreToolUseandPostToolUsefail with exit code 1 on every invocation. This produces noisy error output in the Droid CLI on every tool call while Entire receives no data.PreToolUse error:
PostToolUse error:
Impact on Droid Missions
This is especially painful during Droid Missions — Factory's orchestrated multi-subagent workflow feature. Missions spawn multiple parallel
Task(subagent) tool calls, and each one triggers the failing PreToolUse hook. With a mission running 5-10+ subagents, this means:For context, a typical mission cycle looks like:
Root cause
Two schema mismatches between what Entire expects and what Factory Droid provides in hook input JSON:
Missing
tool_use_id: Entire'spre-tool-usehandler requires atool_use_idfield, but Droid's PreToolUse hook input does not include it. This is the same issue documented for Claude Code at PostToolUse hook not sending tool_use_id field as documented anthropics/claude-code#13241 —tool_use_idwas never reliably sent by the agent platform.tool_responsetype mismatch: Entire expectstool_responseto be a structured object with anagentIdfield (struct { AgentID string }), but Droid sendstool_responseas a plain string (the raw tool output text). This causes the Go JSON unmarshal error.Droid's actual hook input format (v0.98.0)
Per Factory docs (https://docs.factory.ai/reference/hooks-reference), Droid sends:
PreToolUse:
{ "session_id": "...", "transcript_path": "...", "cwd": "...", "permission_mode": "...", "hook_event_name": "PreToolUse", "tool_name": "Task", "tool_input": { ... } }No
tool_use_idfield.PostToolUse:
{ "session_id": "...", "transcript_path": "...", "cwd": "...", "permission_mode": "...", "hook_event_name": "PostToolUse", "tool_name": "Task", "tool_input": { ... }, "tool_response": "<raw string output, not a structured object>" }tool_responseis a string, not an object withagentId.Steps to reproduce
entire enable --agent factoryai-droiddroidEntire CLI version
0.5.3
OS and architecture
macOS ARM64 (darwin/arm64)
Agent
Factory Droid (factoryai-droid)
Suggested fix
tool_use_idoptional in the PreToolUse parser — generate a fallback ID or skip the field when absenttool_responseas either a string or a structured object (union type /json.RawMessage) rather than requiring theagentIdstructtool_name+session_id+ timestamp instead of requiringtool_use_idAdditional context
tool_use_idnot sent by agent platforms).factory/settings.jsonproject settings (which is what I have had to do to make Missions usable)