chahinebrini d00f2812f9 feat(autostart): agenthub agent setup — SessionStart hook enters the work loop
Closes the dormancy gap: an agent no longer needs to be told "call agenthub_work".
`agenthub agent setup --agent <name> --role <role>` writes a verified Claude Code
SessionStart hook (.claude/settings.json) whose command runs `agenthub hook-context`,
which prints the work-loop instruction injected into every new session — so the
agent claims tasks AND surfaces messages from the first turn, no manual trigger.

- agentSetup.ts: agentSetup() (idempotent hook write, project or --user scope) +
  hookContext() (the injected instruction).
- Honest limit (per Claude Code docs): SessionStart context is a strong nudge the
  model reads, not a hard directive; the guide reinforces it. Can't block startup.
- Codex/Kimi aren't Claude Code — their guide already nudges agenthub_work first.

Run once per agent machine. Bump 0.8.1 -> 0.9.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 04:57:30 +02:00
..