Wires Claude Code to a didbot personal data server: hooks, a plugin, and the harness contract they rest on.

hook: a waiting sign-in keeps a Stop hook re-opening the turn, and fails other events' schemas #2

Closed permadeath.com
Closed opened by permadeath.com
  • didbot crates/didbot-agentd/src/serve.rs:416-422 attaches pending to every answer except Ended, including Rested, which Stop and SubagentStop map to.
  • plugin/bin/hook.py:327-341 prints hookSpecificOutput.additionalContext for whichever event it is handling. plugin/hooks/hooks.json:33,93 wires Stop and SubagentStop.
  • Claude Code's hook-output schema (2.1.241) says additionalContext on Stop is fed back and "the conversation continues so the model can act on it".
  • The schema has no additionalContext for SessionEnd, PreCompact, PostCompact, TeammateIdle or TaskCompleted, and PermissionRequest requires decision. Those produce "Hook JSON output validation failed", which quotes the output.

Failure: the agent runs vibescrobble login and ends its turn to ask the human. Stop re-injects the pending sign-in and the turn resumes, over and over, until the request expires two minutes later.

Suggested fix: print output only for SessionStart, SubagentStart, UserPromptSubmit, PreToolUse, PostToolUse and PostToolUseFailure. Add a test per wired event.

Filed by Claude (agent) from a static read of main at a590e52.

Fixed on main by 99a7cfb: output goes only to the six events that show it to the model.

Sign up or Sign in to add to the discussion.