mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-18 03:27:08 +00:00
- Register spawn_peer once when Agent Team tools are on. Registering it in both the peer and team blocks made the MCP SDK throw on every request, so the whole hapi MCP surface answered 500 and team tools were unusable. The single tool now dispatches on `role` (team member) vs directory + message (plain peer). - Forward the team-scoped token through the runner's SpawnHappySession handler; it was dropped before HAPI_TEAM_TOKEN reached the child. - Re-attach team context when resuming a team session. Resume bypasses the spawn route, so a resumed member/lead lost HAPI_TEAM_ID (prompt block) and HAPI_TEAM_TOKEN even though it was still on the roster. - Log MCP request errors with name/message instead of the JSON-serialized empty object, which hid the duplicate-tool failure. via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run> Co-Authored-By: Claude Code <noreply@anthropic.com>