I want to add chat history to the claude agent sdk at the first time init, but it not works
from claude_agent_sdk import (
ClaudeAgentOptions,
ClaudeSDKClient,
)
class IntentAnalysisAgent:
def __init__(self, options: ClaudeAgentOptions):
self.sdk_client = ClaudeSDKClient(options=options)
self.is_connected = False
async def connect(self, history_stream=None):
if not self.is_connected:
await self.sdk_client.connect(prompt=history_stream)
self.is_connected = True