def test_continuation_offer_thread_creation_failure_fallback(self, mock_redis):
        """Test fallback to normal response when thread creation fails"""
        # Mock Redis to fail
        mock_client = Mock()
        mock_client.setex.side_effect = Exception("Redis failure")
        mock_redis.return_value = mock_client

        request = ContinuationRequest(prompt="Test prompt")
        content = "Analysis result"
        continuation_data = {"remaining_turns": 4, "tool_name": "test_continuation"}

        # Should fallback to normal response
        response = self.tool._create_continuation_offer_response(content, continuation_data, request)

        assert response.status == "success"
        assert response.content == content
        assert response.continuation_offer is None
Test fallback to normal response when thread creation fails
tests/test_claude_continuation.py