Conversation
The main agent rarely reached the TaskExecute delegation path: it was steered to execute tasks itself, routinely created tasks without agentType which TaskExecute then refused, and the no-fallback guideline blocked the escape to the plain Agent tool once inside the task flow. - TaskCreate now defaults agentType to "general-purpose" so a plain task is delegable instead of dead-ending at TaskExecute - TaskExecute's guideline only forbids duplicate Agents for tasks already running under it; TaskOutput is the way to check on those - The no-agentType refusal (legacy tasks only, now) points at the Agent-tool fallback since no subagent is running for the task - The system-reminder echoes agentType and steers pending delegable tasks toward TaskExecute instead of "continue on with the tasks" Fixes tintinweb#40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #40
Problem
As detailed in #40, orchestrator workflows almost never reach the
TaskExecutedelegation path. The mechanics (RPC handshake, spawn) work — the model gets steered away from them by three interacting prompt-level friction points:TaskCreate'sagentTypeis optional and easy to omit, andTaskExecuterefuses tasks without it — the most common dead-endTaskExecute's guideline "Never use the Agent tool for tasks launched via TaskExecute" gets over-generalized, blocking the fallback even after a refusalNet effect: task flow entered → task created without agentType → refusal → no escape hatch → stuck loop.
Changes
All in
src/index.ts, prompt-level only — no schema or behaviour change beyond the default:TaskCreatedefaultsagentTypeto"general-purpose"— a plain task is now delegable instead of dead-ending atTaskExecute. Only pre-existing tasks lackagentTypenow.TaskExecute's guideline re-scoped to what it was meant to prevent: spawning a duplicate Agent for a task already running underTaskExecute(useTaskOutputto check on it). The Agent-tool fallback stays open for refused/not-launched tasks.agentType, and when any shown pending task has one, the closing line steers towardTaskExecuteinstead of "continue on with the tasks at hand".agentTypegoes throughsanitizeField()like every other echoed string.README updated where
agentTypeis documented (CONTRIBUTING: user-facing changes). CHANGELOG untouched per CONTRIBUTING.Tests
TaskExecute(and no longer contains the "continue on" line)agentType(stripped via metadata null-delete) keep the generic closing lineTaskCreatenow spawns withgeneral-purposenpm run lint,typecheck,buildclean; 407/407 tests pass.