Skip to content

plugin: learn from the calls a Claude Code subagent made - #332

Open
Saksham Uboweja (SakshamUboweja) wants to merge 2 commits into
microsoft:mainfrom
SakshamUboweja:pipeline/fix-E052
Open

Saksham Uboweja (SakshamUboweja) wants to merge 2 commits into
microsoft:mainfrom
SakshamUboweja:pipeline/fix-E052

Conversation

@SakshamUboweja

Copy link
Copy Markdown
Collaborator

Micro-skills never learned from the commands a Claude Code subagent ran.

  • Before: Claude Code writes a subagent's calls only to <session>/subagents/agent-*.jsonl. Micro-skills read just the main log, so a repository whose tests run inside subagents learned nothing from them.
  • After: the fold gives micro-skills the main log followed by its subagents' logs, the same files the ledger and tool pruning already read.
  • Unchanged: prompts and tokens are still read from the main log, so ledger numbers don't move. Sessions without subagents get the main log as before. The live loop guard still ignores subagent calls.

Test: tests/test_live_hooks.py::test_a_fact_is_learned_from_the_calls_a_subagent_made fails on main and passes with this change. Full suite passes.

Claude Code logs a Task subagent's calls only in <session>/subagents/*.jsonl, and the fold
gave micro-skills the session's own log, where there is just the Agent call. The ledger and
tool pruning already read the subagent logs (claude_subagent_files). ClaudeCode now gives the
mechanisms the session's log followed by its subagents' logs, as docs/PLUGIN.md says: their calls
are counted with their session.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants