Skip to content

Commit f866a93

Browse files
committed
Update README
1 parent 7069790 commit f866a93

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,9 +621,11 @@ func (m *MyAgent) buildPrompt(messages []agent.Message, isInitialSession bool) s
621621
var initialPrompt string
622622
var otherMessages []agent.Message
623623

624-
// Find orchestrator's initial prompt vs agent announcements
624+
// Find orchestrator's initial prompt (HOST) vs agent announcements (SYSTEM)
625+
// HOST = orchestrator's initial task/prompt (AgentID="host", AgentName="HOST")
626+
// SYSTEM = agent join announcements and other system messages
625627
for _, msg := range messages {
626-
if msg.Role == "system" && (msg.AgentID == "system" || msg.AgentName == "System") && initialPrompt == "" {
628+
if msg.Role == "system" && (msg.AgentID == "system" || msg.AgentID == "host" || msg.AgentName == "System" || msg.AgentName == "HOST") && initialPrompt == "" {
627629
initialPrompt = msg.Content
628630
} else {
629631
otherMessages = append(otherMessages, msg)
@@ -805,6 +807,9 @@ Now respond to the task above as AgentName. Provide a direct, thoughtful answer.
805807
3. **Context Separation**: System messages are clearly labeled and separated from agent messages
806808
4. **Consistent Structure**: All 7 adapters (Amp, Claude, Codex, Copilot, Cursor, Gemini, Qwen) use identical patterns
807809
5. **Structured Logging**: Comprehensive debug logging with timing, message counts, and prompt previews
810+
6. **HOST vs SYSTEM Distinction**: Clear separation between orchestrator messages (HOST) and system notifications (SYSTEM)
811+
- **HOST**: The orchestrator presenting the initial conversation task/prompt
812+
- **SYSTEM**: Agent join announcements and other system notifications
808813

809814
**Benefits:**
810815

0 commit comments

Comments
 (0)