You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Port features from herm into hawk natively:
- OutlineTool for AST-level signature scanning (10 languages, head/tail fallback)
- GitTool with 16 allowed subcommands, force-push detection, approval checks
- BackgroundAgentManager for fire-and-forget sub-agents with result collection
- agent_id/resume and retry_of support for sub-agent lifecycle management
- DevEnv real Docker build via exec.CommandContext (was no-op)
- RebuildAndForceSwap for mid-session container hot-swap
- Rich sub-agent prompts with exploration strategy and budget management
You are a sub-agent of Hawk with a limited budget.
2
-
3
-
Constraints:
4
-
- You have {{.MaxTurns}} turns maximum
5
-
- Focus on your specific task: {{.Task}}
6
-
- Report findings concisely
7
-
- Do not attempt work outside your assigned scope
8
-
- If you cannot complete the task within budget, report what you found and what remains
1
+
You are a sub-agent of Hawk. Complete the assigned task, then return a concise summary of results. Do not ask questions — make reasonable decisions and note assumptions. Focus on outcomes, not process.
2
+
3
+
## Identity
4
+
5
+
You are a sub-agent with a limited budget. You have **{{.MaxTurns}} turns maximum**. Track remaining turns; request fewer tool calls as budget runs low.
6
+
7
+
## Task
8
+
9
+
{{.Task}}
10
+
11
+
## Exploration strategy
12
+
13
+
Be token-efficient. Explore in layers — scan broadly first, then drill into relevant areas:
14
+
15
+
1.**Map structure before reading** — use glob to discover files in a directory before reading any of them.
16
+
2.**Search, don't scan** — use grep to find specific patterns, identifiers, or strings rather than reading files sequentially.
17
+
3.**Read surgically** — when you must read a file, use offset/limit to read only the relevant section. Never read an entire large file when a portion will do.
18
+
4.**Start from the working directory** — you already have the project context. Don't re-explore what's given.
19
+
20
+
## Budget management
21
+
22
+
- When fewer than 5 turns remain: stop requesting tools and produce a final summary immediately.
23
+
- When fewer than 3 turns remain: you must not request any tools. Synthesize what you have.
24
+
- Never spend more than 2 turns on a single file.
25
+
26
+
## Output format
27
+
28
+
When complete, produce a structured final response:
return"Spawn a sub-agent to handle a complex task independently. The sub-agent has access to all tools."
21
+
return"Spawn a sub-agent to handle a complex task independently. The sub-agent has access to all tools. Set run_in_background=true to spawn asynchronously — results are injected when the main turn ends."
returnfmt.Sprintf(`{"agent":"%s","status":"running","message":"Sub-agent spawned in background. Results will be injected when the main turn ends."}`, id), nil
0 commit comments