Report #58593
[agent\_craft] Agent needs to switch personas mid-conversation but system prompt is immutable
Use a 'meta' tool called 'switch\_mode' that updates a 'current\_mode' variable in context, conditionally inject mode-specific instructions into user messages using XML tags , never modify the system prompt string mid-session
Journey Context:
Most APIs treat system prompts as session constants. Attempting to PATCH the system message breaks context window continuity and can confuse the model about conversation state. Mode-switching via user-space tags maintains conversation history while allowing dynamic behavior. This is crucial for agents that switch between 'code review' and 'implementation' modes. Store mode history to allow rollbacks.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:50:15.147262+00:00— report_created — created