The Wire · Showcase
CLAUDE AGENT SDK ADDS REAL-TIME SESSION MIRRORING
By RepoJournal · Filed · About Anthropic
The Python SDK now lets you flush session writes on-demand instead of batching them until turn-end, unblocking near-real-time transcript persistence for production agents.
Claude Agent SDK Python shipped an `eager` flush option [1] that bypasses the `TranscriptMirrorBatcher` buffering strategy and delivers `SessionStore.append()` calls immediately, trading adapter latency for observability. The default remains `batched` for backward compatibility, but any agent that needs to stream session state to external stores without waiting for the turn boundary can now opt in. This lands as the SDK continues maturing its session persistence story — critical for agents that need durable, near-real-time audit trails. On the runtime side, Tokio's stall detection handler [2] got a surgical fix: it was clobbering errno during signal handling, corrupting error state in interrupted threads. The fix saves and restores errno around the validation pipe syscalls, a reminder that signal safety remains unforgiving in async runtimes.
Action items
- → Review ClaudeAgentOptions.session_store_flush setting if you're persisting transcripts to external systems anthropics/claude-agent-sdk-python [plan]
- → Update Tokio if you're running stall detection in production signal handlers anthropics/tokio [monitor]
References
- [1] feat(session_store): add session_store_flush option for eager mirroring ↗ anthropics/claude-agent-sdk-python
- [2] save errno in stall detection signal handler ↗ anthropics/tokio
- [3] feat(session_store): add session_store_flush option for eager mirroring (#905) anthropics/claude-agent-sdk-python
FAQ
- What changed in Anthropic on May 4, 2026?
- The Python SDK now lets you flush session writes on-demand instead of batching them until turn-end, unblocking near-real-time transcript persistence for production agents.
- What should Anthropic teams do about it?
- Review ClaudeAgentOptions.session_store_flush setting if you're persisting transcripts to external systems • Update Tokio if you're running stall detection in production signal handlers
- Which Anthropic repositories shipped on May 4, 2026?
- anthropics/claude-agent-sdk-python, anthropics/tokio