Skip to content

[bug] Agent stubs filled mid-session never take effect: subagent definitions are loaded at session start #830

Open

Description

@MendixMau

Found in simulated builds on 2026-11-21 (10 runs on master, real claude -p agents, fresh init-project.sh scaffolds).

What happens: build-ready FAILs on {{…}} placeholders in .claude/agents/*.md (bin/gate-check.sh ~:2527, 9 of 10 runs). Agents fill the stubs mid-session to pass it — but Claude Code loads subagent definitions at session start, so the subagents they then dispatch still run the unfilled stub and refuse (bin/init-agents.sh:67-68). 3 of the 4 runs that dispatched subagents reported this. The gate forces work whose result the session cannot use.

Value: M — wasted turns plus a refusal loop in any session that both fills and dispatches.

Options (DISCUSS):

  1. Fill agent stubs during kickoff (before the build session starts), never mid-session — tell the agent to restart the session after filling.
  2. Stubs read their project-specific values from a file at run time (e.g. PROJECT.md sections) instead of placeholders baked into the definition.
  3. Related: draft PR fast lane: cut pre-build ceremony (#819, #821) #828 commit C makes the placeholders a WARN (held for the maintainer's ruling).

Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions