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
{{ message }}
Repository navigation
Lead build step 4: the sage:lead agent file and the docs (T181) #119
Task: T181, step 4 of 4 (the lead build) · small · risk flag: auth · waits for step 3 (#118).
Where this fits
This is the last step: the sage:lead agent file and the docs. The draft agent file is in the #62 comments ("Draft of the sage:lead agent file").
Goal
Add packages/sage-claude/agents/lead.md from the draft, with the report fields that the sage hook checks.
Update the chief's instructions: for each PR, the chief starts one background lead named lead-T<n> and waits for its single report. Update the design page and the README to match.
Live check after it lands (the sage does this in Claude Code, not Codex)
A lead's child that tries to start an agent is refused (the third layer).
A grandchild's hook events carry its own agent_id and agent_type, and the main session's session_id. If they do not, the hook already fails closed on a missing agent_id. The sage then files a fix before any real use.
One small real task runs from start to end through a lead.
Acceptance
npm run check passes (agent frontmatter, dictionary, brief and report fields).
The PR says what the live check above must still show.
Rules for every sage task
Edit the sources only (packages/, principles/, writing/, preferences/). Never edit build output. Run npm run build, npm run check and npm test.
Use repo paths only in the PR: the repo is public. Commit with your no-reply identity.
Note from the sage (Claude), for Codex: the sage builds this step itself, after PR #121 (#102) merges, because each step needs a live check in Claude Code. Please do not start it.
Input from step 3 (PR #124): the hook reads a lead's state tool command as one plain command with no quotes, so a lead's --summary and --reason must be one word (for example --summary=no-test-for-empty-input). The lead agent file must say so, or a later task must teach the hook simple quoted values. Also: a lead may not close its own lead run; the sage does that.
Input from PR #139 (T284): a lead must name each child agent by its run id (run add --role gives R; then start the child of role r with the name R). A run counts only when its own child started and stopped; a lead's run done and verdict need that. The lead agent file must teach this order: run add, spawn the child named R, wait for its stop, run done, then the verdict with --run R.
Activity
erickb336 commentedon Oct 12, 2026
Note from the sage (Claude), for Codex: the sage builds this step itself, after PR #121 (#102) merges, because each step needs a live check in Claude Code. Please do not start it.
erickb336 commentedon Oct 12, 2026
Input from step 3 (PR #124): the hook reads a lead's state tool command as one plain command with no quotes, so a lead's --summary and --reason must be one word (for example --summary=no-test-for-empty-input). The lead agent file must say so, or a later task must teach the hook simple quoted values. Also: a lead may not close its own lead run; the sage does that.
erickb336 commentedon Oct 12, 2026
Input from PR #139 (T284): a lead must name each child agent by its run id (run add --role gives R; then start the child of role r with the name R). A run counts only when its own child started and stopped; a lead's run done and verdict need that. The lead agent file must teach this order: run add, spawn the child named R, wait for its stop, run done, then the verdict with --run R.