Skip to content

fix(hooks): inject condensed instructions on SubagentStart#615

Open
arimu1 wants to merge 2 commits into
DietrichGebert:mainfrom
arimu1:fix/597-subagent-condensed-instructions
Open

fix(hooks): inject condensed instructions on SubagentStart#615
arimu1 wants to merge 2 commits into
DietrichGebert:mainfrom
arimu1:fix/597-subagent-condensed-instructions

Conversation

@arimu1

@arimu1 arimu1 commented Jul 19, 2026

Copy link
Copy Markdown

Summary

  • SubagentStart previously injected the full mode-filtered SKILL.md via getPonytailInstructions (~5k+ chars).
  • Subagents now receive getSubagentInstructions() — the condensed getFallbackInstructions path (independent modes keep their short pointer string).
  • Keeps Task-worker context smaller while preserving the same lazy-senior ruleset.

Fixes #597

Test plan

  • Node load of ponytail-instructions / compare lengths: condensed < full for mode full
  • Install branch locally, spawn a Task subagent with ponytail active, confirm injected context is the condensed banner rather than full SKILL.md

Made with Cursor

Subagents now receive getFallbackInstructions instead of the full
mode-filtered SKILL.md, keeping Task-worker context smaller.
Fixes DietrichGebert#597
@huda-code

Copy link
Copy Markdown

Hi @arimu1, I added automated test coverage for the requirements discussed in #597.

The test commit is 8110543, and the full test suite passes locally:

  • Root suite: 82 passed, 0 failed
  • Pi extension: 23 passed, 0 failed
  • Ponytail MCP: 3 passed, 0 failed

The tests verify the condensed SubagentStart payload, independent modes, matched and nonmatching agent behavior, fail-open cases, and the Claude, Codex, and Qoder paths.

Could you please cherry-pick the commit into this PR?

git cherry-pick 8110543

I closed #622 because it was accidentally opened against main and duplicated this implementation PR.

@arimu1

arimu1 commented Jul 20, 2026

Copy link
Copy Markdown
Author

Thanks @huda-code — cherry-picked 8110543 (test(hooks): cover condensed SubagentStart payload) into this branch. Root suite + pi-extension + ponytail-mcp all green locally.

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.

SubagentStart always sends the full SKILL.md — reuse the shipped condensed fallback for subagent workers

2 participants