From 7fbb42c26aeeb559ea32fc9c61a43604166d53a2 Mon Sep 17 00:00:00 2001 From: ztimson Date: Tue, 4 Aug 2026 12:03:31 -0400 Subject: [PATCH] improved subagent instructions --- src/llm.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/llm.ts b/src/llm.ts index 2a3ef9a..95aa258 100644 --- a/src/llm.ts +++ b/src/llm.ts @@ -9,6 +9,8 @@ import {dirname, join} from 'path'; import {spawn} from 'node:child_process'; import {Memory, MemoryCache, MemoryManager, MemoryOptions} from './memory.ts'; +const MAX_AGENT_DEPTH = 5; + export type AnthropicConfig = {proto: 'anthropic', token: string}; export type OpenAiConfig = {proto: 'openai', host?: string, token: string}; @@ -104,8 +106,6 @@ export type Skill = { content: string; } -const MAX_AGENT_DEPTH = 5; - class LLM { private memoryManager!: MemoryManager; @@ -143,7 +143,7 @@ class LLM { const start = Date.now(); const request = this.ask(`${args.instructions}${args.context ? `\n\n${args.context}` : ''}`, { - system: `You are a specialized subagent. ${a.delegate ? 'Your output streams directly to the user for the remainder of this turn.' : 'You are wrapped in a tool call that will be analysis by an LLM'} + system: `You are a specialized subagent. ${a.delegate ? 'Your output streams directly to the user for the remainder of this turn. You are mid conversation - dispense with greetings.' : 'You are wrapped in a tool call that will be analysis by an LLM - dispense with conversation'} As a subagent, focus on executing your task completely using available tools and returning only the final result - no commentary, questions, or dialogue. ${a.system}`,