Improve delegate (#377)

* Improve delegate

* fix stale log regexes in delegate tests and add test-coupling comments

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Colin McDonnell
2026-02-23 23:41:27 +00:00
committed by pullfrog[bot]
parent a7bd746f21
commit 2017922780
30 changed files with 853 additions and 522 deletions
+2 -2
View File
@@ -41,8 +41,8 @@ function validator(result: AgentResult): ValidationCheck[] {
const hasFilesFound = setOutputCalled && /FILES_FOUND=true/i.test(output ?? "");
const countMatch = output ? /COUNT=(\d+)/i.exec(output) : null;
const hasFileCount = countMatch !== null && parseInt(countMatch[1], 10) > 0;
const askQuestionUsed = /» ask_question subagent=/i.test(agentOutput);
const delegationOccurred = /» delegating subagent=/i.test(agentOutput);
const askQuestionUsed = /» ask_question "/i.test(agentOutput);
const delegationOccurred = /» delegating \d+ task/i.test(agentOutput);
return [
{ name: "set_output", passed: setOutputCalled },