- 
                Notifications
    You must be signed in to change notification settings 
- Fork 453
Description
Checks
- I have updated to the lastest minor and patch version of Strands
- I have checked the documentation and this is not expected behavior
- I have searched ./issues and there are no duplicates of my issue
Strands Version
source
Python Version
source
Operating System
macOS
Installation Method
git clone
Steps to Reproduce
Problem Description
Refactor #289 ("remove kwargs spread after agent call") has introduced a breaking change that removes the ability to temporarily override system prompts for single agent invocations. This change is causing significant issues in downstream projects.
What Changed
Before (Working)
# Temporary override for single invocation - original system prompt preserved
agent("Hello!", system_prompt="Some New Prompt")After (Broken)
# Permanent replacement - original system prompt is lost
agent.system_prompt = "Some New Prompt"The Core Issue
The refactor fundamentally changed the behavior from:
- ✅ Temporary override: System prompt changed for one turn only
- ❌ Permanent replacement: Original system prompt is completely lost
Breaking Change Impact
This change is actively breaking production code in the agent-builder repository:
- Affected Code: https://github.com/strands-agents/agent-builder/blob/cf2ebaf80cd3e170de5d6e7705aff54ce69b4041/src/strands_agents_builder/strands.py#L119
- Impact: Loss of dynamic system prompt management functionality
- Severity: Critical - existing codebases cannot upgrade without major refactoring
Why This Matters
- Use Case Loss: Many applications need to temporarily adjust agent behavior without permanently modifying the agent's core instructions
- Backward Compatibility: Existing code that relied on this pattern is now broken
- Developer Experience: The new approach is more cumbersome and destructive
Requested Solution
We need both capabilities available:
Restore Original Behavior
# Temporary override (per-invocation)
agent("Hello!", system_prompt="Temporary instruction")
# Permanent change (persistent)
agent.system_prompt = "New permanent instruction"Expected Behavior
Expected Behavior
- Temporary overrides should not modify the agent's base system prompt
- Permanent changes should continue to work via attribute assignment
- Backward compatibility should be maintained for existing code
Actual Behavior
N/A
Additional Context
Additional Context
The removal of this functionality appears to have been done without consideration for existing use cases. The change description mentions "you can alter the agent's system prompt by overriding the agents system_prompt attribute" but this misses the point - we need temporary overrides, not permanent replacements.
Priority
Critical - This is blocking upgrades and breaking existing functionality in production codebases.
Possible Solution
No response
Related Issues
No response